aboutsummaryrefslogtreecommitdiff
path: root/show-branch.c
Commit message (Collapse)AuthorAge
* show-branch --topics: omit more uninteresting commits.Junio C Hamano2006-03-03
| | | | | | | | | | When inspecting contents of topic branches for yet-to-be-merged commits, a commit that is in the release/master branch is uninteresting. Previous round still showed them, especially, the ones before a topic branch that was forked from the release/master later than other topic branches. Signed-off-by: Junio C Hamano <junkio@cox.net>
* show-branch --topicsJunio C Hamano2006-03-02
| | | | | | | | | | | | | | | | | | | | | | | | | | This adds a new flag, --topics, to help managing topic branches. When you have topic branches forked some time ago from your primary line of development, show-branch would show many "uninteresting" things that happend on the primary line of development when trying to see what are still not merged from the topic branches. With this flag, the first ref given to show-branch is taken as the primary branch, and the rest are taken as the topic branches. Output from the command is modified so that commits only on the primary branch are not shown. In other words, $ git show-branch --topics master topic1 topic2 ... shows an (almost) equivalent of $ git rev-list ^master topic1 topic2 ... The major differences are that (1) you can tell which commits are on which branch, and (2) the commit at the fork point is shown. Signed-off-by: Junio C Hamano <junkio@cox.net>
* topo-order: make --date-order optional.Junio C Hamano2006-02-15
| | | | | | | | | | | This adds --date-order to rev-list; it is similar to topo order in the sense that no parent comes before all of its children, but otherwise things are still ordered in the commit timestamp order. The same flag is also added to show-branch. Signed-off-by: Junio C Hamano <junkio@cox.net>
* call git_config() after setup_git_directory()Junio C Hamano2006-02-09
| | | | | | | | If you call setup_git_directory() to work from a subdirectory, that should be run first before running git_config(). Otherwise you would not read the configuration file from the correct place. Signed-off-by: Junio C Hamano <junkio@cox.net>
* pretty_print_commit(): pass commit object instead of commit->buffer.Junio C Hamano2006-01-28
| | | | Signed-off-by: Junio C Hamano <junkio@cox.net>
* diff-tree: abbreviate merge parent object names with --abbrev --pretty.Junio C Hamano2006-01-28
| | | | | | | When --abbrev is in effect, abbreviate the merge parent names in prettyprinted output. Signed-off-by: Junio C Hamano <junkio@cox.net>
* show-branch: --current includes the current branch.Junio C Hamano2006-01-15
| | | | | | | | | | | | | With this, the command includes the current branch to the list of revs to be shown when it is not given on the command line. This is handy to use in the configuration file like this: [showbranch] default = --current default = heads/* ; primary branches, not topics under ; subdirectories Signed-off-by: Junio C Hamano <junkio@cox.net>
* show-branch: make the current branch and merge commits stand out.Junio C Hamano2006-01-15
| | | | | | | | | | | This changes the character used to mark the commits that is on the branch from '+' to '*' for the current branch, to make it stand out. Also we show '-' for merge commits. When you have a handful branches with relatively long diversion, it is easier to see which one is the current branch this way. Signed-off-by: Junio C Hamano <junkio@cox.net>
* Merge fixes up to GIT 1.1.2Junio C Hamano2006-01-13
|\
| * show-branch: handle [] globs as well.Junio C Hamano2006-01-11
| | | | | | | | | | | | | | | | | | | | | | Earlier only '?' and '*' signalled the command that what the user has given is a glob pattern. This prevented us to say: $ git show-branch 'v0.99.[0-3]' Now we notice '[' as well, so the above would work. Signed-off-by: Junio C Hamano <junkio@cox.net>
* | show-branch: take default arguments from configuration file.Junio C Hamano2006-01-09
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | This lets showbranch.default multivalued configuration item to be used as the default set of parameters to git-show-branch when none is given on the command line. I keep many topic branches (e.g. zzz/pack, net/misc) and branches used only as a reference under subdirectories (e.g. hold/{html,man,todo} track the same from git.git, but clutters the show-branch output when shown along with the main development; ko/master tracks what I have pushed out already and refetched from the kernel.org server), and often run: $ git show-branch ko/master heads/* to view only the ko/master head and branches I keep immediately under $GIT_DIR/refs/heads. With this change, I can have this in my $GIT_DIR/config file: [showbranch] default = ko/master default = heads/* and say $ git show-branch Signed-off-by: Junio C Hamano <junkio@cox.net>
* show-branch: usability updates.Junio C Hamano2005-12-23
| | | | | | | | | | | | | | | | | This does three things: . It simplifies the logic to handle the case in which no refs are given on the command line, and fixes the bug when only "--heads" is specified. Earlier we showed them twice. . It avoids to add the same ref twice. . It sorts the glob result (e.g. "git show-branch 'tags/v1.0*'") according to a more version friendly sort order. Signed-off-by: Junio C Hamano <junkio@cox.net>
* \n usage in stderr outputAlex Riesen2005-12-21
| | | | | | | | fprintf and die sometimes have missing/excessive "\n" in their arguments, correct the strings where I think it would be appropriate. Signed-off-by: Alex Riesen <raa.lkml@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
* Sort globbed refname in show-branch.Junio C Hamano2005-12-15
| | | | | | | | "git show-branch bugs/*" shows all branches whose name match the specified pattern, but in the order readdir() happened to returned. Sort them to make the output more predictable. Signed-off-by: Junio C Hamano <junkio@cox.net>
* Add documentation for the --topo-order option to git-show-branch.Nikolai Weibull2005-12-08
| | | | | Signed-off-by: Nikolai Weibull <nikolai@bitwi.se> Signed-off-by: Junio C Hamano <junkio@cox.net>
* show-branch: comment typoJunio C Hamano2005-12-08
| | | | Signed-off-by: Junio C Hamano <junkio@cox.net>
* show-branch: allow glob pattern to name branches to show.Junio C Hamano2005-12-04
| | | | | | | | | | | With this, you can say "git-show-branch topic/* master" to show all the topic branches you have under .git/refs/heads/topic/ and your master branch. Another example is "git-show-branch --list v1.0*" to show all the v1.0 tags. You can disambiguate by saying "heads/topic/*" to show only topic branches if you have tags under .git/refs/tags/topic/ as well. Signed-off-by: Junio C Hamano <junkio@cox.net>
* Make sure heads/foo and tags/foo do not confuse things.Junio C Hamano2005-11-21
| | | | | | | | | When both heads/foo and tags/foo exist, get_sha1_basic("foo") picked up the tag without complaining, which is quite confusing. Make sure we require unambiguous form, "heads/foo" or "tags/foo" in such cases. Signed-off-by: Junio C Hamano <junkio@cox.net>
* Fully detect uninteresting commits.Junio C Hamano2005-11-11
| | | | | | | | | | | | | With the change in the previous round, we are guaranteed to come up with the list of all relevant merge bases, but sometimes we do not fully mark unintersting ones due to a horizon effect. Add a phase to postprocess, so that we mark all ancestor of "interesting" commit. This also changes the default ordering of shown commits back to chronological order, and adds --topo-order flag to show them in topological order. Signed-off-by: Junio C Hamano <junkio@cox.net>
* git-show-branch: tighten merge-base computation.Junio C Hamano2005-11-11
| | | | | | | | | | This makes the merge-base computation resistant to the pathological case discussed on the list earlier, by doing the same logic as git-merge-base. As a side effect, it breaks the command's primary function to list non-merge commit sequences, which needs to be fixed separately. Signed-off-by: Junio C Hamano <junkio@cox.net>
* Merge branch 'fixes'Junio C Hamano2005-10-23
|\
| * git-show-branch: Fix off-by-one error.Junio C Hamano2005-10-23
| | | | | | | | Signed-off-by: Junio C Hamano <junkio@cox.net>
* | show-branch: optionally use unique prefix as name.Junio C Hamano2005-10-11
|/ | | | | | | | | | git-show-branch acquires two new options. --sha1-name to name commits using the unique prefix of their object names, and --no-name to not to show names at all. This was outlined in <7vk6gpyuyr.fsf@assigned-by-dhcp.cox.net> Signed-off-by: Junio C Hamano <junkio@cox.net>
* Add git-symbolic-refJunio C Hamano2005-10-01
| | | | | | | | | | | | | This adds the counterpart of git-update-ref that lets you read and create "symbolic refs". By default it uses a symbolic link to represent ".git/HEAD -> refs/heads/master", but it can be compiled to use the textfile symbolic ref. The places that did 'readlink .git/HEAD' and 'ln -s refs/heads/blah .git/HEAD' have been converted to use new git-symbolic-ref command, so that they can deal with either implementation. Signed-off-by: Junio C Hamano <junio@twinsun.com>
* show-branch: fix commit naming breakage.Junio C Hamano2005-09-24
| | | | | | | | It was ignoring the generation number of the commit when naming 2nd and later parents, showing "(linus^n)^2" for any <n> incorrectly as "linus^2". Signed-off-by: Junio C Hamano <junkio@cox.net>
* show-branch: Be nicer when running in a corrupt repository.Junio C Hamano2005-09-19
| | | | | | | | | We may end up trying to print a commit we do not actually have but we know about its existence only because another commit we do have refers to it. Signed-off-by: Junio C Hamano <junkio@cox.net> (cherry picked from b204feab9371040982d2c60611925e7693106c84 commit)
* Fix 'git-show-branch --list <head>'Junio C Hamano2005-09-10
| | | | | | It mistakenly failed to output anything when given a single head. Signed-off-by: Junio C Hamano <junkio@cox.net>
* show-branch: --list and --independentJunio C Hamano2005-09-09
| | | | | | | | | | The --list option is what 'git branch' without parameter should have been; it shows the one-line commit message for each branch name. The --independent option is used to filter out commits that can be reachable from other commits, to make detection of fast forward condition in multi-head merge easier. Signed-off-by: Junio C Hamano <junkio@cox.net>
* Show all merge-base candidates from show-branch --merge-baseJunio C Hamano2005-09-08
| | | | | | This would make things easier to use for Octopus. Signed-off-by: Junio C Hamano <junkio@cox.net>
* show-branch: make it work in a subdirectory.Junio C Hamano2005-08-30
| | | | Signed-off-by: Junio C Hamano <junkio@cox.net>
* Updates: show-branchJunio C Hamano2005-08-29
| | | | | | | | | | | | | Earlier show-branch gave names only to commits reachable via first parent ancestry chain. Change the naming code to name everybody. The original idea was to stop at the first merge point in the topological order, and --more=<n> to show commits until we show <n> more extra merge points. However depending on the order of how we discover the commits, it additionally showed parents of the <n>th merge points, which was unnecessary. Signed-off-by: Junio C Hamano <junkio@cox.net>
* Sort branch names snarfed from refs/ hierarchy.Junio C Hamano2005-08-24
| | | | Signed-off-by: Junio C Hamano <junkio@cox.net>
* Clean-up output from "git show-branch" and document it.Junio C Hamano2005-08-22
| | | | | | | | 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 <junkio@cox.net>
* [PATCH] Add 'git show-branch'.Junio C Hamano2005-08-22
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=<number> 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 <junkio@cox.net>