Commit Graph

4351 Commits

Author SHA1 Message Date
Junio C Hamano
6feba7cb74 Merge branch 'jc/boundary'
* jc/boundary:
  rev-list --boundary: show boundary commits even when limited otherwise.
2006-04-17 15:03:11 -07:00
Junio C Hamano
e190bc5543 Merge branch 'jc/bottomless'
* jc/bottomless:
  rev-list --bisect: limit list before bisecting.
2006-04-17 15:03:10 -07:00
Yann Dirson
360204c324 Allow empty lines in info/grafts
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>
2006-04-17 14:17:50 -07:00
Junio C Hamano
db89665fbf rev-list --header: output format fix
Initial fix prepared by Johannes, but I did it slightly differently.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-04-17 12:42:36 -07:00
Junio C Hamano
9893e3eb92 Merge branch 'jc/boundary' into next
* jc/boundary:
  rev-list --boundary: show boundary commits even when limited otherwise.
  Makefile fixups.
  gitk: Fix bug caused by missing commitlisted elements
2006-04-16 22:07:28 -07:00
Junio C Hamano
1b65a5aa44 rev-list --boundary: show boundary commits even when limited otherwise.
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>
2006-04-16 22:05:38 -07:00
Junio C Hamano
ca9de6cadf Try using Geert similarity code in pack-objects.
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>
2006-04-16 22:03:01 -07:00
Junio C Hamano
9a305b67f8 Geert's similarity
Define a function to compute similarity score 0.0<=score<=1.0

Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-04-16 21:21:46 -07:00
A Large Angry SCM
e6bfaf3e33 Makefile fixups.
Signed-off-by: A Large Angry SCM <gitzilla@gmail.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-04-16 20:42:37 -07:00
Junio C Hamano
1a17ee22a2 Merge git://git.kernel.org/pub/scm/gitk/gitk
* git://git.kernel.org/pub/scm/gitk/gitk:
  gitk: Fix bug caused by missing commitlisted elements
2006-04-16 18:59:30 -07:00
Paul Mackerras
e7da347520 gitk: Fix bug caused by missing commitlisted elements
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>
2006-04-17 10:27:59 +10:00
Junio C Hamano
878bd08d9a Merge branch 'master' into next
* master:
  reading $GIT_DIR/info/graft - skip comments correctly.
2006-04-16 17:03:13 -07:00
Junio C Hamano
6adfbe9b27 Merge branch 'lt/logopt' into next
* lt/logopt:
  Fixes for option parsing
2006-04-16 17:02:52 -07:00
Linus Torvalds
78fff6ebba Fixes for option parsing
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>
2006-04-16 15:34:37 -07:00
Junio C Hamano
5bc4ce5896 reading $GIT_DIR/info/graft - skip comments correctly.
Noticed by Yann Dirson.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-04-16 14:24:56 -07:00
Junio C Hamano
d2b9b5f5bb Merge branch 'lt/logopt' into next
* lt/logopt:
  log/whatchanged/show - log formatting cleanup.
  Simplify common default options setup for built-in log family.
2006-04-16 03:39:00 -07:00
Junio C Hamano
cb8f64b4e3 log/whatchanged/show - log formatting cleanup.
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>
2006-04-16 03:35:38 -07:00
Junio C Hamano
d4ed9793fd Simplify common default options setup for built-in log family.
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-04-16 02:42:00 -07:00
Junio C Hamano
b2934926dd Merge branch 'master' into lt/logopt
* 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.
2006-04-16 02:31:11 -07:00
Junio C Hamano
e4284db2c5 Merge branch 'jc/pager-cat' into next
* jc/pager-cat:
  Do not fork PAGER=cat
  pager: do not fork a pager if PAGER is set to empty.
2006-04-16 01:49:13 -07:00
Junio C Hamano
caef71a535 Do not fork PAGER=cat
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>
2006-04-16 01:46:08 -07:00
Johannes Schindelin
402461aab1 pager: do not fork a pager if PAGER is set to empty.
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>
2006-04-16 01:40:04 -07:00
Junio C Hamano
43f934aa90 Merge branch 'lt/logopt' into next
* lt/logopt:
  Tentative built-in "git show"
  Built-in git-whatchanged.
  rev-list option parser fix.
  Split init_revisions() out of setup_revisions()
2006-04-16 01:02:33 -07:00
Linus Torvalds
ba1d45051e Tentative built-in "git show"
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>
2006-04-16 00:13:38 -07:00
Junio C Hamano
5b84f4d87a Built-in git-whatchanged.
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>
2006-04-16 00:07:41 -07:00
Junio C Hamano
7594c4b2d7 rev-list option parser fix.
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>
2006-04-15 23:48:27 -07:00
Junio C Hamano
6b9c58f466 Split init_revisions() out of setup_revisions()
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>
2006-04-15 23:46:36 -07:00
Junio C Hamano
07512ea820 Merge branch 'js/diffstat' into next
* 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.
2006-04-15 19:35:55 -07:00
Junio C Hamano
6db4ac3453 Merge branch 'lt/show' into next
* lt/show:
  Tentative built-in "git show"
2006-04-15 19:31:45 -07:00
Johannes Schindelin
2935327394 diff-options: add --patch-with-stat
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>
2006-04-15 19:30:27 -07:00
Junio C Hamano
cbdda02404 diff-files --stat: do not dump core with unmerged index.
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-04-15 19:22:48 -07:00
Linus Torvalds
1cd95087c3 Support "git cmd --help" syntax
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>
2006-04-15 18:17:46 -07:00
Linus Torvalds
c5ccd8be43 Tentative built-in "git show"
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>
2006-04-15 18:17:15 -07:00
Junio C Hamano
6f4780f9df diff --stat: do not do its own three-dashes.
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>
2006-04-15 14:06:42 -07:00
Junio C Hamano
9626cb2e62 Merge branch 'jc/logopt' into next
* 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
  ...
2006-04-15 04:22:08 -07:00
Junio C Hamano
1fc70b60bf 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>
2006-04-15 04:21:19 -07:00
Junio C Hamano
d2e38d3bc3 whatchanged options parser fix.
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>
2006-04-15 04:03:48 -07:00
Junio C Hamano
0d53adf15b Merge branch 'jc/logopt' into next
* jc/logopt:
  Extract "log [diff options]" parser out.
  diff-tree: typefix.
2006-04-15 03:24:54 -07:00
Junio C Hamano
f4235f8b2e Extract "log [diff options]" parser out.
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>
2006-04-15 03:24:33 -07:00
Junio C Hamano
5069b1cf61 diff-tree: typefix.
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>
2006-04-15 03:22:00 -07:00
Junio C Hamano
fb8e008219 Merge branch 'jc/simpack' into next
* jc/simpack:
  Clean-up Geert's similarity fingerprint code.
2006-04-15 02:12:14 -07:00
Junio C Hamano
fd2bbdd238 Clean-up Geert's similarity fingerprint code.
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>
2006-04-15 02:11:52 -07:00
Junio C Hamano
5d27a7d58c Merge branch 'jc/logopt' into next
* jc/logopt:
  Revert all the rev-list option parsing changes.
2006-04-15 01:59:49 -07:00
Junio C Hamano
183df63940 Revert all the rev-list option parsing changes.
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-04-15 01:59:40 -07:00
Junio C Hamano
5957f043d3 Merge branch 'master' into next
* master:
  GIT v1.3.0-rc4
2006-04-14 23:21:48 -07:00
Junio C Hamano
42b5c78845 GIT v1.3.0-rc4
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>
2006-04-14 23:21:34 -07:00
Junio C Hamano
170abc81a0 Merge branch 'dl/xdiff'
* dl/xdiff:
  xdiff: post-process hunks to make them consistent.
2006-04-14 22:58:17 -07:00
Junio C Hamano
300dd93306 Merge branch 'lt/logopt' into next
* 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
2006-04-14 22:44:12 -07:00
Junio C Hamano
8c1f0b44c5 Fix up rev-list option parsing.
rev-list does not take diff options, so barf after seeing some.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-04-14 22:43:34 -07:00
Junio C Hamano
8e8f998739 Fix up default abbrev in setup_revisions() argument parser.
The default abbreviation precision should be DEFAULT_ABBREV as before.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-04-14 22:42:31 -07:00