Re: [PATCH 3/7] t5528-push-default.sh: add helper functions

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Matthieu Moy <Matthieu.Moy@xxxxxxxxxxxxxxx> writes:

> Actually, there's a much stronger argument: we're talking about
> test_push_failure (not success), so whatever the mode is, no branch
> should be updated.

Not really.  When you have 'master' and 'side' (two branches), have
updated both but the remote side has only updated 'master', a push with
'matching' behaves like this:

$ git -c push.default=matching push
Counting objects: 8, done.
Delta compression using up to 12 threads.
Compressing objects: 100% (2/2), done.
Writing objects: 100% (6/6), 399 bytes, done.
Total 6 (delta 1), reused 0 (delta 0)
Unpacking objects: 100% (6/6), done.
To /var/tmp/j/src
   9e1359e..4d3f497  side -> side
 ! [rejected]        master -> master (non-fast-forward)
error: failed to push some refs to '/var/tmp/j/src'
hint: Updates were rejected because a pushed branch tip is behind its remote
hint: counterpart. Check out this branch and merge the remote changes
hint: (e.g. 'git pull') before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.
$ echo $?
1

Notice the mention of "some refs" on the "error:" line.  'side' branch
successfully fast-forwards.
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]