summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2006-04-16Merge branch 'lt/logopt' into nextLibravatar Junio C Hamano2-4/+15
* lt/logopt: Fixes for option parsing
2006-04-16Fixes for option parsingLibravatar Linus Torvalds2-4/+15
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-16Merge branch 'lt/logopt' into nextLibravatar Junio C Hamano3-27/+36
* lt/logopt: log/whatchanged/show - log formatting cleanup. Simplify common default options setup for built-in log family.
2006-04-16log/whatchanged/show - log formatting cleanup.Libravatar Junio C Hamano3-15/+30
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-16Simplify common default options setup for built-in log family.Libravatar Junio C Hamano1-13/+7
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-04-16Merge branch 'master' into lt/logoptLibravatar Junio C Hamano8-21/+169
* 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-16Merge branch 'jc/pager-cat' into nextLibravatar Junio C Hamano1-7/+10
* jc/pager-cat: Do not fork PAGER=cat pager: do not fork a pager if PAGER is set to empty.
2006-04-16Do not fork PAGER=catLibravatar Junio C Hamano1-1/+1
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-16pager: do not fork a pager if PAGER is set to empty.Libravatar Johannes Schindelin1-7/+10
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-16Merge branch 'lt/logopt' into nextLibravatar Junio C Hamano9-343/+289
* 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-16Tentative built-in "git show"Libravatar Linus Torvalds3-0/+24
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-16Built-in git-whatchanged.Libravatar Junio C Hamano1-19/+43
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-15rev-list option parser fix.Libravatar Junio C Hamano1-59/+23
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-15Split init_revisions() out of setup_revisions()Libravatar Junio C Hamano5-5/+6
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-15Merge branch 'js/diffstat' into nextLibravatar Junio C Hamano4-8/+48
* 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-15Merge branch 'lt/show' into nextLibravatar Junio C Hamano4-0/+23
* lt/show: Tentative built-in "git show"
2006-04-15diff-options: add --patch-with-statLibravatar Johannes Schindelin3-1/+22
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-15diff-files --stat: do not dump core with unmerged index.Libravatar Junio C Hamano1-4/+17
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-04-15Support "git cmd --help" syntaxLibravatar Linus Torvalds1-0/+6
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-15Tentative built-in "git show"Libravatar Linus Torvalds4-0/+23
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-15diff --stat: do not do its own three-dashes.Libravatar Junio C Hamano2-3/+3
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-15Merge branch 'jc/logopt' into nextLibravatar Junio C Hamano2-18/+37
* 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-15Built-in git-whatchangedLibravatar Junio C Hamano1-13/+32
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-15whatchanged options parser fix.Libravatar Junio C Hamano2-6/+6
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-15Merge branch 'jc/logopt' into nextLibravatar Junio C Hamano4-76/+101
* jc/logopt: Extract "log [diff options]" parser out. diff-tree: typefix.
2006-04-15Extract "log [diff options]" parser out.Libravatar Junio C Hamano3-75/+100
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-15diff-tree: typefix.Libravatar Junio C Hamano1-1/+1
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-15Merge branch 'jc/simpack' into nextLibravatar Junio C Hamano7-0/+521
* jc/simpack: Clean-up Geert's similarity fingerprint code.
2006-04-15Clean-up Geert's similarity fingerprint code.Libravatar Junio C Hamano7-0/+521
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-15Merge branch 'jc/logopt' into nextLibravatar Junio C Hamano7-229/+229
* jc/logopt: Revert all the rev-list option parsing changes.
2006-04-15Revert all the rev-list option parsing changes.Libravatar Junio C Hamano7-229/+229
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-04-14Merge branch 'master' into nextLibravatar Junio C Hamano1-1/+1
* master: GIT v1.3.0-rc4
2006-04-14GIT v1.3.0-rc4Libravatar Junio C Hamano1-1/+1
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-14Merge branch 'dl/xdiff'Libravatar Junio C Hamano2-5/+110
* dl/xdiff: xdiff: post-process hunks to make them consistent.
2006-04-14Merge branch 'lt/logopt' into nextLibravatar Junio C Hamano7-229/+229
* 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-14Fix up rev-list option parsing.Libravatar Junio C Hamano1-2/+4
rev-list does not take diff options, so barf after seeing some. Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-04-14Fix up default abbrev in setup_revisions() argument parser.Libravatar Junio C Hamano3-0/+7
The default abbreviation precision should be DEFAULT_ABBREV as before. Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-04-14Common option parsing for "git log --diff" and friendsLibravatar Linus Torvalds6-227/+218
This basically does a few things that are sadly somewhat interdependent, and nontrivial to split out - get rid of "struct log_tree_opt" The fields in "log_tree_opt" are moved into "struct rev_info", and all users of log_tree_opt are changed to use the rev_info struct instead. - add the parsing for the log_tree_opt arguments to "setup_revision()" - make setup_revision set a flag (revs->diff) if the diff-related arguments were used. This allows "git log" to decide whether it wants to show diffs or not. - make setup_revision() also initialize the diffopt part of rev_info (which we had from before, but we just didn't initialize it) - make setup_revision() do all the "finishing touches" on it all (it will do the proper flag combination logic, and call "diff_setup_done()") Now, that was the easy and straightforward part. The slightly more involved part is that some of the programs that want to use the new-and-improved rev_info parsing don't actually want _commits_, they may want tree'ish arguments instead. That meant that I had to change setup_revision() to parse the arguments not into the "revs->commits" list, but into the "revs->pending_objects" list. Then, when we do "prepare_revision_walk()", we walk that list, and create the sorted commit list from there. This actually cleaned some stuff up, but it's the less obvious part of the patch, and re-organized the "revision.c" logic somewhat. It actually paves the way for splitting argument parsing _entirely_ out of "revision.c", since now the argument parsing really is totally independent of the commit walking: that didn't use to be true, since there was lots of overlap with get_commit_reference() handling etc, now the _only_ overlap is the shared (and trivial) "add_pending_object()" thing. However, I didn't do that file split, just because I wanted the diff itself to be smaller, and show the actual changes more clearly. If this gets accepted, I'll do further cleanups then - that includes the file split, but also using the new infrastructure to do a nicer "git diff" etc. Even in this form, it actually ends up removing more lines than it adds. It's nice to note how simple and straightforward this makes the built-in "git log" command, even though it continues to support all the diff flags too. It doesn't get much simpler that this. I think this is worth merging soonish, because it does allow for future cleanup and even more sharing of code. However, it obviously touches "revision.c", which is subtle. I've tested that it passes all the tests we have, and it passes my "looks sane" detector, but somebody else should also give it a good look-over. [jc: squashed the original and three "oops this too" updates, with another fix-up.] Signed-off-by: Linus Torvalds <torvalds@osdl.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-04-14Merge branch 'jc/bottomless' into nextLibravatar Junio C Hamano6-31/+31
* jc/bottomless: rev-list --bisect: limit list before bisecting. Clean up trailing whitespace when pretty-printing commits "git cmd -h" for shell scripts. git-log <diff-options> <paths> documentation Retire git-log.sh (take #4) stripspace: incomplete line fix (take #2)
2006-04-14Merge branch 'js/diffstat'Libravatar Junio C Hamano4-7/+226
* js/diffstat: diff --stat: no need to ask funcnames nor context. diff-options: add --stat (take 2) diff-options: add --stat (take 2)
2006-04-14Merge branch 'jc/fix5500'Libravatar Junio C Hamano1-19/+14
* jc/fix5500: t5500: test fix
2006-04-14rev-list --bisect: limit list before bisecting.Libravatar Junio C Hamano1-0/+2
I noticed bisect does not work well without both good and bad. Running this script in git.git repository would give you quite different results: #!/bin/sh initial=e83c5163316f89bfbde7d9ab23ca2e25604af290 mid0=`git rev-list --bisect ^$initial --all` git rev-list $mid0 | wc -l git rev-list ^$mid0 --all | wc -l mid1=`git rev-list --bisect --all` git rev-list $mid1 | wc -l git rev-list ^$mid1 --all | wc -l The $initial commit is the very first commit you made. The first midpoint bisects things evenly as designed, but the latter does not. The reason I got interested in this was because I was wondering if something like the following would help people converting a huge repository from foreign SCM, or preparing a repository to be fetched over plain dumb HTTP only: #!/bin/sh N=4 P=.git/objects/pack bottom= while test 0 \< $N do N=$((N-1)) if test -z "$bottom" then newbottom=`git rev-list --bisect --all` else newbottom=`git rev-list --bisect ^$bottom --all` fi if test -z "$bottom" then rev_list="$newbottom" elif test 0 = $N then rev_list="^$bottom --all" else rev_list="^$bottom $newbottom" fi p=$(git rev-list --unpacked --objects $rev_list | git pack-objects $P/pack) git show-index <$P/pack-$p.idx | wc -l bottom=$newbottom done The idea is to pack older half of the history to one pack, then older half of the remaining history to another, to continue a few times, using finer granularity as we get closer to the tip. This may not matter, since for a truly huge history, running bisect number of times could be quite time consuming, and we might be better off running "git rev-list --all" once into a temporary file, and manually pick cut-off points from the resulting list of commits. After all we are talking about "approximately half" for such an usage, and older history does not matter much. Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-04-14Clean up trailing whitespace when pretty-printing commitsLibravatar Linus Torvalds1-10/+5
Partly because we've messed up and now have some commits with trailing whitespace, but partly because this also just simplifies the code, let's remove trailing whitespace from the end when pretty-printing commits. Signed-off-by: Linus Torvalds <torvalds@osdl.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-04-14"git cmd -h" for shell scripts.Libravatar Junio C Hamano1-1/+1
Wrappers that use sh-setup took --help but not -h. Noticed by Sébastien Pierre. Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-04-14git-log <diff-options> <paths> documentationLibravatar Junio C Hamano1-4/+20
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-04-14Retire git-log.sh (take #4)Libravatar Junio C Hamano1-15/+0
Noticed by Johannes. We do not install it anymore, but still have been shipping the source, which was crazy. Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-04-14stripspace: incomplete line fix (take #2)Libravatar Junio C Hamano1-1/+3
This fixes f4ee3eb68906f079dea45de4f1bbb03d68189eb3 breakage, which added an extra trailing blank line after stripping trailing blank lines by mistake. Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-04-14Merge branch 'jc/fix5500' into nextLibravatar Junio C Hamano1-19/+14
* jc/fix5500: t5500: test fix
2006-04-14Merge branch 'js/diffstat' into nextLibravatar Junio C Hamano1-2/+2
* js/diffstat: diff --stat: no need to ask funcnames nor context.
2006-04-13t5500: test fixLibravatar Junio C Hamano1-19/+14
Relying on eye-candy progress bar was fragile to begin with. Run fetch-pack with -k option, and count the objects that are in the pack that were transferred from the other end. Signed-off-by: Junio C Hamano <junkio@cox.net>