summaryrefslogtreecommitdiff
path: root/contrib/examples
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2008-07-30 08:12:19 (GMT)
committerJunio C Hamano <gitster@pobox.com>2008-07-30 08:13:26 (GMT)
commit9b6bf4d575e216db9240907940e9f6c619877735 (patch)
tree8e185b5051fe27386ba990d8512cfa4cdceef4aa /contrib/examples
parent81b237d5db946b4196225712a37639952787c959 (diff)
downloadgit-9b6bf4d575e216db9240907940e9f6c619877735.zip
git-9b6bf4d575e216db9240907940e9f6c619877735.tar.gz
git-9b6bf4d575e216db9240907940e9f6c619877735.tar.bz2
Fix merge name generation in "merge in C"
When merging an early part of a branch, e.g. "git merge xyzzy~20", we were supposed to say "branch 'xyzzy' (early part)", but it incorrectly said "branch 'refs/heads/xy' (early part)" instead. The logic was supposed to first strip away "~20" part to make sure that what follows "~" is a non-zero posint, prefix it with "refs/heads/" and ask resolve_ref() if it is a ref. If it is, then we know xyzzy was a branch, and we can give the correct message. However, there were a few bugs. First of all, the logic to build this "true branch refname" did not count the characters correctly. At this point of the code, "len" is the number of trailing, non-name part of the given extended SHA-1 expression given by the user, i.e. number of bytes in "~20" in the above example. In addition, the message forgot to skip "refs/heads/" it prefixed from the output. Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'contrib/examples')
0 files changed, 0 insertions, 0 deletions