summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'jc/index-output'Junio C Hamano2007-04-0713-25/+66
|\ | | | | | | | | | | | | | | | | | | * jc/index-output: git-read-tree --index-output=<file> _GIT_INDEX_OUTPUT: allow plumbing to output to an alternative index file. Conflicts: builtin-apply.c
| * git-read-tree --index-output=<file>Junio C Hamano2007-04-036-16/+30
| | | | | | | | | | | | | | | | | | | | | | This corrects the interface mistake of the previous one, and gives a command line parameter to the only plumbing command that currently needs it: "git-read-tree". We can add the calls to set_alternate_index_output() to other plumbing commands that update the index if/when needed. Signed-off-by: Junio C Hamano <junkio@cox.net>
| * _GIT_INDEX_OUTPUT: allow plumbing to output to an alternative index file.Junio C Hamano2007-04-0313-23/+50
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When defined, this allows plumbing commands that update the index (add, apply, checkout-index, merge-recursive, mv, read-tree, rm, update-index, and write-tree) to write their resulting index to an alternative index file while holding a lock to the original index file. With this, git-commit that jumps the index does not have to make an extra copy of the index file, and more importantly, it can do the update while holding the lock on the index. However, I think the interface to let an environment variable specify the output is a mistake, as shown in the documentation. If a curious user has the environment variable set to something other than the file GIT_INDEX_FILE points at, almost everything will break. This should instead be a command line parameter to tell these plumbing commands to write the result in the named file, to prevent stupid mistakes. Signed-off-by: Junio C Hamano <junkio@cox.net>
* | Merge branch 'fp/make-j'Junio C Hamano2007-04-071-2/+2
|\ \ | | | | | | | | | | | | * fp/make-j: Makefile: Add '+' to QUIET_SUBDIR0 to fix parallel make.
| * | Makefile: Add '+' to QUIET_SUBDIR0 to fix parallel make.Fernando J. Pereda2007-04-051-2/+2
| | | | | | | | | | | | | | | Signed-off-by: Fernando J. Pereda <ferdy@gentoo.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
* | | Merge branch 'cc/bisect'Junio C Hamano2007-04-073-66/+199
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * cc/bisect: git-bisect: allow bisecting with only one bad commit. t6030: add a bit more tests to git-bisect git-bisect: modernization Documentation: bisect: "start" accepts one bad and many good commits Bisect: teach "bisect start" to optionally use one bad and many good revs.
| * | | git-bisect: allow bisecting with only one bad commit.Junio C Hamano2007-04-062-45/+59
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This allows you to say: git bisect start git bisect bad $bad git bisect next to start bisection without knowing a good commit. This would have you try a commit that is half-way since the beginning of the history, which is rather wasteful if you already know a good commit, but if you don't (or your history is short enough that you do not care), there is no reason not to allow this. Signed-off-by: Junio C Hamano <junkio@cox.net>
| * | | t6030: add a bit more tests to git-bisectJunio C Hamano2007-04-061-1/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Verify that git-bisect does not start before getting one bad and one good commit. Signed-off-by: Junio C Hamano <junkio@cox.net>
| * | | git-bisect: modernizationJunio C Hamano2007-04-051-5/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This slightly modernizes the bisect script to use show-ref/for-each-ref instead of looking into $GIT_DIR/refs files directly. Signed-off-by: Junio C Hamano <junkio@cox.net>
| * | | Documentation: bisect: "start" accepts one bad and many good commitsChristian Couder2007-04-051-4/+15
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Christian Couder <chriscool@tuxfamily.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
| * | | Bisect: teach "bisect start" to optionally use one bad and many good revs.Christian Couder2007-04-052-26/+99
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | One bad commit is fundamentally needed for bisect to run, and if we beforehand know more good commits, we can narrow the bisect space down without doing the whole tree checkout every time we give good commits. This patch implements: git bisect start [<bad> [<good>...]] [--] [<pathspec>...] as a short-hand for this command sequence: git bisect start git bisect bad $bad git bisect good $good1 $good2... On the other hand, there may be some confusion between revs (<bad> and <good>...) and <pathspec>... if -- is not used and if an invalid rev or a pathspec that looks like a rev is given. Signed-off-by: Christian Couder <chriscool@tuxfamily.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
* | | Merge branch 'jc/checkout' (early part)Junio C Hamano2007-04-072-3/+64
|\ \ \ | | | | | | | | | | | | | | | | * 'jc/checkout' (early part): checkout: allow detaching to HEAD even when switching to the tip of a branch
| * | | checkout: allow detaching to HEAD even when switching to the tip of a branchJunio C Hamano2007-04-032-3/+64
| | |/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | You cannot currently checkout the tip of an existing branch without moving to the branch. This allows you to detach your HEAD and place it at such a commit, with: $ git checkout master^0 Signed-off-by: Junio C Hamano <junkio@cox.net>
* | | Merge branch 'maint'Junio C Hamano2007-04-0711-67/+87
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * maint: Documentation: tighten dependency for git.{html,txt} Makefile: iconv() on Darwin has the old interface t5300-pack-object.sh: portability issue using /usr/bin/stat t3200-branch.sh: small language nit usermanual.txt: some capitalization nits Make builtin-branch.c handle the git config file rename_ref(): only print a warning when config-file update fails Distinguish branches by more than case in tests. Avoid composing too long "References" header. cvsimport: Improve formating consistency cvsimport: Reorder options in documentation for better understanding cvsimport: Improve usage error reporting cvsimport: Improve documentation of CVSROOT and CVS module determination cvsimport: sync usage lines with existing options Conflicts: Documentation/Makefile
| * | | Documentation: tighten dependency for git.{html,txt}Junio C Hamano2007-04-062-4/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Every time _any_ documentation page changed, cmds-*.txt files were regenerated, which caused git.{html,txt} to be remade. Try not to update cmds-*.txt files if their new contents match the old ones. Signed-off-by: Junio C Hamano <junkio@cox.net>
| * | | Makefile: iconv() on Darwin has the old interfaceArjen Laarhoven2007-04-061-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The libiconv on Darwin uses the old iconv() interface (2nd argument is a const char **, instead of a char **). Add OLD_ICONV to the Darwin variable definitions to handle this. Signed-off-by: Arjen Laarhoven <arjen@yaph.org> Acked-by: Brian Gernhardt <benji@silverinsanity.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
| * | | t5300-pack-object.sh: portability issue using /usr/bin/statArjen Laarhoven2007-04-061-5/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In the test 'compare delta flavors', /usr/bin/stat is used to get file size. This isn't portable. There already is a dependency on Perl, use its '-s' operator to get the file size. Signed-off-by: Arjen Laarhoven <arjen@yaph.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
| * | | t3200-branch.sh: small language nitArjen Laarhoven2007-04-061-1/+1
| | | | | | | | | | | | | | | | Signed-off-by: Junio C Hamano <junkio@cox.net>
| * | | usermanual.txt: some capitalization nitsArjen Laarhoven2007-04-061-4/+4
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Arjen Laarhoven <arjen@yaph.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
| * | | Make builtin-branch.c handle the git config fileLars Hjemli2007-04-062-10/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This moves the knowledge about .git/config usage out of refs.c and into builtin-branch.c instead, which allows git-branch to update HEAD to point at the moved branch before attempting to update the config file. It also allows git-branch to exit with an error code if updating the config file should fail. Signed-off-by: Lars Hjemli <hjemli@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
| * | | rename_ref(): only print a warning when config-file update failsLars Hjemli2007-04-061-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If git_config_rename_section() fails, rename_ref() used to return 1, which left HEAD pointing to an absent refs/heads file (since the actual renaming had already occurred). Signed-off-by: Lars Hjemli <hjemli@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
| * | | Distinguish branches by more than case in tests.Brian Gernhardt2007-04-061-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The renaming without config test changed a branch from q to Q, which fails on non-case sensitive file systems. Change the test to use q and q2. Signed-off-by: Junio C Hamano <junkio@cox.net>
| * | | Avoid composing too long "References" header.YOSHIFUJI Hideaki / 吉藤英明2007-04-061-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The number of characters in a line MUST be no more than 998 characters, and SHOULD be no more than 78 characters (RFC2822). It is much safer to fold the header by ourselves. Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
| * | | cvsimport: Improve formating consistencyFrank Lichtenheld2007-04-061-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Use ' ' syntax for all commandline options mentioned in text. Signed-off-by: Frank Lichtenheld <frank@lichtenheld.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
| * | | cvsimport: Reorder options in documentation for better understandingFrank Lichtenheld2007-04-061-27/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The current order the options are documented in makes no sense at all to me. Reorder them so that similar options are grouped together and also order them somehwhat by importance. Signed-off-by: Frank Lichtenheld <frank@lichtenheld.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
| * | | cvsimport: Improve usage error reportingFrank Lichtenheld2007-04-061-4/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Actually tell the user what he did wrong in case of usage errors instead of only printing the general usage information. Signed-off-by: Frank Lichtenheld <frank@lichtenheld.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
| * | | cvsimport: Improve documentation of CVSROOT and CVS module determinationFrank Lichtenheld2007-04-061-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Document the fact that git-cvsimport tries to find out CVSROOT from CVS/Root and $ENV{CVSROOT} and CVS_module from CVS/Repository. Also use ` ` syntax for all filenames for consistency. Signed-off-by: Frank Lichtenheld <frank@lichtenheld.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
| * | | cvsimport: sync usage lines with existing optionsFrank Lichtenheld2007-04-062-5/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Sync both the usage lines in the code and the asciidoc documentation with the real list of options. While all options seems to be documented in the asciidoc document, not all of them were listed in the usage line. Signed-off-by: Frank Lichtenheld <frank@lichtenheld.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
* | | | Merge branch 'maint'Junio C Hamano2007-04-0517-19/+98
|\ \ \ \ | |/ / / | | | / | |_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * maint: Fix lseek(2) calls with args 2 and 3 swapped Honor -p<n> when applying git diffs Fix dependency of common-cmds.h Fix renaming branch without config file DESTDIR support for git/contrib/emacs gitweb: Fix bug in "blobdiff" view for split (e.g. file to symlink) patches Document --left-right option to rev-list. Revert "builtin-archive: use RUN_SETUP" rename contrib/hooks/post-receieve-email to contrib/hooks/post-receive-email. rerere: make sorting really stable. Fix t4200-rerere for white-space from "wc -l"
| * | Fix lseek(2) calls with args 2 and 3 swappedDana How2007-04-052-2/+2
| | | | | | | | | | | | Signed-off-by: Junio C Hamano <junkio@cox.net>
| * | Honor -p<n> when applying git diffsShawn O. Pearce2007-04-052-2/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If the user is trying to apply a Git generated diff file and they have specified a -p<n> option, where <n> is not 1, the user probably has a good reason for doing this. Such as they are me, trying to apply a patch generated in git.git for the git-gui subdirectory to the git-gui.git repository, where there is no git-gui subdirectory present. Users shouldn't supply -p2 unless they mean it. But if they are supplying it, they probably have thought about how to make this patch apply to their working directory, and want to risk whatever results may come from that. Signed-off-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
| * | Fix dependency of common-cmds.hJunio C Hamano2007-04-051-1/+1
| | | | | | | | | | | | | | | | | | Say $(wildcard ...) when we mean it. Signed-off-by: Junio C Hamano <junkio@cox.net>
| * | Fix renaming branch without config fileGeert Bosch2007-04-052-2/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make git_config_rename_section return success if no config file exists. Otherwise, renaming a branch would abort, leaving the repository in an inconsistent state. [jc: test] Signed-off-by: Geert Bosch <bosch@gnat.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
| * | DESTDIR support for git/contrib/emacsVille Skyttä2007-04-051-2/+2
| | | | | | | | | | | | | | | | | | | | | make install DESTDIR=... support for git/contrib/emacs Signed-off-by: Ville Skyttä <scop@xemacs.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
| * | gitweb: Fix bug in "blobdiff" view for split (e.g. file to symlink) patchesJakub Narebski2007-04-051-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git_patchset_body needs patch generated with --full-index option to detect split patches, meaning two patches which corresponds to single difftree (raw diff) entry. An example of such situation is changing type (mode) of a file, e.g. from plain file to symbolic link. Add, in git_blobdiff, --full-index option to patch generating git diff invocation, for the 'html' format output ("blobdiff" view). "blobdiff_plain" still uses shortened sha1 in the extended git diff header "index <hash>..<hash>[ <mode>]" line. Noticed-by: Martin Koegler <mkoegler@auto.tuwien.ac.at> Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
| * | Document --left-right option to rev-list.Brian Gernhardt2007-04-052-0/+32
| | | | | | | | | | | | | | | | | | Explanation is paraphrased from "577ed5c... rev-list --left-right" Signed-off-by: Junio C Hamano <junkio@cox.net>
| * | Revert "builtin-archive: use RUN_SETUP"René Scharfe2007-04-053-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit 64edf4b2 cleaned up the initialization of git-archive, at the cost of 'git-archive --list' now requiring a git repo. This patch reverts the cleanup and documents the requirement for this particular dirtyness in a test. Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx> Signed-off-by: Junio C Hamano <junkio@cox.net>
| * | rename contrib/hooks/post-receieve-email to contrib/hooks/post-receive-email.Gerrit Pape2007-04-041-0/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | $ git grep post-receieve-email $ git grep post-receive-email templates/hooks--post-receive:#. /usr/share/doc/git-core/contrib/hooks/post-receive-email $ Signed-off-by: Gerrit Pape <pape@smarden.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
| * | rerere: make sorting really stable.Junio C Hamano2007-04-042-6/+10
| | | | | | | | | | | | | | | | | | | | | | | | The earlier code does not swap hunks when the beginning of the first side is identical to the whole of the second side. In such a case, the first one should sort later. Signed-off-by: Junio C Hamano <junkio@cox.net>
| * | Fix t4200-rerere for white-space from "wc -l"Brian Gernhardt2007-04-041-2/+2
| |/ | | | | | | | | | | | | | | | | | | | | On OS X, wc outputs 6 spaces before the number of lines, so the test expecting the string "10" failed. Do not quote $cmd to strip away the problematic whitespace as other tests do. Also fix the grammar of the test name while making changes to it. There's only one preimage, so it's "has", not "have". Signed-off-by: Junio C Hamano <junkio@cox.net>
* | Fix passing of TCLTK_PATH to git-guiAlex Riesen2007-04-051-1/+1
| | | | | | | | | | | | | | | | GNU make does not include environment variables by default in its namespace. Just pass them in make command line. Signed-off-by: Alex Riesen <raa.lkml@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
* | Rename add_file_to_index() to add_file_to_cache()Junio C Hamano2007-04-054-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This function was not called "add_file_to_cache()" only because an ancient program, update-cache, used that name as an internal function name that does something slightly different. Now that is gone, we can take over the better name. The plan is to name all functions that operate on the default index xxx_cache(). Later patches create a variant of them that take an explicit parameter xxx_index(), and then turn xxx_cache() functions into macros that use "the_index". Signed-off-by: Junio C Hamano <junkio@cox.net>
* | Rename static variable write_index to update_index in builtin-apply.cJunio C Hamano2007-04-051-6/+6
| | | | | | | | | | | | | | | | | | | | This is an internal variable used to tell if we need to write out the resulting index. I'll be introducing write_index() function which would collide with it. Signed-off-by: Junio C Hamano <junkio@cox.net>
* | Rename internal function "add_file_to_cache" in builtin-update-index.cJunio C Hamano2007-04-051-2/+2
| | | | | | | | | | | | | | | | I'd like to consistently name all index-layer functions that operate on the default index xxx_cache(), and this application specific function interferes with the plan. Signed-off-by: Junio C Hamano <junkio@cox.net>
* | Propagate cache error internal to refresh_cache() via parameter.Junio C Hamano2007-04-051-6/+13
| | | | | | | | | | | | | | | | | | | | The function refresh_cache() is the only user of cache_errno that switches its behaviour based on what internal function refresh_cache_entry() finds; pass the error status back in a parameter passed down to it, to get rid of the global variable cache_errno. Signed-off-by: Junio C Hamano <junkio@cox.net>
* | Fix bogus error message from merge-recursive error pathJunio C Hamano2007-04-053-3/+2
| | | | | | | | | | | | | | | | | | | | | | This error message should not usually trigger, but the function make_cache_entry() called by add_cacheinfo() can return early without calling into refresh_cache_entry() that sets cache_errno. Also the error message had a wrong function name reported, and it did not say anything about which path failed either. Signed-off-by: Junio C Hamano <junkio@cox.net>
* | Show binary file size change in diff --statAndy Parkins2007-04-051-3/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, a binary file in the diffstat would show as: some-binary-file.bin | Bin The space after the "Bin" was never used. This patch changes binary lines in the diffstat to be: some-binary-file.bin | Bin 12345 -> 123456 bytes The very nice "->" notation was suggested by Johannes Schindelin, and shows the before and after sizes more clearly than "+" and "-" would. If a size is 0 it's not shown (although it would probably be better to treat no-file differently from zero-byte-file). The user can see what changed in the binary file, and how big the new file is. This is in keeping with the information in the rest of the diffstat. The diffstat_t members "added" and "deleted" were unused when the file was binary, so this patch loads them with the file sizes in builtin_diffstat(). These figures are then read in show_stats() when the file is marked binary. Signed-off-by: Andy Parkins <andyparkins@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
* | Fix lost-found to show commits only referenced by reflogsShawn O. Pearce2007-04-053-3/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Prior to 1.5.0 the git-lost-found utility was useful to locate commits that were not referenced by any ref. These were often amends, or resets, or tips of branches that had been deleted. Being able to locate a 'lost' commit and recover it by creating a new branch was a useful feature in those days. Unfortunately 1.5.0 added the reflogs to the reachability analysis performed by git-fsck, which means that most commits users would consider to be lost are still reachable through a reflog. So most (or all!) commits are reachable, and nothing gets output from git-lost-found. Now git-fsck can be told to ignore reflogs during its reachability analysis, making git-lost-found useful again to locate commits that are no longer referenced by a ref itself, but may still be referenced by a reflog. Signed-off-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
* | clean up and optimize nth_packed_object_sha1() usageNicolas Pitre2007-04-056-25/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | Let's avoid the open coded pack index reference in pack-object and use nth_packed_object_sha1() instead. This will help encapsulating index format differences in one place. And while at it there is no reason to copy SHA1's over and over while a direct pointer to it in the index will do just fine. Signed-off-by: Nicolas Pitre <nico@cam.org> Acked-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
* | RPM spec: include git-p4 in the list of all packages.Junio C Hamano2007-04-041-1/+1
| | | | | | | | Signed-off-by: Junio C Hamano <junkio@cox.net>