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>2005-09-25 11:32:06 +0400
committerJunio C Hamano <junkio@cox.net>2005-09-25 11:32:06 +0400
commitcfd8aefd4babcca5adbb724fb213ea3c8b1153c8 (patch)
tree4b7c511e6eed4bd02b075bbe80f0071d7cb41762
parent00d8bbd3c4bba72a6dfd48c2c0c9cbaa000f13c2 (diff)
parentfbaf834de12efb43dea8d2679a040462e9d3d03d (diff)
Merge branch 'fixes'
-rwxr-xr-xgit-grep.sh2
-rw-r--r--show-branch.c15
2 files changed, 15 insertions, 2 deletions
diff --git a/git-grep.sh b/git-grep.sh
index 51924fd7c3..e7a35ebd70 100755
--- a/git-grep.sh
+++ b/git-grep.sh
@@ -40,4 +40,4 @@ while : ; do
shift
done
git-ls-files -z "${git_flags[@]}" "$@" |
- xargs -0 grep "${flags[@]}" "$pattern"
+ xargs -0 grep "${flags[@]}" -e "$pattern"
diff --git a/show-branch.c b/show-branch.c
index 8cc0755e0a..5778a594f4 100644
--- a/show-branch.c
+++ b/show-branch.c
@@ -138,7 +138,20 @@ static void name_commits(struct commit_list *list,
nth++;
if (p->object.util)
continue;
- sprintf(newname, "%s^%d", n->head_name, nth);
+ switch (n->generation) {
+ case 0:
+ sprintf(newname, "%s^%d",
+ n->head_name, nth);
+ break;
+ case 1:
+ sprintf(newname, "%s^^%d",
+ n->head_name, nth);
+ break;
+ default:
+ sprintf(newname, "%s~%d^%d",
+ n->head_name, n->generation,
+ nth);
+ }
name_commit(p, strdup(newname), 0);
i++;
name_first_parent_chain(p);