Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <junkio@cox.net>2006-01-14 03:39:17 +0300
committerJunio C Hamano <junkio@cox.net>2006-01-14 03:39:17 +0300
commite99c2fbdda590b0d5fb5bd89001e6d9df8342564 (patch)
treed5948e57db15e6c9bf78826b52229f78accc76e1 /name-rev.c
parent0de62e598552765eb674b72bbaf55b2e2933f617 (diff)
parenta0dfb48af73a98ceb60629f2bbc4ebf1393ba0af (diff)
GIT 1.0.10v1.0.10
Diffstat (limited to 'name-rev.c')
-rw-r--r--name-rev.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/name-rev.c b/name-rev.c
index 65333d4166..bbadb91aa0 100644
--- a/name-rev.c
+++ b/name-rev.c
@@ -93,10 +93,11 @@ static int name_ref(const char *path, const unsigned char *sha1)
}
if (o && o->type == commit_type) {
struct commit *commit = (struct commit *)o;
- const char *p;
- while ((p = strchr(path, '/')))
- path = p+1;
+ if (!strncmp(path, "refs/heads/", 11))
+ path = path + 11;
+ else if (!strncmp(path, "refs/", 5))
+ path = path + 5;
name_rev(commit, strdup(path), 0, 0, deref);
}