summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 9a13f0b)
raw | patch | inline | side by side (parent: 9a13f0b)
author | Nicolas Pitre <nico@cam.org> | |
Fri, 26 Jan 2007 22:26:06 +0000 (17:26 -0500) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Sun, 28 Jan 2007 10:16:46 +0000 (02:16 -0800) |
A ref might be pointing to another ref but only the name of the last ref
is remembered. Let's remember about the first name as well.
Signed-off-by: Nicolas Pitre <nico@cam.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
is remembered. Let's remember about the first name as well.
Signed-off-by: Nicolas Pitre <nico@cam.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
refs.c | patch | blob | history | |
refs.h | patch | blob | history |
index 3b295f380662aab7fc247b6f9fed9e4884758cf5..bd76ea65a904b098c80f6a719b28a316b79e9204 100644 (file)
--- a/refs.c
+++ b/refs.c
@@ -680,6 +680,7 @@ static struct ref_lock *lock_ref_sha1_basic(const char *ref, const unsigned char
lock->lk = xcalloc(1, sizeof(struct lock_file));
lock->ref_name = xstrdup(ref);
+ lock->orig_ref_name = xstrdup(orig_ref);
ref_file = git_path("%s", ref);
lock->force_write = lstat(ref_file, &st) && errno == ENOENT;
rollback_lock_file(lock->lk);
}
free(lock->ref_name);
+ free(lock->orig_ref_name);
free(lock);
}