Merge branch 'fixes'
authorJunio C Hamano <junkio@cox.net>
Sun, 25 Sep 2005 06:50:36 +0000 (23:50 -0700)
committerJunio C Hamano <junkio@cox.net>
Sun, 25 Sep 2005 06:50:36 +0000 (23:50 -0700)
git-grep.sh
show-branch.c

index 51924fd..e7a35eb 100755 (executable)
@@ -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"
index 8cc0755..5778a59 100644 (file)
@@ -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);