summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* combine-diff: fix loop index underflowrs/combine-diff-zero-context-at-the-beginningRené Scharfe2012-03-251-1/+1
| | | | | | | | | | If both la and context are zero at the start of the loop, la wraps around and we end up reading from memory far away. Skip the loop in that case instead. Reported-by: Julia Lawall <julia.lawall@lip6.fr> Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* GIT 1.3.0v1.3.0Junio C Hamano2006-04-181-1/+1
| | | | Signed-off-by: Junio C Hamano <junkio@cox.net>
* Add git-annotate(1) and git-blame(1)Jonas Fonseca2006-04-184-1/+92
| | | | | | | [jc: with entries in git.txt] Signed-off-by: Jonas Fonseca <fonseca@diku.dk> Signed-off-by: Junio C Hamano <junkio@cox.net>
* diff --stat: make sure to set recursive.Junio C Hamano2006-04-183-5/+10
| | | | | | | Just like "patch" format always needs recursive, "diffstat" format does not make sense without setting recursive. Signed-off-by: Junio C Hamano <junkio@cox.net>
* git-svnimport symlink supportHerbert Valerio Riedel2006-04-181-2/+16
| | | | | | | | | added svn:special symlink support for access methods other than direct-http Signed-off-by: Herbert Valerio Riedel <hvr@gnu.org> Acked-by: Matthias Urlichs <smurf@smurf.noris.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
* packed_object_info_detail(): check for corrupt packfile.Junio C Hamano2006-04-171-2/+4
| | | | | | | Serge E. Hallyn noticed that we compute how many input bytes are still left, but did not use it for sanity checking. Signed-off-by: Junio C Hamano <junkio@cox.net>
* cleanups: remove unused variable from exec_cmd.cSerge E. Hallyn2006-04-171-3/+1
| | | | | | | | Not sure whether it should be removed, or whether execv_git_cmd() should return it rather than -1 at bottom. Signed-off-by: Serge E. Hallyn <serue@us.ibm.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
* cleanups: prevent leak of two strduped strings in config.cSerge E. Hallyn2006-04-171-11/+28
| | | | | | | | Config_filename and lockfile are strduped and then leaked in git_config_set_multivar. Signed-off-by: Serge E. Hallyn <serue@us.ibm.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
* cleanups: Remove impossible case in quote.cSerge E. Hallyn2006-04-171-2/+0
| | | | | | | | | | The switch is inside an if statement which is false if the character is ' '. Either the if should be <=' ' instead of <' ', or the case should be removed as it could be misleading. Signed-off-by: Serge E. Hallyn <serue@us.ibm.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
* cleanups: Remove unused vars from combine-diff.cSerge E. Hallyn2006-04-171-10/+2
| | | | | | | Mod_type in particular sure looks like it wants to be used, but isn't. Signed-off-by: Serge E. Hallyn <serue@us.ibm.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
* cleanups: Fix potential bugs in connect.cSerge E. Hallyn2006-04-171-4/+14
| | | | | | | | | | | The strncmp for ACK was ACK does not include the final space. Presumably either we should either remove the trailing space, or compare 4 chars (as this patch does). 'path' is sometimes strdup'ed, but never freed. Signed-off-by: Serge E. Hallyn <serue@us.ibm.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
* Merge branch 'jc/boundary'Junio C Hamano2006-04-174-10/+36
|\ | | | | | | | | * jc/boundary: rev-list --boundary: show boundary commits even when limited otherwise.
| * rev-list --boundary: show boundary commits even when limited otherwise.Junio C Hamano2006-04-164-10/+36
| | | | | | | | | | | | | | | | | | 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>
* | Merge branch 'jc/bottomless'Junio C Hamano2006-04-171-0/+2
|\ \ | | | | | | | | | | | | * jc/bottomless: rev-list --bisect: limit list before bisecting.
| * | rev-list --bisect: limit list before bisecting.Junio C Hamano2006-04-141-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>
* | | Allow empty lines in info/graftsYann Dirson2006-04-171-1/+1
| |/ |/| | | | | | | | | | | | | 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>
* | Makefile fixups.A Large Angry SCM2006-04-162-2/+2
| | | | | | | | | | Signed-off-by: A Large Angry SCM <gitzilla@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
* | Merge git://git.kernel.org/pub/scm/gitk/gitkJunio C Hamano2006-04-161-2/+3
|\ \ | | | | | | | | | | | | * git://git.kernel.org/pub/scm/gitk/gitk: gitk: Fix bug caused by missing commitlisted elements
| * | gitk: Fix bug caused by missing commitlisted elementsPaul Mackerras2006-04-171-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | reading $GIT_DIR/info/graft - skip comments correctly.Junio C Hamano2006-04-161-1/+3
| | | | | | | | | | | | | | | | | | Noticed by Yann Dirson. Signed-off-by: Junio C Hamano <junkio@cox.net>
* | | pager: do not fork a pager if PAGER is set to empty.Johannes Schindelin2006-04-161-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>
* | | diff-options: add --patch-with-statJohannes Schindelin2006-04-153-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>
* | | diff-files --stat: do not dump core with unmerged index.Junio C Hamano2006-04-151-4/+17
| | | | | | | | | | | | Signed-off-by: Junio C Hamano <junkio@cox.net>
* | | Support "git cmd --help" syntaxLinus Torvalds2006-04-151-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>
* | | diff --stat: do not do its own three-dashes.Junio C Hamano2006-04-152-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>
* | | diff-tree: typefix.Junio C Hamano2006-04-151-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>
* | | GIT v1.3.0-rc4v1.3.0-rc4Junio C Hamano2006-04-141-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>
* | | Merge branch 'dl/xdiff'Junio C Hamano2006-04-142-5/+110
|\ \ \ | | | | | | | | | | | | | | | | * dl/xdiff: xdiff: post-process hunks to make them consistent.
| * | | xdiff: post-process hunks to make them consistent.Davide Libenzi2006-04-132-5/+110
| | | |
* | | | Merge branch 'js/diffstat'Junio C Hamano2006-04-144-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)
| * | | | diff --stat: no need to ask funcnames nor context.Junio C Hamano2006-04-131-2/+2
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Junio C Hamano <junkio@cox.net>
| * | | | diff-options: add --stat (take 2)Johannes Schindelin2006-04-131-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ... and a fix for an invalid free(): Signed-off-by: Junio C Hamano <junkio@cox.net>
| * | | | diff-options: add --stat (take 2)Johannes Schindelin2006-04-134-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>
* | | | Merge branch 'jc/fix5500'Junio C Hamano2006-04-141-19/+14
|\ \ \ \ | |_|_|/ |/| | | | | | | | | | | * jc/fix5500: t5500: test fix
| * | | t5500: test fixJunio C Hamano2006-04-131-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>
* | | | Clean up trailing whitespace when pretty-printing commitsLinus Torvalds2006-04-141-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>
* | | | "git cmd -h" for shell scripts.Junio C Hamano2006-04-141-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>
* | | | git-log <diff-options> <paths> documentationJunio C Hamano2006-04-141-4/+20
| | | | | | | | | | | | | | | | Signed-off-by: Junio C Hamano <junkio@cox.net>
* | | | Retire git-log.sh (take #4)Junio C Hamano2006-04-141-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>
* | | | stripspace: incomplete line fix (take #2)Junio C Hamano2006-04-141-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>
* | | Fix-up previous expr changes.Junio C Hamano2006-04-132-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>
* | Shell utilities: Guard against expr' magic tokens.Mark Wooding2006-04-139-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>
* | t3600-rm: skip failed-remove test when we cannot make an unremovable file.Junio C Hamano2006-04-131-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>
* | Use less memory in "git log"Linus Torvalds2006-04-131-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>
* | git-log: do not output excess blank line between commitsJunio C Hamano2006-04-131-1/+1
| | | | | | | | Signed-off-by: Junio C Hamano <junkio@cox.net>
* | Makefile: $(MAKE) check-docsJunio C Hamano2006-04-131-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>
* | Documentation: add a couple of missing docs.Junio C Hamano2006-04-133-0/+93
| | | | | | | | Signed-off-by: Junio C Hamano <junkio@cox.net>
* | Merge branch 'jc/combine' into nextJunio C Hamano2006-04-125-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.
| * \ Merge branch 'master' into jc/combineJunio C Hamano2006-04-124-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.
| | * | stripspace: make sure not to leave an incomplete line.Junio C Hamano2006-04-121-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>