swh:1:snp:6df5a50b8107b6bbe1e51d0239d816a7503c536a

sort by:
Revision Author Date Message Commit Date
8e1db38 GIT 1.6.0-rc1 Signed-off-by: Junio C Hamano <gitster@pobox.com> 27 July 2008, 22:07:56 UTC
81dc230 git-mv: Keep moved index entries inact The rewrite of git-mv from a shell script to a builtin was perhaps a little too straightforward: the git add and git rm queues were emulated directly, which resulted in a rather complicated code and caused an inconsistent behaviour when moving dirty index entries; git mv would update the entry based on working tree state, except in case of overwrites, where the new entry would still have sha1 of the old file. This patch introduces rename_index_entry_at() into the index toolkit, which will rename an entry while removing any entries the new entry might render duplicate. This is then used in git mv instead of all the file queues, resulting in a major simplification of the code and an inevitable change in git mv -n output format. Also the code used to refuse renaming overwriting symlink with a regular file and vice versa; there is no need for that. A few new tests have been added to the testsuite to reflect this change. Signed-off-by: Petr Baudis <pasky@suse.cz> Signed-off-by: Junio C Hamano <gitster@pobox.com> 27 July 2008, 22:05:19 UTC
f6c52fe git-mv: Remove dead code branch The path list builder had a branch for the case the source is not in index, but this can happen only if the source was a directory. However, in that case we have already expanded the list to the directory contents and set mode to WORKING_DIRECTORY, which is tested earlier. The patch removes the superfluous branch and adds an assert() instead. git-mv testsuite still passes. Signed-off-by: Petr Baudis <pasky@suse.cz> Signed-off-by: Junio C Hamano <gitster@pobox.com> 27 July 2008, 22:05:19 UTC
a08c53a fsck: Don't require tmp_obj_ file names are 14 bytes in length Not all temporary file creation routines will ensure 14 bytes are used to generate the temporary file name. In C Git this may be true, but alternate implementations such as jgit are not always able to generate a temporary file name with a specific prefix and also ensure the file name length is 14 bytes long. Since temporary files in a directory we are fsck'ing should be uncommon (as they are short lived only long enough for an active writer to finish writing the file and rename it) we shouldn't see these show up very often. Always using a prefixcmp() call and ignoring the length opens up room for other implementations to use different name generation schemes. Signed-off-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <gitster@pobox.com> 27 July 2008, 21:49:26 UTC
f5d600e Avoid chdir() in list_commands_in_dir() The function list_commands_in_dir() tried to be lazy and just chdir() to the directory which entries it listed, so that the check if the file is executable could be done on dir->d_name. However, there is no good reason to jump around wildly just to find all Git commands. Instead, have a strbuf and construct the full path dynamically. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com> 27 July 2008, 21:14:38 UTC
b6f637d builtin-branch: fix -v for --[no-]merged After the optimization to --[no-]merged logic, the calculation of the width of the longest refname to be shown might become inaccurate (since the matching against merge_filter is performed after adding refs to ref_list). This patch forces a recalculation of maxwidth when it might be needed. Signed-off-by: Lars Hjemli <hjemli@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com> 27 July 2008, 21:14:01 UTC
7950cda builtin-branch: factor out merge_filter matching The logic for checking commits against merge_filter will be reused when we recalculate the maxwidth of refnames. Signed-off-by: Lars Hjemli <hjemli@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com> 27 July 2008, 21:14:01 UTC
346d437 builtin-branch: remove duplicated code The previous optimization to --[no-]merged ended up with some duplicated code which this patch removes. Signed-off-by: Lars Hjemli <hjemli@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com> 27 July 2008, 21:14:01 UTC
2122f8b rev-parse: Add support for the ^! and ^@ syntax Those shorthands are explained in the rev-parse documentation but were not actually supported by rev-parse itself. gitk internally uses rev-parse to interpret its command line arguments, and being able to use these "limit with parents" syntax is handy there. Signed-off-by: Björn Steinbrink <B.Steinbrink@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com> 27 July 2008, 21:14:01 UTC
47c6ef1 make sure parsed wildcard refspec ends with slash A wildcard refspec is internally parsed into a refspec structure with src and dst strings. Many parts of the code assumed that these do not include the trailing "/*" when matching the wildcard pattern with an actual ref we see at the remote. What this meant was that we needed to make sure not just that the prefix matched, and also that a slash followed the part that matched. But a codepath that scans the result from ls-remote and finds matching refs forgot to check the "matching part must be followed by a slash" rule. This resulted in "refs/heads/b1" from the remote side to mistakenly match the source side of "refs/heads/b/*:refs/remotes/b/*" refspec. Worse, the refspec crafted internally by "git-clone", and a hardcoded preparsed refspec that is used to implement "git-fetch --tags", violated this "parsed widcard refspec does not end with slash" rule; simply adding the "matching part must be followed by a slash" rule then would have broken codepaths that use these refspecs. This commit changes the rule to require a trailing slash to parsed wildcard refspecs. IOW, "refs/heads/b/*:refs/remotes/b/*" is parsed as src = "refs/heads/b/" and dst = "refs/remotes/b/". This allows us to simplify the matching logic because we only need to do a prefixcmp() to notice "refs/heads/b/one" matches and "refs/heads/b1" does not. Acked-by: Daniel Barkalow <barkalow@iabervon.org> Signed-off-by: Junio C Hamano <gitster@pobox.com> 27 July 2008, 21:14:01 UTC
ef115e2 gitweb: More about how gitweb gets 'owner' of repository Signed-off-by: Jakub Narebski <jnareb@gmail.com> Acked-by: Petr Baudis <pasky@suse.cz> Signed-off-by: Junio C Hamano <gitster@pobox.com> 27 July 2008, 21:14:01 UTC
b890fa3 t6030 (bisect): work around Mac OS X "ls" t6030-bisect-porcelain.sh relies on "ls" exiting with nonzero status when asked to list nonexistent files. Unfortunately, /bin/ls on Mac OS X 10.3 exits with exit code 0. So look at its output instead. Signed-off-by: Jonathan Nieder <jrnieder@uchicago.edu> Acked-by: Christian Couder <chriscool@tuxfamily.org> Signed-off-by: Junio C Hamano <gitster@pobox.com> 27 July 2008, 21:14:01 UTC
77ef80a Documentation/git-submodule.txt: fix doubled word Signed-off-by: Cesar Eduardo Barros <cesarb@cesarb.net> Signed-off-by: Junio C Hamano <gitster@pobox.com> 27 July 2008, 21:14:01 UTC
1eb7e2f bash completion: Add completion for 'git help' Rename cached __git_commandlist to __git_porcelain_commandlist and add __git_all_commandlist that only filters out *--* helpers. Completions for 'git help' will use the __git_all_commandlist, while the __git_porcelain_commandlist is used for git command completion. Users who actually read man pages may want to see help for plumbing commands. Signed-off-by: Lee Marlow <lee.marlow@gmail.com> Acked-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <gitster@pobox.com> 27 July 2008, 21:14:01 UTC
6bb9e51 Documentation: fix diff.external example The diff.external examples pass a flag to gnu-diff, but GNU diff does not follow the GIT_EXTERNAL_DIFF interface. Signed-off-by: Anders Melchiorsen <mail@cup.kalibalik.dk> Signed-off-by: Junio C Hamano <gitster@pobox.com> 27 July 2008, 21:14:00 UTC
cbb504c bash completion: Add long options for 'git describe' Signed-off-by: Thomas Rast <trast@student.ethz.ch> Acked-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <gitster@pobox.com> 27 July 2008, 21:14:00 UTC
35faca1 Clarify that "git log x.c y.h" lists commits that touch either file Signed-off-by: Abhijit Menon-Sen <ams@toroid.org> Signed-off-by: Junio C Hamano <gitster@pobox.com> 27 July 2008, 21:14:00 UTC
392f130 Merge git://repo.or.cz/git-gui * git://repo.or.cz/git-gui: git-gui: "Stage Line": Treat independent changes in adjacent lines better git-gui: Fix "Stage/Unstage Line" with one line of context. git-gui: Correct 'Visualize Branches' on Mac OS X to start gitk git-gui: Look for gitk in $PATH, not $LIBEXEC/git-core Add a menu item to invoke full copy detection in blame. Kill the blame back-end on window close. Add options to control the search for copies in blame. Fix pre-commit hooks under MinGW/MSYS 27 July 2008, 21:09:25 UTC
c7f7457 git-gui: "Stage Line": Treat independent changes in adjacent lines better Assume that we want to commit these states: Old state == HEAD Intermediate state New state -------------------------------------------------------- context before context before context before old 1 new 1 new 1 old 2 old 2 new 2 context after context after context after that is, want to commit two changes in this order: 1. transform "old 1" into "new 1" 2. transform "old 2" into "new 2" [This discussion and this patch is about this very case and one other case as outlined below; any other intermediate states that one could imagine are not affected by this patch.] Now assume further, that we have not staged and commited anything, but we have already changed the working file to the new state. Then we will see this hunk in the "Unstaged Changes": @@ -1,4 +1,4 @@ context before -old 1 -old 2 +new 1 +new 2 context after The obvious way to stage the intermediate state is to apply "Stage This Line" to "-old 1" and "+new 1". Unfortunately, this resulted in this intermediate state: context before old 2 new 1 context after which is not what we wanted. In fact, it was impossible to stage the intermediate state using "Stage Line". The crux was that if a "+" line was staged, then the "-" lines were converted to context lines and arranged *before* the "+" line in the forged hunk that we fed to 'git apply'. With this patch we now treat "+" lines that are staged differently. In particular, the "-" lines before the "+" block are moved *after* the staged "+" line. Now it is possible to get the correct intermediate state by staging "-old 1" and "+new 1". Problem solved. But there is a catch. Noticing that we didn't get the right intermediate state by staging "-old 1" and "+new 1", we could have had the idea to stage the complete hunk and to *unstage* "-old 2" and "+new 2". But... the result is the same. The reason is that there is the exact symmetric problem with unstaging the last "-" and "+" line that are in adjacent blocks of "-" and "+" lines. This patch does *not* change the way in which "-" lines are *unstaged*. Why? Because if we did (i.e. move "+" lines before the "-" line after converting them to context lines), then it would be impossible to stage this intermediate state: context before old 1 new 2 context after that is, it would be impossible to stage the two independet changes in the opposite order. Let's look at this case a bit further: The obvious way to get this intermediate state would be to apply "Stage This Line" to "-old 2" and "+new 2". Before this patch, this worked as expected. With this patch, it does not work as expected, but it can still be achieved by first staging the entire hunk, then *unstaging* "-old 1" and "+new 1". In summary, this patch makes a common case possible, at the expense that a less common case is made more complicated for the user. Signed-off-by: Johannes Sixt <johannes.sixt@telecom.at> Signed-off-by: Shawn O. Pearce <spearce@spearce.org> 26 July 2008, 23:43:08 UTC
fa6b5b3 git-gui: Fix "Stage/Unstage Line" with one line of context. To "Stage/Unstage Line" we construct a patch that contains exactly one change (either addition or removal); the hunk header was forged by counting the old side and adjusting the count by +/-1 for the new side. But when we counted the context we never counted the changed line itself. If the hunk had only one removal line and one line of context, like this: @@ -1,3 +1,2 @@ context 1 -removal context 2 We had constructed this patch: @@ -1,2 +1,1 @@ context 1 -removal context 2 which does not apply because git apply deduces that it must apply at the end of the file. ("context 2" is considered garbage and ignored.) The fix is that removal lines must be counted towards the context of the old side. Signed-off-by: Johannes Sixt <johannes.sixt@telecom.at> Signed-off-by: Shawn O. Pearce <spearce@spearce.org> 26 July 2008, 23:43:08 UTC
b0320ea git-reset: Let -q hush "locally modified" messages "git reset -q" is advertised to "only report errors", but "locally modified" messages are still shown. They are not errors but diagnostics. Signed-off-by: Stephan Beyer <s-beyer@gmx.net> Signed-off-by: Junio C Hamano <gitster@pobox.com> 26 July 2008, 00:57:22 UTC
128de65 git-svn: teach dcommit about svn auto-props Subversion repositories often require files to have properties such as svn:mime-type and svn:eol-style set when they are added. Users typically set these properties automatically using the SVN auto-props feature with 'svn add'. This commit teaches dcommit to look at the user SVN configuration and apply matching auto-props entries for files added by a diff as it is applied to the SVN remote. Signed-off-by: Brad King <brad.king@kitware.com> Acked-by: Eric Wong <normalperson@yhbt.net> Signed-off-by: Junio C Hamano <gitster@pobox.com> 26 July 2008, 00:54:19 UTC
7b4b59a Windows: Do not compile git-shell Signed-off-by: Johannes Sixt <johannes.sixt@telecom.at> Signed-off-by: Junio C Hamano <gitster@pobox.com> 26 July 2008, 00:41:13 UTC
35eeef4 Windows: Make sure argv[0] has a path Since the exec-path on Windows is derived from the program invocation path, we must ensure that argv[0] always has a path. Unfortunately, if a program is invoked from CMD, argv[0] has no path. But on the other hand, the C runtime offers a global variable, _pgmptr, that always has the full path to the program. We hook into main() with a preprocessor macro, where we replace argv[0]. Signed-off-by: Johannes Sixt <johannes.sixt@telecom.at> Signed-off-by: Junio C Hamano <gitster@pobox.com> 26 July 2008, 00:41:13 UTC
bf74a88 Windows: Make $(gitexecdir) relative Signed-off-by: Johannes Sixt <johannes.sixt@telecom.at> Signed-off-by: Junio C Hamano <gitster@pobox.com> 26 July 2008, 00:41:13 UTC
10c4c88 Allow add_path() to add non-existent directories to the path This function had used make_absolute_path(); but this function dies if the directory that contains the entry whose relative path was supplied in the argument does not exist. This is a problem if the argument is, for example, "../libexec/git-core", and that "../libexec" does not exist. Since the resolution of symbolic links is not required for elements in PATH, we can fall back to using make_nonrelative_path(), which simply prepends $PWD to the path. We have to move make_nonrelative_path() alongside make_absolute_path() in abspath.c so that git-shell can be linked. See 5b8e6f85f. Signed-off-by: Johannes Sixt <johannes.sixt@telecom.at> Signed-off-by: Junio C Hamano <gitster@pobox.com> 26 July 2008, 00:41:13 UTC
49fa65a Allow the built-in exec path to be relative to the command invocation path If GIT_EXEC_PATH (the macro that is defined in the Makefile) is relative, it is interpreted relative to the command's invocation path, which usually is $(bindir). The Makefile rules were written with the assumption that $(gitexecdir) is an absolute path. We introduce a separate variable that names the (absolute) installation directory. Signed-off-by: Johannes Sixt <johannes.sixt@telecom.at> Signed-off-by: Junio C Hamano <gitster@pobox.com> 26 July 2008, 00:41:13 UTC
966c6ed Fix relative built-in paths to be relative to the command invocation $(gitexecdir) (as defined in the Makefile) has gained another path component, but the relative paths in the MINGW section of the Makefile, which are interpreted relative to it, do not account for it. Instead of adding another ../ in front of the path, we change the code that constructs the absolute paths to do it relative to the command's directory, which is essentially $(bindir). We do it this way because we will also allow a relative $(gitexecdir) later. Signed-off-by: Johannes Sixt <johannes.sixt@telecom.at> Signed-off-by: Junio C Hamano <gitster@pobox.com> 26 July 2008, 00:41:13 UTC
e1464ca Record the command invocation path early We will need the command invocation path in system_path(). This path was passed to setup_path(), but system_path() can be called earlier, for example via: main commit_pager_choice setup_pager git_config git_etc_gitconfig system_path Therefore, we introduce git_set_argv0_path() and call it as soon as possible. Signed-off-by: Johannes Sixt <johannes.sixt@telecom.at> Signed-off-by: Junio C Hamano <gitster@pobox.com> 26 July 2008, 00:41:13 UTC
46beb55 Makefile: Normalize $(bindir) and $(gitexecdir) before comparing The install target needs to check whether the user has opted to make $(gitexecdir) equal to $(bindir). It did so by a straight string comparison. Since we are going to allow a relative $(gitexecdir), we have to normalize paths before comparison, which we do with $(cd there && pwd). The normalized paths are stored in shell variables. These we can now reuse in the subsequent install statements, which conveniently shortens the lines a bit. Signed-off-by: Johannes Sixt <johannes.sixt@telecom.at> Signed-off-by: Junio C Hamano <gitster@pobox.com> 26 July 2008, 00:41:12 UTC
c70a8d9 Makefile: Do not install a copy of 'git' in $(gitexecdir) There is already a copy in $(bindir). A subsequent patch will enable git to derive the exec-path from its invocation path. If git is invoked recursively, the first invocation puts the exec-path into PATH, so that the recursive invocation would find the instance in the exec-path. This second instance would again try to derive an exec-path from its invocation path, but would base its result on the wrong "bindir". We do install the copy of git first, but remove it later, so that we can use it as the source of the hardlinks for the builtins. Signed-off-by: Johannes Sixt <johannes.sixt@telecom.at> Signed-off-by: Junio C Hamano <gitster@pobox.com> 26 July 2008, 00:41:12 UTC
819b2b5 archive: allow --exec and --remote without equal sign Allow "--remote repo" and "--exec cmd" in addition to "--remote=repo" and "--exec=cmd" to make their usage consistent with parameters handled by parse_options(). Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx> Signed-off-by: Junio C Hamano <gitster@pobox.com> 26 July 2008, 00:28:40 UTC
f15f736 archive: declare struct archiver where it's needed Move the declaration of struct archiver to archive.c, as this is the only file left where it is used. Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx> Signed-off-by: Junio C Hamano <gitster@pobox.com> 26 July 2008, 00:21:04 UTC
7f4d051 archive: define MAX_ARGS where it's needed MAX_EXTRA_ARGS is not used anymore, so remove it. MAX_ARGS is used only in builtin-upload-archive.c, so define it there. Also report the actual value we're comparing against when the number of args is too big. Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx> Signed-off-by: Junio C Hamano <gitster@pobox.com> 26 July 2008, 00:20:55 UTC
c088543 archive: move parameter parsing code to archive.c write_archive() in archive.c is the only callsite for the command line parsing functions located in builtin-archive.c. Move them to the place where they are used, un-export them and make them static, as hinted at by Stephan. Cc: Stephan Beyer <s-beyer@gmx.net> Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx> Signed-off-by: Junio C Hamano <gitster@pobox.com> 26 July 2008, 00:18:06 UTC
6e94e68 archive: add write_archive() Both archive and upload-archive have to parse command line arguments and then call the archiver specific write function. Move the duplicate code to a new function, write_archive(). Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx> Signed-off-by: Junio C Hamano <gitster@pobox.com> 26 July 2008, 00:16:12 UTC
d3296e3 Remove references to git-fetch-pack from "git clone" documentation. "git clone" no longer calls "git-fetch-pack", so the documentation is a bit stale. Instead, state that the -u option is to be used when accessing a repository over ssh. Signed-off-by: Steve Haslam <shaslam@lastminute.com> Signed-off-by: Junio C Hamano <gitster@pobox.com> 26 July 2008, 00:10:32 UTC
09f8d05 git-am: Mention --abort in usage string part of OPTIONS_SPEC The three separate lines for --skip, --resolved and --abort are merged into one so that it is easy to see that they're alternative and related options. Signed-off-by: Stephan Beyer <s-beyer@gmx.net> Signed-off-by: Junio C Hamano <gitster@pobox.com> 26 July 2008, 00:10:20 UTC
837c876 Propagate -u/--upload-pack option of "git clone" to transport. The -u option to override the remote system's path to git-upload-pack was being ignored by "git clone"; caused by a missing call to transport_set_option to set TRANS_OPT_UPLOADPACK. Presumably this crept in when git-clone was converted from shell to C. Signed-off-by: Steve Haslam <shaslam@lastminute.com> Signed-off-by: Junio C Hamano <gitster@pobox.com> 26 July 2008, 00:10:14 UTC
7198203 editor.c: Libify launch_editor() This patch removes exit()/die() calls and builtin-specific messages from launch_editor(), so that it can be used as a general libgit.a function to launch an editor. Signed-off-by: Stephan Beyer <s-beyer@gmx.net> Signed-off-by: Junio C Hamano <gitster@pobox.com> 26 July 2008, 00:09:38 UTC
d82f33e Move launch_editor() from builtin-tag.c to editor.c launch_editor() is declared in strbuf.h but defined in builtin-tag.c. This patch moves launch_editor() into a new source file editor.c, but keeps the declaration in strbuf.h. Signed-off-by: Stephan Beyer <s-beyer@gmx.net> Signed-off-by: Junio C Hamano <gitster@pobox.com> 26 July 2008, 00:08:34 UTC
7838d3f git-gui: Correct 'Visualize Branches' on Mac OS X to start gitk In Git 1.6 and later gitk is in $prefix/bin while git-gui and all of the other commands are in $gitexecdir, which is typically not the same as $prefix/bin. So we cannot launch $gitexecdir/gitk and expect it to actually start gitk properly. By allowing git-gui to locate the script via $PATH and then using exactly that path when we source it during the application start we can correctly run gitk on any Git 1.5 or later. Signed-off-by: Shawn O. Pearce <spearce@spearce.org> 25 July 2008, 22:08:33 UTC
15430be git-gui: Look for gitk in $PATH, not $LIBEXEC/git-core Signed-off-by: Abhijit Menon-Sen <ams@toroid.org> Signed-off-by: Shawn O. Pearce <spearce@spearce.org> 25 July 2008, 21:58:31 UTC
d9d9e6e Merge branch 'maint' * maint: Makefile: fix shell quoting tests: propagate $(TAR) down from the toplevel Makefile index-pack.c: correctly initialize appended objects send-email: find body-encoding correctly 25 July 2008, 20:56:36 UTC
c921cc9 Documentation: clarify how to disable elements in core.whitespace Noticed by Peter Valdemar Mørch. Signed-off-by: Junio C Hamano <gitster@pobox.com> 25 July 2008, 20:56:21 UTC
bfce508 Makefile: fix shell quoting Makefile records paths to a few programs in GIT-BUILD-OPTIONS file. These paths need to be quoted twice: once to protect specials from the shell that runs the generated GIT-BUILD-OPTIONS file, and again to protect them (and the first level of quoting itself) from the shell that runs the "echo" inside the Makefile. You can test this by trying: $ ln -s /bin/tar "$HOME/Tes' program/tar" $ make TAR="$HOME/Tes' program/tar" test Signed-off-by: Junio C Hamano <gitster@pobox.com> 25 July 2008, 19:36:16 UTC
c30e699 tests: propagate $(TAR) down from the toplevel Makefile Signed-off-by: Junio C Hamano <gitster@pobox.com> 25 July 2008, 18:09:48 UTC
72de288 index-pack.c: correctly initialize appended objects When index-pack completes a thin pack it appends objects to the pack. Since the commit 92392b4(index-pack: Honor core.deltaBaseCacheLimit when resolving deltas) such an object can be pruned in case of memory pressure, and will be read back again by get_data_from_pack(). For this to work, the fields in object_entry structure need to be initialized properly. Noticed by Pierre Habouzit. Signed-off-by: Björn Steinbrink <B.Steinbrink@gmx.de> Acked-by: Nicolas Pitre <nico@cam.org> Acked-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <gitster@pobox.com> 25 July 2008, 17:46:46 UTC
8892048 send-email: find body-encoding correctly In 8291db6 (git-send-email: add charset header if we add encoded 'From', 2007-11-16), "$1" is used from a regexp without using () to capture anything in $1. Later, when that value was used, it causes a warning about a variable being undefined, instead of using the correct value for comparison (not that it makes difference in the current code that does not do actual re-encoding). Signed-off-by: Peter Valdemar Mørch <peter@morch.com> Signed-off-by: Junio C Hamano <gitster@pobox.com> 25 July 2008, 16:27:13 UTC
a2d07d8 document that git-tag can tag more than heads After looking the git-tag manpage, someone on #git wondered how to tag a commit that is not a branch head. This patch changes the synopsis to say "<commit> | <object>" instead of "<head>" to address his question. Samuel Bronson had the idea of putting "<commit> | <object>" for "<object>" because most tags point to commits (and for the rest of the manpage, all tags point to commits). Signed-off-by: Jonathan Nieder <jrnieder@uchicago.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com> 25 July 2008, 07:26:44 UTC
058fb41 perl/Makefile: update NO_PERL_MAKEMAKER section The perl modules must be copied to blib/lib so they are available for testing. Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil> Signed-off-by: Junio C Hamano <gitster@pobox.com> 25 July 2008, 07:08:56 UTC
c84bb14 bash: offer only paths after '--' for 'git checkout' Commit d773c631 (bash: offer only paths after '--', 2008-07-08) did the same for several other git commands, but 'git checkout' went unnoticed. Signed-off-by: SZEDER Gábor <szeder@ira.uka.de> Signed-off-by: Junio C Hamano <gitster@pobox.com> 25 July 2008, 06:29:50 UTC
b302ddd checkout: mention '--' in the docs 'git checkout' uses '--' to separate options from paths, but it was not mentioned in the documentation Signed-off-by: SZEDER Gábor <szeder@ira.uka.de> Signed-off-by: Junio C Hamano <gitster@pobox.com> 25 July 2008, 06:29:38 UTC
99ea66e Merge branch 'ph/checkout' * ph/checkout: git-checkout: improve error messages, detect ambiguities. git-checkout: fix command line parsing. 25 July 2008, 06:24:17 UTC
859fdab git-checkout: improve error messages, detect ambiguities. The patch is twofold: it moves the option consistency checks just under the parse_options call so that it doesn't get in the way of the tree reference vs. pathspecs desambiguation. The other part rewrites the way to understand arguments so that when git-checkout fails it does with an understandable message. Compared to the previous behavior we now have: - a better error message when doing: git checkout <blob reference> -- now complains about the reference not pointing to a tree, instead of things like: error: pathspec <blob reference> did not match any file(s) known to git. error: pathspec '--' did not match any file(s) known to git. - a better error message when doing: git checkout <path> -- It now complains about <path> not being a reference instead of the completely obscure: error: pathspec '--' did not match any file(s) known to git. - an error when -- wasn't used, and the first argument is ambiguous (i.e. can be interpreted as both ref and as path). Signed-off-by: Pierre Habouzit <madcoder@debian.org> Signed-off-by: Junio C Hamano <gitster@pobox.com> 25 July 2008, 06:24:00 UTC
9944d1a update test case to protect am --skip behaviour Signed-off-by: Olivier Marin <dkr@freesurf.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com> 25 July 2008, 06:09:09 UTC
0e8316c Teach fsck and prune about the new location of temporary objects Since 5723fe7e, temporary objects are now created in their final destination directories, rather than in .git/objects/. Teach fsck to recognize and ignore the temporary objects it encounters, and teach prune to remove them. Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil> Signed-off-by: Junio C Hamano <gitster@pobox.com> 25 July 2008, 06:08:07 UTC
6536034 Merge branch 'maint' into ph/checkout * maint: git-checkout: fix command line parsing. 24 July 2008, 01:42:24 UTC
186458b Make non-static functions, that may be static, static Signed-off-by: Stephan Beyer <s-beyer@gmx.net> Signed-off-by: Junio C Hamano <gitster@pobox.com> 24 July 2008, 01:38:14 UTC
0c4cd7f ignore non-existent refs in dwim_log() f2eba66 (Enable HEAD@{...} and make it independent from the current branch, 2007-02-03) introduced dwim_log() to handle <refname>@{...} syntax, and as part of its processing, it checks if the ref exists by calling refsolve_ref(). It should call it as a reader to make sure the call returns NULL for a nonexistent ref (not as a potential writer in which case it does not return NULL). Signed-off-by: Junio C Hamano <gitster@pobox.com> 24 July 2008, 01:11:04 UTC
2ca880f git-completion.bash: provide completion for 'show-branch' It previously used the same as 'log', but the options are quite different and the arguments must be single refs (or globs). Signed-off-by: Thomas Rast <trast@student.ethz.ch> Signed-off-by: Junio C Hamano <gitster@pobox.com> 24 July 2008, 00:06:36 UTC
08c701d bash completion: Add long options for 'git rm' Options added: --cached --dry-run --ignore-unmatch --quiet Signed-off-by: Lee Marlow <lee.marlow@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com> 24 July 2008, 00:06:30 UTC
e8a43a1 svnimport: newer libsvn wants us to ask for the root with "", not "/" In r27729, libsvn introduced an assert which explicitly forbids searching the tree at "/". Luckily enough, it still accepts an empty string "" as the starting point. http://svn.collab.net/viewvc/svn/trunk/subversion/libsvn_ra/ra_loader.c?r1=27653&r2=27729 Tested against libsvn0-1.5.0-4mdv2009.0 (needs the fix), libsvn0-1.4.6-5mdv2008.1 (works anyway) Signed-off-by: P. Christeas <p_christ@hol.gr> Signed-off-by: Junio C Hamano <gitster@pobox.com> 23 July 2008, 23:58:09 UTC
eb72a51 Documentation/git-filter-branch: teach "rm" instead of "update-index --remove" The example to remove paths using index-filter was done with "git update-index --remove"; "git rm --cached" would be more familiar to new people and is sufficient for this particular case. Signed-off-by: Petr Baudis <pasky@suse.cz> Signed-off-by: Junio C Hamano <gitster@pobox.com> 23 July 2008, 23:57:14 UTC
f9bbefc git daemon: avoid waking up too often To avoid waking up unnecessarily, a pipe is set up that is only ever written to by child_handler(), when a child disconnects, as suggested per Junio. This avoids waking up the main process every second to see if a child was disconnected. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com> 23 July 2008, 23:57:14 UTC
3b6aeb3 builtin-commit: Two trivial style-cleanups Pierre Habouzit noticed that two variables were not static which should have been, and that adding "\n\n" is better than adding '\n' twice. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com> 23 July 2008, 23:57:14 UTC
ea3d988 Documentation: clarify diff --cc The definition of an "uninteresting" hunk was not in line with reality. Signed-off-by: Junio C Hamano <gitster@pobox.com> 23 July 2008, 23:57:13 UTC
a31c00b am --abort: Add to bash-completion and mention in git-rerere documentation The git-rerere documentation talks about commands that invoke "git rerere clear" automatically. git am --abort is added and a typo is fixed additionally. Signed-off-by: Stephan Beyer <s-beyer@gmx.net> Signed-off-by: Junio C Hamano <gitster@pobox.com> 23 July 2008, 23:57:09 UTC
a4661b0 git-filter-branch.sh: Allow running in bare repositories Commit 46eb449c restricted git-filter-branch to non-bare repositories unnecessarily; git-filter-branch can work on bare repositories just fine. Cc: Johannes Schindelin <Johannes.Schindelin@gmx.de> Signed-off-by: Petr Baudis <pasky@suse.cz> Signed-off-by: Junio C Hamano <gitster@pobox.com> 23 July 2008, 23:57:04 UTC
68067ca builtin-branch.c: optimize --merged and --no-merged "git branch --no-merged $commit" used to compute the merge base between the tip of each and every branch with the named $commit, but this was wasteful when you have many branches. Inside append_ref() we literally ran has_commit() between the tip of the branch and the merge_filter_ref. Instead, we can let the revision machinery traverse the history as if we are running: $ git rev-list --branches --not $commit by queueing the tips of branches we encounter as positive refs (this mimicks the "--branches" option in the above command line) and then appending the merge_filter_ref commit as a negative one, and finally calling prepare_revision_walk() to limit the list.. After the traversal is done, branch tips that are reachable from $commit are painted UNINTERESTING; they are already fully contained in $commit (i.e. --merged). Tips that are not painted UNINTERESTING still have commits that are not reachable from $commit, thus "--no-merged" will show them. With an artificial repository that has "master" and 1000 test-$i branches where they were created by "git branch test-$i master~$i": (with patch) $ /usr/bin/time git-branch --no-merged master >/dev/null 0.12user 0.02system 0:00.15elapsed 99%CPU (0avgtext+0avgdata 0maxresident)k 0inputs+0outputs (0major+1588minor)pagefaults 0swaps $ /usr/bin/time git-branch --no-merged test-200 >/dev/null 0.15user 0.03system 0:00.18elapsed 100%CPU (0avgtext+0avgdata 0maxresident)k 0inputs+0outputs (0major+1711minor)pagefaults 0swaps (without patch) $ /usr/bin/time git-branch --no-merged master >/dev/null 0.69user 0.03system 0:00.72elapsed 100%CPU (0avgtext+0avgdata 0maxresident)k 0inputs+0outputs (0major+2229minor)pagefaults 0swaps $ /usr/bin/time git-branch --no-merged test-200 >/dev/null 0.58user 0.03system 0:00.61elapsed 100%CPU (0avgtext+0avgdata 0maxresident)k 0inputs+0outputs (0major+2248minor)pagefaults 0swaps Signed-off-by: Junio C Hamano <gitster@pobox.com> 23 July 2008, 23:57:04 UTC
0f31d68 builtin-branch.c: remove unused code in append_ref() callback function We let for_each_ref() to feed all refs to append_ref() but we are only ever interested in local or remote tracking branches. Signed-off-by: Junio C Hamano <gitster@pobox.com> 23 July 2008, 23:57:03 UTC
47629dc stash save: fix parameter handling A command line "git stash save --keep-index I was doing this" was misparsed and keep-index codepath did not trigger. Signed-off-by: Junio C Hamano <gitster@pobox.com> 23 July 2008, 23:57:03 UTC
c8fe198 git-am: Add colon before the subject that is printed out as being applied git-am output can be confusing, because the subject of the applied patch can look like the rest of a sentence starting with "Applying". The added colon should make this clearer. Signed-off-by: Stephan Beyer <s-beyer@gmx.net> Signed-off-by: Junio C Hamano <gitster@pobox.com> 23 July 2008, 19:31:37 UTC
f5242eb git-checkout: fix command line parsing. This fixes an issue when you use: $ git checkout -- <path1> [<paths>...] and that <path1> can also be understood as a reference. git-checkout mistakenly understands this as the same as: $ git checkout <path1> -- [<paths>...] because parse-options was eating the '--' and the argument parser thought he was parsing: $ git checkout <path1> [<paths>...] Where there indeed is an ambiguity Signed-off-by: Pierre Habouzit <madcoder@debian.org> Signed-off-by: Junio C Hamano <gitster@pobox.com> 23 July 2008, 19:09:47 UTC
a8ccc20 rebase -i: When an 'edit' stops, mention the commit In a rebase session where more than one commit is to be 'edit'ed, and the user spends considerable time to 'edit' a commit, it is easy to forget what one wanted to 'edit' at the individual commits. It would be helpful to see at which commit the rebase stopped. Incidentally, if the rebase stopped due to merge conflicts or other errors, the commit was already reported ("Could not apply $sha1..."), but when rebase stopped after successfully applying an "edit" commit, it would not mention it. With this change the commit is reported. Signed-off-by: Johannes Sixt <johannes.sixt@telecom.at> Signed-off-by: Junio C Hamano <gitster@pobox.com> 23 July 2008, 19:02:57 UTC
e358f3c sort_in_topological_order(): avoid setting a commit flag We used to set the TOPOSORT flag of commits during the topological sorting, but we can just as well use the member "indegree" for it: indegree is now incremented by 1 in the cases where the commit used to have the TOPOSORT flag. This is the same behavior as before, since indegree could not be non-zero when TOPOSORT was unset. Incidentally, this fixes the bug in show-branch where the 8th column was not shown: show-branch sorts the commits in topological order, assuming that all the commit flags are available for show-branch's private matters. But this was not true: TOPOSORT was identical to the flag corresponding to the 8th ref. So the flags for the 8th column were unset by the topological sorting. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com> 23 July 2008, 19:00:21 UTC
ce567d1 Add test to show that show-branch misses out the 8th column Noticed by Pasky. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com> 23 July 2008, 18:52:21 UTC
7d90c8e Ignore dirty submodule states in "git pull --rebase" This is a companion patch to 6848d58c(Ignore dirty submodule states during rebase and stash). Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com> 23 July 2008, 18:36:56 UTC
c65233f t/t4202-log.sh: add newline at end of file Some shells hang when parsing the script if the last statement is not followed by a newline. So add one. Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil> Signed-off-by: Junio C Hamano <gitster@pobox.com> 23 July 2008, 18:36:41 UTC
09b78bc t7502-commit.sh: rearrange test to make more portable Some shells have problems with one-shot environment variable export and function calls. The sequence is rearranged to avoid the one-shot and to allow the test script to be linked together with '&&'. Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil> Signed-off-by: Junio C Hamano <gitster@pobox.com> 23 July 2008, 18:36:31 UTC
03b9dfb t3200,t7201: replace '!' with test_must_fail Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil> Signed-off-by: Junio C Hamano <gitster@pobox.com> 23 July 2008, 18:35:23 UTC
9a885fa t4116-apply-reverse.sh: use $TAR rather than tar Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil> Signed-off-by: Junio C Hamano <gitster@pobox.com> 23 July 2008, 18:35:16 UTC
2b14d07 t/: Replace diff [-u|-U0] with test_cmp to allow compilation with old diff Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil> Signed-off-by: Junio C Hamano <gitster@pobox.com> 23 July 2008, 18:35:01 UTC
4d175ef t7601: extend the 'merge picks up the best result' test The test only checked if the best result picking code works if there are multiple strategies set in the config. Add a similar one that tests if the same true if the -s option of git merge was used multiple times. Signed-off-by: Miklos Vajna <vmiklos@frugalware.org> Signed-off-by: Junio C Hamano <gitster@pobox.com> 23 July 2008, 18:33:40 UTC
2d71bde In perforce, RCS keywords are case-sensitive At least, this is true in 2007.2, according to the documentation. Signed-off-by: Daniel Barkalow <barkalow@iabervon.org> Signed-off-by: Junio C Hamano <gitster@pobox.com> 23 July 2008, 18:33:34 UTC
8f0359f Allow pager of diff command be enabled/disabled See for example, status and show commands. Besides, Documentation/RelNotes-1.6.0.txt mentions that pager.<cmd> can be used to enable/disable paging behavior per command. Signed-off-by: Alex Riesen <raa.lkml@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com> 23 July 2008, 18:14:47 UTC
0dda1d1 Fix two leftovers from path_list->string_list In the documentation, where you cannot get compile errors for using the wrong member name, there were two mentions of 'path' left. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com> 22 July 2008, 22:28:22 UTC
95f8ebb git am --skip: clean the index while preserving local changes In 3-way merge, "am" will let the index with unmerged path waiting for us to resolve conflicts and continue. But if we want to --skip instead, "am" refuses to continue because of the dirty index. With this patch, "am" will clean the index without touching files locally modified, before continuing. Signed-off-by: Olivier Marin <dkr@freesurf.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com> 22 July 2008, 07:06:04 UTC
d1f63a3 git-submodule: move ill placed shift. When running git submodule update -i, the "-i" is shifted before recursing into cmd_init and then again outside of the loop. This causes some /bin/sh to complain about shifting when there are no arguments left (and would discard anything written after -i too). Signed-off-by: Pierre Habouzit <madcoder@debian.org> Signed-off-by: Junio C Hamano <gitster@pobox.com> 22 July 2008, 05:36:29 UTC
5d2299d builtin-merge: add missing structure initialization The parameter that is eventually passed to read_directory() to scan the working tree should be properly initialized. Signed-off-by: Pierre Habouzit <madcoder@debian.org> Signed-off-by: Junio C Hamano <gitster@pobox.com> 22 July 2008, 05:32:53 UTC
1719b5e builtin-merge: give a proper error message for invalid strategies in config 'git merge -s foobar' diagnosed invalid "foobar" strategy and errored out with a message, but foobar in pull.twohead or pull.octopus was just silently ignored. This makes invalid strategy both on the command line and in the configuration file to trigger the same error. Signed-off-by: Miklos Vajna <vmiklos@frugalware.org> Signed-off-by: Junio C Hamano <gitster@pobox.com> 22 July 2008, 05:29:46 UTC
ac2e28c tests: do not rely on external "patch" Some of our tests assumed a working "patch" command to produce expected results when checking "git-apply", but some systems have broken "patch". We can compare our output with expected output that is precomputed instead to sidestep this issue. Signed-off-by: Junio C Hamano <gitster@pobox.com> 22 July 2008, 04:33:16 UTC
c79cc2e Don't cut off last character of commit descriptions. This should have been part of 24a2293 (git-blame.el: show the when, who and what in the minibuffer., 2008-02-12), that changed from using --pretty=oneline to --pretty=format:... without terminating newline. Acked-by: David Kågedal <davidk@lysator.liu.se> Signed-off-by: Junio C Hamano <gitster@pobox.com> 22 July 2008, 04:21:51 UTC
d5d745f parse-options: fix segmentation fault when a required value is missing p->argc represent the number of arguments that have not been parsed yet, _including_ the one we are currently parsing. If it is not greater than one then there is no more argument. Signed-off-by: Olivier Marin <dkr@freesurf.fr> Acked-by: Pierre Habouzit <madcoder@debian.org> Signed-off-by: Junio C Hamano <gitster@pobox.com> 22 July 2008, 04:20:04 UTC
0d4ede9 mailinfo: better parse email adresses containg parentheses When using git-rebase, author fields containing a ')' at the last position had the close-parens character removed; the removal should be done only when it is of this form: user@host (User Name) i.e. the remainder after stripping the e-mail address part is enclosed in a parentheses pair as a whole, not for addresses like this: User Name (me) <user@host> Signed-off-by: Philippe Bruhat (BooK) <book@cpan.org> Acked-by: Lukas Sandström <lukass@etek.chalmers.se> Signed-off-by: Junio C Hamano <gitster@pobox.com> 22 July 2008, 03:09:12 UTC
75e1645 git-am: remove dash from help message Signed-off-by: Olivier Marin <dkr@freesurf.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com> 22 July 2008, 02:56:56 UTC
1076232 Revert "make git-status use a pager" This reverts commit c8af1de9cfa0a5678ae766777e0f905e60b69fda. The change was immensely unpopular, and poeple who would really want to page can use pager.status configuration. 22 July 2008, 02:41:17 UTC
e57c817 git-diff(1): "--c" -> "--cc" typo fix git diff does not take a --c option. Signed-off-by: Jonathan Nieder <jrnieder@uchicago.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com> 22 July 2008, 02:17:23 UTC
c455c87 Rename path_list to string_list The name path_list was correct for the first usage of that data structure, but it really is a general-purpose string list. $ perl -i -pe 's/path-list/string-list/g' $(git grep -l path-list) $ perl -i -pe 's/path_list/string_list/g' $(git grep -l path_list) $ git mv path-list.h string-list.h $ git mv path-list.c string-list.c $ perl -i -pe 's/has_path/has_string/g' $(git grep -l has_path) $ perl -i -pe 's/path/string/g' string-list.[ch] $ git mv Documentation/technical/api-path-list.txt \ Documentation/technical/api-string-list.txt $ perl -i -pe 's/strdup_paths/strdup_strings/g' $(git grep -l strdup_paths) ... and then fix all users of string-list to access the member "string" instead of "path". Documentation/technical/api-string-list.txt needed some rewrapping, too. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com> 22 July 2008, 02:11:50 UTC
51ef1da Rename .git/rebase to .git/rebase-apply With git-am, it sounds awkward to have the patches in ".git/rebase/", but for technical reasons, we have to keep the same directory name for git-am and git-rebase. ".git/rebase-apply" seems to be a good compromise. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com> 22 July 2008, 01:51:47 UTC
back to top