diff options
author | Johan Herland <johan@herland.net> | 2010-11-09 22:49:54 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2010-11-17 13:22:49 -0800 |
commit | 6cfd6a9dea889707fa207ee2003010c3b56b2131 (patch) | |
tree | c0596682504898624057f102066fe4beddea3e5f /t/t9140-git-svn-reset.sh | |
parent | git notes merge: List conflicting notes in notes merge commit message (diff) | |
download | tgif-6cfd6a9dea889707fa207ee2003010c3b56b2131.tar.xz |
git notes merge: --commit should fail if underlying notes ref has moved
When manually resolving a notes merge, if the merging ref has moved since
the merge started, we should fail to complete the merge, and alert the user
to what's going on.
This situation may arise if you start a 'git notes merge' which results in
conflicts, and you then update the current notes ref (using for example
'git notes add/copy/amend/edit/remove/prune', 'git update-ref', etc.),
before you get around to resolving the notes conflicts and calling
'git notes merge --commit'.
We detect this situation by comparing the first parent of the partial merge
commit (which was created when the merge started) to the current value of the
merging notes ref (pointed to by the .git/NOTES_MERGE_REF symref).
If we don't fail in this situation, the notes merge commit would overwrite
the updated notes ref, thus losing the changes that happened in the meantime.
The patch includes a testcase verifying that we fail correctly in this
situation.
Signed-off-by: Johan Herland <johan@herland.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t9140-git-svn-reset.sh')
0 files changed, 0 insertions, 0 deletions