From f76412ed6dbf2f9863115ee38f4198368dbaf7b1 Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Sun, 21 Aug 2005 02:51:10 -0700 Subject: [PATCH] Add 'git show-branch'. The 'git show-branches' command turns out to be reasonably useful, but painfully slow. So rewrite it in C, using ideas from merge-base while enhancing it a bit more. - Unlike show-branches, it can take --heads (show me all my heads), --tags (show me all my tags), or --all (both). - It can take --more= to show beyond the merge-base. - It shows the short name for each commit in the extended SHA1 syntax. - It can find merge-base for more than two heads. Examples: $ git show-branch --more=6 HEAD is almost the same as "git log --pretty=oneline --max-count=6". $ git show-branch --merge-base master mhf misc finds the merge base of the three given heads. $ git show-branch master mhf misc shows logs from the top of these three branch heads, up to their common ancestor commit is shown. $ git show-branch --all --more=10 is poor-man's gitk, showing all the tags and heads, and going back 10 commits beyond the merge base of those refs. Signed-off-by: Junio C Hamano --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index db7596504a..5d6a293f4d 100644 --- a/Makefile +++ b/Makefile @@ -84,7 +84,7 @@ PROG= git-update-cache git-diff-files git-init-db git-write-tree \ git-diff-stages git-rev-parse git-patch-id git-pack-objects \ git-unpack-objects git-verify-pack git-receive-pack git-send-pack \ git-prune-packed git-fetch-pack git-upload-pack git-clone-pack \ - git-show-index git-daemon git-var git-peek-remote \ + git-show-index git-daemon git-var git-peek-remote git-show-branch \ git-update-server-info git-show-rev-cache git-build-rev-cache ifndef NO_CURL -- cgit v1.2.3 From f5e375c9a99d731c05eef701f119da85d62fc158 Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Mon, 22 Aug 2005 23:16:46 -0700 Subject: Clean-up output from "git show-branch" and document it. When showing only one branch a lot of default output becomes redundant, so clean it up a bit, and document what is shown. Retire the earlier implementation "git-show-branches-script". Signed-off-by: Junio C Hamano --- Makefile | 1 - 1 file changed, 1 deletion(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 5d6a293f4d..ac4f2110dc 100644 --- a/Makefile +++ b/Makefile @@ -71,7 +71,6 @@ SCRIPTS=git git-apply-patch-script git-merge-one-file-script git-prune-script \ SCRIPTS += git-count-objects-script # SCRIPTS += git-send-email-script SCRIPTS += git-revert-script -SCRIPTS += git-show-branches-script PROG= git-update-cache git-diff-files git-init-db git-write-tree \ git-read-tree git-commit-tree git-cat-file git-fsck-cache \ -- cgit v1.2.3