In addition to the existing comment support, that just allows the user
to use a convention that works pretty much everywhere else.
Signed-off-by: Yann Dirson <ydirson@altern.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
* jc/boundary:
rev-list --boundary: show boundary commits even when limited otherwise.
Makefile fixups.
gitk: Fix bug caused by missing commitlisted elements
The boundary commits are shown for UI like gitk to draw them as
soon as topo-order sorting allows, and should not be omitted by
get_revision() filtering logic. As long as their immediate
child commits are shown, we should not filter them out.
Signed-off-by: Junio C Hamano <junkio@cox.net>
It appears the fingerprinting itself is too expensive to be worth doing
for this purpose. A failed experiment.
Signed-off-by: Junio C Hamano <junkio@cox.net>
This bug was reported by Yann Dirson, and results in an 'Error:
expected boolean value but got ""' dialog when scrolling to the bottom
of the graph under some circumstances. The issue is that git-rev-list
isn't outputting all the boundary commits when it is asked for commits
affecting only certain files. We already cope with that by adding the
missing boundary commits in addextraid, but there we weren't adding a
0 to the end of the commitlisted list when we added the extra id to
the end of the displayorder list.
This fixes it by appending 0 to commitlisted in addextraid, thus keeping
commitlisted and displayorder in sync.
Signed-off-by: Paul Mackerras <paulus@samba.org>
Make sure "git show" always show the header, regardless of whether there
is a diff or not.
Also, make sure "always_show_header" actually works, since generate_header
only tested it in one out of three return paths.
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
This moves the decision to print the log message, while diff
options are in effect, to log-tree. It gives behaviour closer
to the traditional one.
Signed-off-by: Junio C Hamano <junkio@cox.net>
* master:
pager: do not fork a pager if PAGER is set to empty.
diff-options: add --patch-with-stat
diff-files --stat: do not dump core with unmerged index.
Support "git cmd --help" syntax
diff --stat: do not do its own three-dashes.
diff-tree: typefix.
GIT v1.3.0-rc4
xdiff: post-process hunks to make them consistent.
Unless the user has a nonstandard "cat" command that does not
meow like a cat, this should not break anything and would save an
extra pipe.
Signed-off-by: Junio C Hamano <junkio@cox.net>
This skips an extra pipe, and helps debugging tremendously.
[jc: PAGER=cat is a questionable hack and should be done as a separate
patch. ]
Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Signed-off-by: Junio C Hamano <junkio@cox.net>
This uses the "--no-walk" flag that I never actually implemented (but I'm
sure I mentioned it) to make "git show" be essentially the same thing as
"git whatchanged --no-walk".
It just refuses to add more interesting parents to the revision walking
history, so you don't actually get any history, you just get the commit
you asked for.
I was going to add "--no-walk" as a real argument flag to git-rev-list
too, but I'm not sure anybody actually needs it. Although it might be
useful for porcelain, so I left the door open.
[jc: ported to the unified option structure by Linus]
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
Split internal "git log" into reusable piece and add "git
whatchanged". This is based on the option parsing unification
work Linus did.
Signed-off-by: Junio C Hamano <junkio@cox.net>
The big option parser unification broke rev-list the big way;
this makes it use options from the parsed revs structure.
Signed-off-by: Junio C Hamano <junkio@cox.net>
Merging all three option parsers related to whatchanged is
unarguably the right thing, but the fallout was too big to scare
me away. Let's try it once again, but once step at time.
This splits out init_revisions() call from setup_revisions(), so
that the callers can set different defaults to match the
traditional benaviour.
The rev-list command is still broken in a big way, which is the
topic of next step.
Signed-off-by: Junio C Hamano <junkio@cox.net>
* js/diffstat:
diff-options: add --patch-with-stat
diff-files --stat: do not dump core with unmerged index.
Support "git cmd --help" syntax
diff --stat: do not do its own three-dashes.
With this option, git prepends a diffstat in front of the patch.
Since I really, really do not know what a diffstat of a combined diff
("merge diff") should look like, the diffstat is not generated for these.
Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Signed-off-by: Junio C Hamano <junkio@cox.net>
The "--help" argument is special, in that it is (along with "--version")
in that is taken by the "git" program itself rather than the sub-command,
and thus we've had the syntax "git --help cmd".
However, as anybody who has ever used CVS or some similar devil-spawn
program, it's confusing as h*ll when options before the sub-command act
differently from options after the sub-command, so this quick hack just
makes it acceptable to do "git cmd --help" instead, and get the exact same
result.
It may be hacky, but it's simple and does the trick.
Of course, this does not help if you use one of the non-builtin commands
without using the "git" helper. Ie you won't be getting a man-page just
because you do "git-rev-list --help". Don't expect us to be quite _that_
helpful.
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
This uses the "--no-walk" flag that I never actually implemented (but I'm
sure I mentioned it) to make "git show" be essentially the same thing as
"git whatchanged --no-walk".
It just refuses to add more interesting parents to the revision walking
history, so you don't actually get any history, you just get the commit
you asked for.
I was going to add "--no-walk" as a real argument flag to git-rev-list
too, but I'm not sure anybody actually needs it. Although it might be
useful for porcelain, so I left the door open.
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
I missed that "git-diff-* --stat" spits out three-dash separator
on its own without being asked. Remove it.
When we output commit log followed by diff, perhaps --patch-with-stat,
for downstream consumer, we _would_ want the three-dash between
the message and the diff material, but that logic belongs to the
caller, not diff generator.
Signed-off-by: Junio C Hamano <junkio@cox.net>
* jc/logopt: (37 commits)
1fc70b6
Author: Junio C Hamano <junkio@cox.net>
Date: Sat Apr 15 04:15:07 2006 -0700
Built-in git-whatchanged
Now "git log" is in reusable shape, add "git whatchanged" which
essentially is a synonym with different default for people whose
fingers are already trained.
There is a subtle difference from the shell-script version; the
first line of each entry is now "commit <object name>", instead
of "diff-tree <object name> (from <object name>)." I suspect
that showing the parent name that way is useful, so this may be
something we would want to fix (the user can say --pretty=raw to
get that information but that is a bit ugly).
Signed-off-by: Junio C Hamano <junkio@cox.net>
:100644 100644 22fec3d... 939a34c... M git.c
...
Now "git log" is in reusable shape, add "git whatchanged" which
essentially is a synonym with different default for people whose
fingers are already trained.
There is a subtle difference from the shell-script version; the
first line of each entry is now "commit <object name>", instead
of "diff-tree <object name> (from <object name>)." I suspect
that showing the parent name that way is useful, so this may be
something we would want to fix (the user can say --pretty=raw to
get that information but that is a bit ugly).
Signed-off-by: Junio C Hamano <junkio@cox.net>
We need to have two sets of diff_options structure and abbrev
settings, but there is no point having two separate commit
format setting. Fix the confusion.
Also properly initialize the command options structure.
Signed-off-by: Junio C Hamano <junkio@cox.net>
Merging of the log-tree-opt structure with rev-info structure
did not work out very well and it broke things that did not want
diff options and/or rev options.
This is an alternative approach to define a combined interface
that can be used by commands that wants both. The use of it is
opt-in to reduce the risk of breaking existing programs.
We might want to slurp "setup_revisions() places things in
pending objects list" part from Linus's earlier attempt.
Signed-off-by: Junio C Hamano <junkio@cox.net>
Recent diff_tree_setup_paths() update made it take a second
argument of type "struct diff_options", but we passed another
struct that happenes to have that type at the beginning by
mistake.
Signed-off-by: Junio C Hamano <junkio@cox.net>
This splits Geert's similarity fingerprint code into main
program and fingerprinting function. The next step would be to
try using this in pack-objects.c::try_delta() -- which would be
a good evaluation.
Signed-off-by: Junio C Hamano <junkio@cox.net>
I've merged everything I think is ready for 1.3.0, so this is
the final round -- hopefully I can release this with minimum
last-minute fixup as v1.3.0 early next week.
Signed-off-by: Junio C Hamano <junkio@cox.net>
* lt/logopt:
Fix up rev-list option parsing.
Fix up default abbrev in setup_revisions() argument parser.
Common option parsing for "git log --diff" and friends