summaryrefslogtreecommitdiff
path: root/Documentation
diff options
context:
space:
mode:
authorLibravatar James Denholm <nod.helm@gmail.com>2014-05-13 14:08:58 +1000
committerLibravatar Junio C Hamano <gitster@pobox.com>2014-05-13 12:33:26 -0700
commit6f1871fe0f7d9bddfbe199cceeb255cf8edbaab3 (patch)
tree16177315dec7727e132af53503eb0bbe9004ac27 /Documentation
parentcontrib/subtree/Makefile: clean up rule for "clean" (diff)
downloadtgif-6f1871fe0f7d9bddfbe199cceeb255cf8edbaab3.tar.xz
contrib/subtree: allow adding an annotated tag
cmd_add_commit() is passed FETCH_HEAD by cmd_add_repository, which is then rev-parsed into an object name. However, if the user is fetching a tag rather than a branch HEAD, such as by executing: $ git subtree add -P oldGit https://github.com/git/git.git tags/v1.8.0 the object name refers to a tag and is never peeled, and the git commit-tree call (line 561) slaps us in the face because it doesn't peel tags to commits. Because peeling a committish doesn't do anything if it's already a commit, fix by peeling the object name before assigning it to $rev using peel_committish() from git:git-sh-setup.sh, a pre-existing dependency of git-subtree. Reported-by: Kevin Cagle <kcagle@micron.com> Helped-by: Junio C Hamano <gitster@pobox.com> Signed-off-by: James Denholm <nod.helm@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation')
0 files changed, 0 insertions, 0 deletions