From 7a2b128d13d880635e7317a9208cfa42a660f143 Mon Sep 17 00:00:00 2001 From: Linus Torvalds Date: Wed, 2 Nov 2011 19:19:34 -0700 Subject: 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 --- builtin/fetch.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'builtin/fetch.c') diff --git a/builtin/fetch.c b/builtin/fetch.c index 1adf6c176..d061e2c95 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) -- cgit v1.2.1