summaryrefslogtreecommitdiff
path: root/builtin/fetch.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2011-11-02 19:19:34 -0700
committerJunio C Hamano <gitster@pobox.com>2011-11-04 21:40:25 -0700
commit7a2b128d13d880635e7317a9208cfa42a660f143 (patch)
tree86f3be42cb2b04dee0c5432eedfae027f1ace9f4 /builtin/fetch.c
parent2f47eae2a1337bd0cb50dbc936df6433f460bb4a (diff)
downloadgit-7a2b128d13d880635e7317a9208cfa42a660f143.tar.gz
fetch: do not store peeled tag object names in FETCH_HEAD
We do not want to record tags as parents of a merge when the user does "git pull $there tag v1.0" to merge tagged commit, but that is not a good enough excuse to peel the tag down to commit when storing in FETCH_HEAD. The caller of underlying "git fetch $there tag v1.0" may have other uses of information contained in v1.0 tag in mind. [jc: the test adjustment is to update for the new expectation] Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/fetch.c')
-rw-r--r--builtin/fetch.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/builtin/fetch.c b/builtin/fetch.c
index 1adf6c176f..d061e2c956 100644
--- a/builtin/fetch.c
+++ b/builtin/fetch.c
@@ -436,8 +436,7 @@ static int store_updated_refs(const char *raw_url, const char *remote_name,
}
note[note_len] = '\0';
fprintf(fp, "%s\t%s\t%s",
- sha1_to_hex(commit ? commit->object.sha1 :
- rm->old_sha1),
+ sha1_to_hex(rm->old_sha1),
rm->merge ? "" : "not-for-merge",
note);
for (i = 0; i < url_len; ++i)