remove mention of receive.denyNonFastforwards on push failure
That was added back in 2013 commit 2af652e1b8
and I'm a bit unclear about the reasons.
It seemed that, at the time, receive.denyNonFastforwards=true, which is
the default in a repo created by git init --shared --bare (but not
without --shared), which the assistant did, caused problems syncing.
But even at the time the bug report showed an error message clearly
explaining that it was a non-fast-forward push being denied.
I tried it with the current version, and since git-annex sync pulls
from the bare repo and merges, it pushes a fast-forward. So there's no
failure to push. (There could be one if another push happened after the
pull, but you'd want it to fail then presumably.)
I'm not 100% sure what changed to make it not be a problem, but I know
I've seen this message in many circumstances and I can't ever recall it
having anything to do with any issue that prevented a push.
Based on doc/forum/non_fast_forward_error_with_git_annex_sync.mdwn,
which showed the problem when syncing from a direct mode repo,
and on doc/forum/receiving_indirect_renames_on_direct_repo___63__/comment_3_0246fff6c7c75f6be45bd257ec3872a5._comment
which seems to show the problem was actually a problem pulling,
I think there's a good chance that the problem actually involved direct
mode.
This commit is contained in:
parent
c4a1b04e8b
commit
72959b23e5
1 changed files with 0 additions and 4 deletions
|
@ -492,7 +492,6 @@ pushRemote o remote (Just branch, _) = do
|
||||||
then postpushupdate repo
|
then postpushupdate repo
|
||||||
else do
|
else do
|
||||||
warning $ unwords [ "Pushing to " ++ Remote.name remote ++ " failed." ]
|
warning $ unwords [ "Pushing to " ++ Remote.name remote ++ " failed." ]
|
||||||
showLongNote "(non-fast-forward problems can be solved by setting receive.denyNonFastforwards to false in the remote's git config)"
|
|
||||||
return ok
|
return ok
|
||||||
where
|
where
|
||||||
gc = Remote.gitconfig remote
|
gc = Remote.gitconfig remote
|
||||||
|
@ -548,9 +547,6 @@ pushRemote o remote (Just branch, _) = do
|
||||||
- But overwriting of data on synced/git-annex can happen, in a race.
|
- But overwriting of data on synced/git-annex can happen, in a race.
|
||||||
- The only difference caused by using a forced push in that case is that
|
- The only difference caused by using a forced push in that case is that
|
||||||
- the last repository to push wins the race, rather than the first to push.
|
- the last repository to push wins the race, rather than the first to push.
|
||||||
-
|
|
||||||
- The sync push will fail to overwrite if receive.denyNonFastforwards is
|
|
||||||
- set on the remote.
|
|
||||||
-}
|
-}
|
||||||
pushBranch :: Remote -> Maybe Git.Branch -> Git.Repo -> IO Bool
|
pushBranch :: Remote -> Maybe Git.Branch -> Git.Repo -> IO Bool
|
||||||
pushBranch remote mbranch g = directpush `after` annexpush `after` syncpush
|
pushBranch remote mbranch g = directpush `after` annexpush `after` syncpush
|
||||||
|
|
Loading…
Reference in a new issue