diff options
author | Junio C Hamano <junkio@cox.net> | 2006-01-15 21:12:12 -0800 |
---|---|---|
committer | Junio C Hamano <junkio@cox.net> | 2006-01-15 21:12:12 -0800 |
commit | 7cb038a692ec0bdc0f442380678e8e87e26d4e68 (patch) | |
tree | bb1b80cca9e3d46d87dec7f150d4b9cf11b1ead7 /name-rev.c | |
parent | describe: do not silently ignore indescribable commits (diff) | |
parent | diffcore-break/diffcore-rename: integer overflow. (diff) | |
download | tgif-7cb038a692ec0bdc0f442380678e8e87e26d4e68.tar.xz |
Merge branch 'fixo/1.0'
Diffstat (limited to 'name-rev.c')
-rw-r--r-- | name-rev.c | 7 |
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); } |