summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
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>
2006-04-13diff --stat: no need to ask funcnames nor context.Libravatar Junio C Hamano1-2/+2
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-04-13Merge branch 'master' into nextLibravatar Junio C Hamano2-3/+3
* master: Fix-up previous expr changes.
2006-04-13Fix-up previous expr changes.Libravatar Junio C Hamano2-3/+3
The regexp on the right hand side of expr : operator somehow was broken. expr 'z+pu:refs/tags/ko-pu' : 'z\+\(.*\)' does not strip '+'; write 'z+\(.*\)' instead. We probably should switch to shell based substring post 1.3.0; that's not bashism but just POSIX anyway. Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-04-13Merge branch 'js/diffstat' into nextLibravatar Junio C Hamano4-7/+226
* js/diffstat: diff-options: add --stat (take 2) diff-options: add --stat (take 2)
2006-04-13diff-options: add --stat (take 2)Libravatar Johannes Schindelin1-5/+5
... and a fix for an invalid free(): Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-04-13xdiff: post-process hunks to make them consistent.Libravatar Davide Libenzi2-5/+110
2006-04-13diff-options: add --stat (take 2)Libravatar Johannes Schindelin4-7/+226
Now, you can say "git diff --stat" (to get an idea how many changes are uncommitted), or "git log --stat". Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-04-13Shell utilities: Guard against expr' magic tokens.Libravatar Mark Wooding9-30/+30
Some words, e.g., `match', are special to expr(1), and cause strange parsing effects. Track down all uses of expr and mangle the arguments so that this isn't a problem. Signed-off-by: Mark Wooding <mdw@distorted.org.uk> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-04-13t3600-rm: skip failed-remove test when we cannot make an unremovable file.Libravatar Junio C Hamano1-3/+15
When running t3600-rm test under fakeroot (or as root), we cannot make a file unremovable with "chmod a-w .". Detect this case early and skip that test. Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-04-13Use less memory in "git log"Libravatar Linus Torvalds1-0/+2
This trivially avoids keeping the commit message data around after we don't need it any more, avoiding a continually growing "git log" memory footprint. It's not a huge deal, but it's somewhat noticeable. For the current kernel tree, doing a full "git log" I got - before: /usr/bin/time git log > /dev/null 0.81user 0.02system 0:00.84elapsed 100%CPU (0avgtext+0avgdata 0maxresident)k 0inputs+0outputs (0major+8851minor)pagefaults 0swaps - after: /usr/bin/time git log > /dev/null 0.79user 0.03system 0:00.83elapsed 100%CPU (0avgtext+0avgdata 0maxresident)k 0inputs+0outputs (0major+5039minor)pagefaults 0swaps ie the touched pages dropped from 8851 to 5039. For the historic kernel archive, the numbers are 18357->11037 minor page faults. We could/should in theory free the commits themselves, but that's really a lot harder, since during revision traversal we may hit the same commit twice through different children having it as a parent, even after we've shown it once (when that happens, we'll silently ignore it next time, but we still need the "struct commit" to know). And as the commit message data is clearly the biggest part of the commit, this is the really easy 60% solution. Signed-off-by: Linus Torvalds <torvalds@osdl.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-04-13git-log: do not output excess blank line between commitsLibravatar Junio C Hamano1-1/+1
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-04-13Makefile: $(MAKE) check-docsLibravatar Junio C Hamano1-0/+20
This target lists undocumented commands, and/or whose document is not referenced from the main git documentation. For now, there are some exceptions I added primarily because I lack the energy to document them myself: - merge backends (we should really document them) - ssh-push/ssh-pull (does anybody still use them?) - annotate and blame (maybe after one of them eats the other ;-) Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-04-13Documentation: add a couple of missing docs.Libravatar Junio C Hamano3-0/+93
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-04-12Merge branch 'jc/combine' into nextLibravatar Junio C Hamano5-60/+24
* jc/combine: stripspace: make sure not to leave an incomplete line. git-commit: do not muck with commit message when no_edit is set. When showing a commit message, do not lose an incomplete line. Retire t5501-old-fetch-and-upload test. combine-diff: type fix.
2006-04-12Merge branch 'master' into jc/combineLibravatar Junio C Hamano4-58/+22
* master: stripspace: make sure not to leave an incomplete line. git-commit: do not muck with commit message when no_edit is set. When showing a commit message, do not lose an incomplete line. Retire t5501-old-fetch-and-upload test.
2006-04-12combine-diff: type fix.Libravatar Junio C Hamano1-2/+2
The variable hunk_end points at a line number, which is represented as unsigned long by all the other variables. Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-04-12stripspace: make sure not to leave an incomplete line.Libravatar Junio C Hamano1-3/+8
When dealing with a commit log message for human consumption, it never makes sense to keep a log that ends with an incomplete line, so make it a part of the clean-up process done by git-stripspace. Acked-by: Linus Torvalds <torvalds@osdl.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-04-12git-commit: do not muck with commit message when no_edit is set.Libravatar Junio C Hamano1-5/+12
Spotted by Linus and Darrin Thompson. When we took a commit message from -F <file> with an incomplete line, we appended "git status" output, which ended up attaching a lone "#" at the end. We still need the "do we have anything to commit?" check by running "status" (which has to know what to do in different cases with -i/-o/-a), but there is no point appending its output to the proposed commit message given by the user. Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-04-12When showing a commit message, do not lose an incomplete line.Libravatar Linus Torvalds1-2/+2
2006-04-11Retire t5501-old-fetch-and-upload test.Libravatar Junio C Hamano1-48/+0
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-04-11Merge branch 'jc/combine' into nextLibravatar Junio C Hamano1-26/+37
* jc/combine: combine-diff: fix hunks at the end (take #2). combine-diff: do not lose hunks with only deletion at end.