Re: [PATCH 3/7] t5528-push-default.sh: add helper functions
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Apr 23, 2012, 17:09 UTC
- Message-ID
- <xmqqmx62jrxq.fsf@junio.mtv.corp.google.com>
- In-Reply-To
- <vpqobqigzcx.fsf@bauges.imag.fr>
Matthieu Moy <Matthieu.Moy@grenoble-inp.fr> 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.