aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAge
* GIT 1.5.1-rc1v1.5.1-rc1Junio C Hamano2007-03-19
| | | | | | | | | I think we can start to slow down, as we now have covered everything I listed earlier in the short-term release plan. The last release 1.5.0 took painfully too long. Signed-off-by: Junio C Hamano <junkio@cox.net>
* Fix merge-indexJunio C Hamano2007-03-19
| | | | | | | An earlier conversion to run_command() from execlp() forgot that run_command() takes an array that is terminated with NULL. Signed-off-by: Junio C Hamano <junkio@cox.net>
* Set up for better tree diff optimizationsLinus Torvalds2007-03-19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is mainly just a cleanup patch, and sets up for later changes where the tree-diff.c "interesting()" function can return more than just a yes/no value. In particular, it should be quite possible to say "no subsequent entries in this tree can possibly be interesting any more", and thus allow the callers to short-circuit the tree entirely. In fact, changing the callers to do so is trivial, and is really all this patch really does, because changing "interesting()" itself to say that nothing further is going to be interesting is definitely more complicated, considering that we may have arbitrary pathspecs. But in cleaning up the callers, this actually fixes a potential small performance issue in diff_tree(): if the second tree has a lot of uninterestign crud in it, we would keep on doing the "is it interesting?" check on the first tree for each uninteresting entry in the second one. The answer is obviously not going to change, so that was just not helping. The new code is clearer and simpler and avoids this issue entirely. I also renamed "interesting()" to "tree_entry_interesting()", because I got frustrated by the fact that - we actually had *another* function called "interesting()" in another file, and I couldn't tell from the profiles which one was the one that mattered more. - when rewriting it to return a ternary value, you can't just do if (interesting(...)) ... any more, but want to assign the return value to a local variable. The name of choice for that variable would normally be "interesting", so I just wanted to make the function name be more specific, and avoid that whole issue (even though I then didn't choose that name for either of the users, just to avoid confusion in the patch itself ;) In other words, this doesn't really change anything, but I think it's a good thing to do, and if somebody comes along and writes the logic for "yeah, none of the pathspecs you have are interesting", we now support that trivially. It could easily be a meaningful optimization for things like "blame", where there's just one pathspec, and stopping when you've seen it would allow you to avoid about 50% of the tree traversals on average. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
* Trivial cleanup of track_tree_refs()Linus Torvalds2007-03-19
| | | | | | | | | | | | | | | | This makes "track_tree_refs()" use the same "tree_entry()" function for counting the entries as it does for actually traversing them a few lines later. Not a biggie, but the reason I care was that this was the only user of "update_tree_entry()" that didn't actually *extract* the tree entry first. It doesn't matter as things stand now, but it meant that a separate test-patch I had that avoided a few more "strlen()" calls by just saving the entry length in the entry descriptor and using it directly when updating wouldn't work without this patch. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
* git.el: Add support for commit hooks.Alexandre Julliard2007-03-19
| | | | | | | | Run the pre-commit and post-commit hooks at appropriate places, and display their output if any. Signed-off-by: Alexandre Julliard <julliard@winehq.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
* Merge branch 'jb/gc'Junio C Hamano2007-03-18
|\ | | | | | | | | * jb/gc: Make gc a builtin.
| * Make gc a builtin.James Bowes2007-03-17
| | | | | | | | | | Signed-off-by: James Bowes <jbowes@dangerouslyinc.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
* | Merge branch 'fl/cvsserver'Junio C Hamano2007-03-18
|\ \ | | | | | | | | | | | | | | | * fl/cvsserver: cvsserver: further improve messages on commit and status cvsserver: Be more chatty
| * | cvsserver: further improve messages on commit and statusFrank Lichtenheld2007-03-14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | commit: Also print the old revision similar to how cvs does it and prepend a line stating the filename so that one can actually understand what happened when commiting more than one file. status: Fix the RCS filename displayed. The directory was printed twice. Signed-off-by: Frank Lichtenheld <frank@lichtenheld.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
| * | cvsserver: Be more chattyFrank Lichtenheld2007-03-14
| | | | | | | | | | | | | | | | | | | | | | | | Submit some additional messages to the client on commit and update. Inspired by the standard CVS server though a little more terse. Signed-off-by: Frank Lichtenheld <frank@lichtenheld.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
* | | Limit the size of the new delta_base_cacheShawn O. Pearce2007-03-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The new configuration variable core.deltaBaseCacheLimit allows the user to control how much memory they are willing to give to Git for caching base objects of deltas. This is not normally meant to be a user tweakable knob; the "out of the box" settings are meant to be suitable for almost all workloads. We default to 16 MiB under the assumption that the cache is not meant to consume all of the user's available memory, and that the cache's main purpose was to cache trees, for faster path limiters during revision traversal. Since trees tend to be relatively small objects, this relatively small limit should still allow a large number of objects. On the other hand we don't want the cache to start storing 200 different versions of a 200 MiB blob, as this could easily blow the entire address space of a 32 bit process. We evict OBJ_BLOB from the cache first (credit goes to Junio) as we want to favor OBJ_TREE within the cache. These are the objects that have the highest inflate() startup penalty, as they tend to be small and thus don't have that much of a chance to ammortize that penalty over the entire data. Signed-off-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
* | | Merge branch 'sp/run-command'Junio C Hamano2007-03-18
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * sp/run-command: Use run_command within send-pack Use run_command within receive-pack to invoke index-pack Use run_command within merge-index Use run_command for proxy connections Use RUN_GIT_CMD to run push backends Correct new compiler warnings in builtin-revert Replace fork_with_pipe in bundle with run_command Teach run-command to redirect stdout to /dev/null Teach run-command about stdout redirection
| * | | Use run_command within send-packShawn O. Pearce2007-03-12
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
| * | | Use run_command within receive-pack to invoke index-packShawn O. Pearce2007-03-12
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
| * | | Use run_command within merge-indexShawn O. Pearce2007-03-12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Maybe unnecessary as the merge-index utility may go away in the future, but its currently here, its shorter to use run_command, and probably will help the MinGW port out. Signed-off-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
| * | | Use run_command for proxy connectionsShawn O. Pearce2007-03-12
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
| * | | Use RUN_GIT_CMD to run push backendsShawn O. Pearce2007-03-12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If we hand run_command RUN_GIT_CMD rather than 0 it will use the execv_git_cmd path rather than execvp at the OS level. This is typically the preferred way of running another Git utility. Signed-off-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
| * | | Correct new compiler warnings in builtin-revertShawn O. Pearce2007-03-12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The new builtin-revert code introduces a few new compiler errors when I'm building with my stricter set of checks enabled in CFLAGS. These all just stem from trying to store a constant string into a non-const char*. Simple fix, make the variables const char*. Signed-off-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
| * | | Replace fork_with_pipe in bundle with run_commandShawn O. Pearce2007-03-12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Now that the run_command family supports all of the redirection modes needed by builtin-bundle, we can use those functions rather than the underlying POSIX primitives. This should help to make the bundle command slightly more portable to other systems, like Windows. Signed-off-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
| * | | Teach run-command to redirect stdout to /dev/nullShawn O. Pearce2007-03-12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some run-command callers may wish to just discard any data that is sent to stdout from the child. This is a lot like our existing no_stdin support, we just open /dev/null and duplicate the descriptor into position. Signed-off-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
| * | | Teach run-command about stdout redirectionShawn O. Pearce2007-03-12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some potential callers of the run_command family of functions need to control not only the stdin redirection of the child, but also the stdout redirection of the child. This can now be setup much like the already existing stdin redirection. Signed-off-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
* | | | Make git-send-email aware of Cc: lines.J. Bruce Fields2007-03-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In the Linux kernel, for example, it's common to include Cc: lines for cases when you want to remember to cc someone on a patch without necessarily claiming they signed off on it. Make git-send-email aware of these. Signed-off-by: "J. Bruce Fields" <bfields@citi.umich.edu> Signed-off-by: Junio C Hamano <junkio@cox.net>
* | | | mergetool: print an appropriate warning if merge.tool is unknownTheodore Ts'o2007-03-18
| | | | | | | | | | | | | | | | | | | | | | | | Also add support for vimdiff Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
* | | | mergetool: Add support for vimdiff.James Bowes2007-03-18
| | | | | | | | | | | | | | | | | | | | Signed-off-by: James Bowes <jbowes@dangerouslyinc.com> Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
* | | | Update main git.html page to point at 1.5.0.5 documentationJunio C Hamano2007-03-18
| | | | | | | | | | | | | | | | Signed-off-by: Junio C Hamano <junkio@cox.net>
* | | | Merge branch 'ar/diff'Junio C Hamano2007-03-18
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * ar/diff: Add tests for --quiet option of diff programs try-to-simplify-commit: use diff-tree --quiet machinery. revision.c: explain what tree_difference does Teach --quiet to diff backends. diff --quiet Remove unused diffcore_std_no_resolve Allow git-diff exit with codes similar to diff(1)
| * | | | Add tests for --quiet option of diff programsAlex Riesen2007-03-16
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Alex Riesen <raa.lkml@gmail.com>
| * | | | try-to-simplify-commit: use diff-tree --quiet machinery.Junio C Hamano2007-03-14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This uses diff-tree --quiet machinery to terminate the internal diff-tree between a commit and its parents via revs.pruning (not revs.diffopt) as soon as we find enough about the tree change. With respect to the optionally given pathspec, we are interested if the tree of commit is identical to the parent's, only adds new paths to the parent's, or there are other differences. As soon as we find out that there is one such other kind of difference, we do not have to compare the rest of the tree. Because we do not call standard diff_addremove/diff_change, we instruct the diff-tree machinery to stop early by setting has_changes when we say we found the trees to be different. Signed-off-by: Junio C Hamano <junkio@cox.net>
| * | | | revision.c: explain what tree_difference doesJunio C Hamano2007-03-14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This explains how tree_difference variable is used, and updates two places where the code knows symbolic constant REV_TREE_SAME is 0. Signed-off-by: Junio C Hamano <junkio@cox.net>
| * | | | Teach --quiet to diff backends.Junio C Hamano2007-03-14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This teaches git-diff-files, git-diff-index and git-diff-tree backends to exit early under --quiet option. Signed-off-by: Junio C Hamano <junkio@cox.net>
| * | | | diff --quietJunio C Hamano2007-03-14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds the command line option 'quiet' to tell 'git diff-*' that we are not interested in the actual diff contents but only want to know if there is any change. This option automatically turns --exit-code on, and turns off output formatting, as it does not make much sense to show the first hit we happened to have found. The --quiet option is silently turned off (but --exit-code is still in effect, so is silent output) if postprocessing filters such as pickaxe and diff-filter are used. For all practical purposes I do not think of a reason to want to use these filters and not viewing the diff output. The backends have not been taught about the option with this patch. That is a topic for later rounds. Signed-off-by: Junio C Hamano <junkio@cox.net>
| * | | | Remove unused diffcore_std_no_resolveJunio C Hamano2007-03-14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This was only used by diff-tree-helper program, whose purpose was to translate a raw diff to a patch. Signed-off-by: Junio C Hamano <junkio@cox.net>
| * | | | Allow git-diff exit with codes similar to diff(1)Alex Riesen2007-03-14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This introduces a new command-line option: --exit-code. The diff programs will return 1 for differences, return 0 for equality, and something else for errors. Signed-off-by: Alex Riesen <raa.lkml@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
* | | | | Avoid unnecessary strlen() callsLinus Torvalds2007-03-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a micro-optimization that grew out of the mailing list discussion about "strlen()" showing up in profiles. We used to pass regular C strings around to the low-level tree walking routines, and while this worked fine, it meant that we needed to call strlen() on strings that the caller always actually knew the size of anyway. So pass the length of the string down wih the string, and avoid unnecessary calls to strlen(). Also, when extracting a pathname from a tree entry, use "tree_entry_len()" instead of strlen(), since the length of the pathname is directly calculable from the decoded tree entry itself without having to actually do another strlen(). This shaves off another ~5-10% from some loads that are very tree intensive (notably doing commit filtering by a pathspec). Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>" Signed-off-by: Junio C Hamano <junkio@cox.net>
* | | | | Reuse cached data out of delta base cache.Nicolas Pitre2007-03-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A malloc() + memcpy() will always be faster than mmap() + malloc() + inflate(). If the data is already there it is certainly better to copy it straight away. With this patch below I can do 'git log drivers/scsi/ > /dev/null' about 7% faster. I bet it might be even more on those platforms with bad mmap() support. Signed-off-by: Nicolas Pitre <nico@cam.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
* | | | | Implement a simple delta_base cacheLinus Torvalds2007-03-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This trivial 256-entry delta_base cache improves performance for some loads by a factor of 2.5 or so. Instead of always re-generating the delta bases (possibly over and over and over again), just cache the last few ones. They often can get re-used. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
* | | | | Make trivial wrapper functions around delta base generation and freeingLinus Torvalds2007-03-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This doesn't change any code, it just creates a point for where we'd actually do the caching of delta bases that have been generated. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
* | | | | Merge 1.5.0.5 in from 'maint'Junio C Hamano2007-03-18
|\ \ \ \ \ | |_|_|_|/ |/| | | |
| * | | | GIT 1.5.0.5v1.5.0.5Junio C Hamano2007-03-18
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Junio C Hamano <junkio@cox.net>
* | | | | Merge branch 'maint'Junio C Hamano2007-03-17
|\ \ \ \ \ | |/ / / / | | | | | | | | | | | | | | | * maint: git-merge: finish when git-read-tree fails
| * | | | git-merge: finish when git-read-tree failsSanti Béjar2007-03-16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The message formating (commit v1.5.0.3-28-gbe242d5) broke the && chain. Noticed by Dmitry Torokhov. Signed-off-by: Santi Béjar <sbejar@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
* | | | | [PATCH] clean up pack index handling a bitNicolas Pitre2007-03-16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Especially with the new index format to come, it is more appropriate to encapsulate more into check_packed_git_idx() and assume less of the index format in struct packed_git. To that effect, the index_base is renamed to index_data with void * type so it is not used directly but other pointers initialized with it. This allows for a couple pointer cast removal, as well as providing a better generic name to grep for when adding support for new index versions or formats. And index_data is declared const too while at it. Signed-off-by: Nicolas Pitre <nico@cam.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
* | | | | [PATCH] add test for OFS_DELTA objectsNicolas Pitre2007-03-16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make sure pack-objects with --delta-base-offset works fine, and that it actually produces smaller packs as expected. Signed-off-by: Nicolas Pitre <nico@cam.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
* | | | | [PATCH] fix t5300-pack-object.shNicolas Pitre2007-03-16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The 'use packed deltified objects' test was flawed as it failed to remove the pack and index from the previous test, effectively preventing the desired pack from being exercised as objects could be found in that other pack instead. Signed-off-by: Nicolas Pitre <nico@cam.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
* | | | | [PATCH] local-fetch.c: some error printing cleanupNicolas Pitre2007-03-16
| | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Nicolas Pitre <nico@cam.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
* | | | | applymbox: brown paper bag fix.Junio C Hamano2007-03-16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | An earlier patch 87ab7992 broke applymbox by blindly copying piece from git-am, causing a harmless but annoying series of error messages. Signed-off-by: Junio C Hamano <junkio@cox.net>
* | | | | use xstrdup pleaseShawn O. Pearce2007-03-16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We generally prefer xstrdup to just plain strdup. Make it so. Signed-off-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
* | | | | git-fetch, git-branch: Support local --track via a special remote '.'Paolo Bonzini2007-03-16
| |/ / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds support for a dummy remote '.' to avoid having to declare a fake remote like [remote "local"] url = . fetch = refs/heads/*:refs/heads/* Such a builtin remote simplifies the operation of "git-fetch", which will populate FETCH_HEAD but will not pretend that two repositories are in use, will not create a thin pack, and will not perform any useless remapping of names. The speed improvement is around 20%, and it should improve more if "git-fetch" is converted to a builtin. To this end, git-parse-remote is grown with a new kind of remote, 'builtin'. In git-fetch.sh, we treat the builtin remote specially in that it needs no pack/store operations. In fact, doing git-fetch on a builtin remote will simply populate FETCH_HEAD appropriately. The patch also improves of the --track/--no-track support, extending it so that branch.<name>.remote items referring '.' can be created. Finally, it fixes a typo in git-checkout.sh. Signed-off-by: Paolo Bonzini <bonzini@gnu.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
* | | | Merge GIT 1.5.0.4Junio C Hamano2007-03-14
|\ \ \ \ | |/ / /
| * | | GIT 1.5.0.4v1.5.0.4Junio C Hamano2007-03-14
| | | | | | | | | | | | | | | | Signed-off-by: Junio C Hamano <junkio@cox.net>