summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* git-add/rm doc: Consistently back-quoteBjörn Gustavsson2009-12-072-15/+15
| | | | | | | Consistently back-quote commands, options and file names. Signed-off-by: Björn Gustavsson <bgustavsson@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* Documentation: 'git add -A' can remove filesBjörn Gustavsson2009-12-071-13/+20
| | | | | | | | | | | | | | | | | | | | The current documentation fails to mention that 'git add -A/--all' can remove files as well as add them, and it also does not say anything about filepatterns (whether they are allowed, mandatory, or optional). It is also not clear what the similarities and differences to the -u option are. Update the intro paragraph (as suggested by Junio, with some minor edits) to make it clear that 'git add' is able to delete and to also cover the -p option. Reword the description of -u to make it clearer (based on Björn Steinbrink's suggestion). Simplify the description of -A by saying "Like -u" and then describe the differences (based on the suggestions by Björn Steinbrink and Junio). Signed-off-by: Björn Gustavsson <bgustavsson@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* Git 1.6.5.5v1.6.5.5Junio C Hamano2009-12-054-5/+11
| | | | Signed-off-by: Junio C Hamano <gitster@pobox.com>
* Fix diff -B/--dirstat miscounting of newly added contentsLinus Torvalds2009-12-051-1/+10
| | | | | | | | | | | | | | | | | | | | | | | What used to happen is that diffcore_count_changes() simply ignored any hashes in the destination that didn't match hashes in the source. EXCEPT if the source hash didn't exist at all, in which case it would count _one_ destination hash that happened to have the "next" hash value. As a consequence, newly added material was often undercounted, making output from --dirstat and "complete rewrite" detection used by -B unrelialble. This changes it so that: - whenever it bypasses a destination hash (because it doesn't match a source), it counts the bytes associated with that as "literal added" - at the end (once we have used up all the source hashes), we do the same thing with the remaining destination hashes. - when hashes do match, and we use the difference in counts as a value, we also use up that destination hash entry (the 'd++'). Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* reset: improve worktree safety valvesJeff King2009-12-052-5/+33
| | | | | | | | | | | | | | | | | | | | The existing code checked to make sure we were not in a bare repository when doing a hard reset. However, we should take this one step further, and make sure we are in a worktree. Otherwise, we can end up munging files inside of '.git'. Furthermore, we should do the same check for --merge resets, which have the same properties. Actually, a merge reset of HEAD^ would already complain, since further down in the code we want a worktree. However, it is nicer to check up-front; then we are sure we cover all cases ("git reset --merge" would run, even though it wasn't doing anything) and we can give a more specific message. Add tests to t7103 to cover these cases and some missing ones. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* Documentation: Avoid use of xmlto --stringparamTodd Zullinger2009-12-053-11/+23
| | | | | | | | | | The --stringparam option is not available on older xmlto versions. Instead, set man.base.url.for.relative.links via a .xsl file. Older docbook versions will ignore this without causing grief to users of older xmlto versions. Signed-off-by: Todd Zullinger <tmz@pobox.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* archive: clarify description of path parameterRené Scharfe2009-12-041-2/+3
| | | | | | | | | | Mention that path parameters are based on the current working directory. Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx> -- Documentation/git-archive.txt | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) Signed-off-by: Junio C Hamano <gitster@pobox.com>
* rerere: don't segfault on failure to open rr-cacheJeff King2009-12-041-0/+2
| | | | | | | | | | | | The rr-cache directory should always exist if we are doing garbage collection (earlier code paths check this explicitly), but we may not necessarily succeed in opening it (for example, due to permissions problems). In that case, we should print an error message rather than simply segfaulting. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* Prepare for 1.6.5.5Junio C Hamano2009-12-031-0/+44
| | | | Signed-off-by: Junio C Hamano <gitster@pobox.com>
* Merge branch 'uk/maint-shortlog-encoding' into maintJunio C Hamano2009-12-032-9/+39
|\ | | | | | | | | | | * uk/maint-shortlog-encoding: t4201: use ISO8859-1 rather than ISO-8859-1 shortlog: respect commit encoding
| * t4201: use ISO8859-1 rather than ISO-8859-1Brandon Casey2009-12-031-2/+2
| | | | | | | | | | | | | | | | | | | | Some ancient platforms do not have an extensive list of alternate names for character encodings. For example, Solaris 7 and IRIX 6.5 do not know that ISO-8859-1 is the same as ISO8859-1. Modern platforms do know this, so use the older name. Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * shortlog: respect commit encodingUwe Kleine-König2009-11-252-9/+39
| | | | | | | | | | | | | | | | | | Don't take the author name information without re-encoding from the raw commit object buffer. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Cc: Jiri Kosina <jkosina@suse.cz> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | Merge branch 'fc/maint-format-patch-pathspec-dashes' into maintJunio C Hamano2009-12-032-1/+7
|\ \ | | | | | | | | | | | | | | | * fc/maint-format-patch-pathspec-dashes: format-patch: add test for parsing of "--" format-patch: fix parsing of "--" on the command line
| * | format-patch: add test for parsing of "--"Felipe Contreras2009-11-261-0/+5
| | | | | | | | | | | | | | | Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | format-patch: fix parsing of "--" on the command lineFelipe Contreras2009-11-261-1/+2
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | When given a pathspec that does not match any path in the current work tree with an explicit "--": git format-patch <commit> -- <path> the command still complains that <path> does not exist in the current work tree and the user needs to explicitly specify "--" and errors out. This is because it incorrectly removes "--" from the command line arguments that is later passed to setup_revisions(). Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | Merge branch 'ap/maint-merge-strategy-list-fix' into maintJunio C Hamano2009-12-031-1/+1
|\ \ | | | | | | | | | | | | * ap/maint-merge-strategy-list-fix: builtin-merge.c: call exclude_cmds() correctly.
| * | builtin-merge.c: call exclude_cmds() correctly.Avery Pennarun2009-11-291-1/+1
| |/ | | | | | | | | | | | | | | | | | | We need to call exclude_cmds() after the loop, not during the loop, because excluding a command from the array can change the indexes of objects in the array. The result is that, depending on file ordering, some commands weren't excluded as they should have been. Signed-off-by: Avery Pennarun <apenwarr@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | Merge branch 'jc/maint-am-keep' into maintJunio C Hamano2009-12-031-5/+6
|\ \ | | | | | | | | | | | | * jc/maint-am-keep: Remove dead code from "git am"
| * | Remove dead code from "git am"Junio C Hamano2009-11-271-5/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Ever since the initial implementation, "git am" had kept a dead code that never triggered due to a typo in the variable name. Worse yet, the code, if it weren't for the typo, would have attempted to add "[PATCH] " at the beginning of the Subject: header when "git am" is run with its "-k" option. However, because "git am -k" tells mailinfo to keep such prefix when parsing the input, the "[PATCH] " added by this dead code would have really been unnecessary duplicate. Embarrassing is that we kept _maintaining_ the codepath without anybody noticing for four years. Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | Merge branch 'rs/work-around-grep-opt-insanity' into maintJunio C Hamano2009-12-039-25/+32
|\ \ \ | | | | | | | | | | | | | | | | | | | | * rs/work-around-grep-opt-insanity: Protect scripted Porcelains from GREP_OPTIONS insanity mergetool--lib: simplify guess_merge_tool()
| * | | Protect scripted Porcelains from GREP_OPTIONS insanityJunio C Hamano2009-11-238-18/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If the user has exported the GREP_OPTIONS environment variable, the output from "grep" and "egrep" in scripted Porcelains may be different from what they expect. For example, we may want to count number of matching lines, by "grep" piped to "wc -l", and GREP_OPTIONS=-C3 will break such use. The approach taken by this change to address this issue is to protect only our own use of grep/egrep. Because we do not unset it at the beginning of our scripts, hook scripts run from the scripted Porcelains are exposed to the same insanity this environment variable causes when grep/egrep is used to implement logic (e.g. "grep | wc -l"), and it is entirely up to the hook scripts to protect themselves. On the other hand, applypatch-msg hook may want to show offending words in the proposed commit log message using grep to the end user, and the user might want to set GREP_OPTIONS=--color to paint the match more visibly. The approach to protect only our own use without unsetting the environment variable globally will allow this use case. Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | mergetool--lib: simplify guess_merge_tool()René Scharfe2009-11-231-7/+6
| | |/ | |/| | | | | | | | | | | | | | | | | | | | | | Use a case statement instead of calling grep to find out if the editor's name contains the string "vim". Remove the check for emacs, as this branch did the same as the default one anyway. Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | Merge branch 'rj/maint-cygwin-count-objects' into maintJunio C Hamano2009-12-031-0/+1
|\ \ \ | | | | | | | | | | | | | | | | * rj/maint-cygwin-count-objects: git-count-objects: Fix a disk-space under-estimate on Cygwin
| * | | git-count-objects: Fix a disk-space under-estimate on CygwinRamsay Jones2009-11-191-0/+1
| |/ / | | | | | | | | | | | | | | | | | | | | | Cygwin has st_blocks in struct stat, but at least on NTFS, the field counts in blocks of st_blksize bytes, not in 512-byte blocks. Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | Merge branch 'mm/maint-hint-failed-merge' into maintJunio C Hamano2009-12-035-3/+32
|\ \ \ | | | | | | | | | | | | | | | | | | | | * mm/maint-hint-failed-merge: user-manual: Document that "git merge" doesn't like uncommited changes. merge-recursive: point the user to commit when file would be overwritten.
| * | | user-manual: Document that "git merge" doesn't like uncommited changes.Matthieu Moy2009-11-221-2/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We explain the user why uncommited changes can be problematic with merge, and point to "commit" and "stash" for the solution. While talking about commited Vs uncommited changes, we also make it clear that the result of a merge is normally commited. Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | merge-recursive: point the user to commit when file would be overwritten.Matthieu Moy2009-11-224-1/+14
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | The commit-before-pull is well accepted in the DVCS community, but is confusing some new users. This should get them back in the right way when the problem occurs. Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | Merge branch 'th/maint-remote-update-help-string' into maintJunio C Hamano2009-12-031-1/+1
|\ \ \ | | | | | | | | | | | | | | | | * th/maint-remote-update-help-string: Update 'git remote update' usage string to match man page.
| * | | Update 'git remote update' usage string to match man page.Tim Henigan2009-11-151-1/+1
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | Commit b344e161 taught 'git remote update' to understand [group | remote] as its argument. The man page was updated to document this change, but the usage string was not. Signed-off-by: Tim Henigan <tim.henigan@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | Merge branch 'rj/maint-t9700' into maintJunio C Hamano2009-12-031-1/+1
|\ \ \ | | | | | | | | | | | | | | | | * rj/maint-t9700: t9700-perl-git.sh: Fix a test failure on Cygwin
| * | | t9700-perl-git.sh: Fix a test failure on CygwinRamsay Jones2009-11-191-1/+1
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The t/t9700/test.pl script uses method invocation syntax when using the Cwd module to determine the current working directory. This fails on cygwin, since cygwin perl specifically checks for any arguments to the cwd() function and croak()'s with the message "Usage: Cwd::cwd()". (In perl v5.8.8 distribution, see the file perl-5.8.8/cygwin/cygwin.c lines 139-157) In order to avoid the problem, we replace the method invocation syntax with a simple function call. Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | Merge branch 'ls/maint-mailinfo-no-inbody' into maintJunio C Hamano2009-12-0316-5/+122
|\ \ \ | | | | | | | | | | | | | | | | * ls/maint-mailinfo-no-inbody: git am/mailinfo: Don't look at in-body headers when rebasing
| * | | git am/mailinfo: Don't look at in-body headers when rebasingLukas Sandström2009-11-2016-5/+122
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When we are rebasing we know that the header lines in the patch are good and that we don't need to pick up any headers from the body of the patch. This makes it possible to rebase commits whose commit message start with "From" or "Date". Test vectors by Jeff King. Signed-off-by: Lukas Sandström <luksan@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | Merge branch 'mo/maint-crlf-doc' into maintJunio C Hamano2009-12-031-3/+4
|\ \ \ | | | | | | | | | | | | | | | | * mo/maint-crlf-doc: core.autocrlf documentation: mention the crlf attribute
| * | | core.autocrlf documentation: mention the crlf attributeMatthew Ogilvie2009-11-161-3/+4
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The description of the configuration variable is obsolete and wrong (saying only file content is used), not just incomplete. It has used the attribute mechanism for a long time. The documentation of gitattributes mentions the core.autocrlf configuration variable in its description of crlf attribute. Refer to the gitattributes documentation from here as well. Signed-off-by: Matthew Ogilvie <mmogilvi_git@miniinfo.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | Merge branch 'th/remote-usage' into maintJunio C Hamano2009-12-032-21/+52
|\ \ \ | | | | | | | | | | | | | | | | * th/remote-usage: git remote: Separate usage strings for subcommands
| * | | git remote: Separate usage strings for subcommandsTim Henigan2009-11-202-21/+52
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When the usage string for a subcommand must be printed, only print the information relevant to that command. This commit also removes the complete options list from the first line of the subcommand usage string. Instead, individual options are documented in the detailed description following the general usage line. Signed-off-by: Tim Henigan <tim.henigan@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | Merge branch 'pb/maint-use-custom-perl' into maintJunio C Hamano2009-12-034-4/+5
|\ \ \ | | | | | | | | | | | | | | | | * pb/maint-use-custom-perl: Make sure $PERL_PATH is defined when the test suite is run.
| * | | Make sure $PERL_PATH is defined when the test suite is run.Philippe Bruhat (BooK)2009-11-174-4/+5
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some test scripts run Perl scripts as if they were git-* scripts, and thus need to use the same perl that will be put in the shebang line of git*.perl commands. $PERL_PATH therefore needs to be used instead of a bare "perl". The tests can fail if another perl is found in $PATH before the one defined in $PERL_PATH. Example test failure caused by this: the perl defined in $PERL_PATH has Error.pm installed, and therefore the Git.pm's Makefile.PL doesn't install the private copy. The perl from $PATH doesn't have Error.pm installed, and all git*.perl scripts invoked during the test will fail loading Error.pm. Makefile patch by Jeff King <peff@peff.net>. Signed-off-by: Philippe Bruhat (BooK) <book@cpan.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | Merge branch 'mm/config-pathname-tilde-expand' into maintJunio C Hamano2009-12-035-37/+69
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | * mm/config-pathname-tilde-expand: Documentation: avoid xmlto input error expand_user_path: expand ~ to $HOME, not to the actual homedir. Expand ~ and ~user in core.excludesfile, commit.template
| * | | Documentation: avoid xmlto input errorJunio C Hamano2009-11-211-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Do not write literal "~/" or "~user" but use "{tilde}/" and "{tilde}user"; otherwise the text between them gets enclosed in "<subscript>...</subscript>". Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | expand_user_path: expand ~ to $HOME, not to the actual homedir.Matthieu Moy2009-11-192-8/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In 395de250d (Expand ~ and ~user in core.excludesfile, commit.template), we introduced the mechanism. But expanding ~ using getpw is not what people overriding $HOME would usually expect. In particular, git looks for the user's .gitconfig using $HOME, so it's better to be consistent. Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | Expand ~ and ~user in core.excludesfile, commit.templateMatthieu Moy2009-11-175-37/+63
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These config variables are parsed to substitute ~ and ~user with getpw entries. user_path() refactored into new function expand_user_path(), to allow dynamically allocating the return buffer. Original patch by Karl Chen, modified by Matthieu Moy, and further amended by Junio C Hamano. Signed-off-by: Karl Chen <quarl@quarl.org> Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | Merge branch 'bc/grep-i-F' into maintJunio C Hamano2009-12-034-6/+27
|\ \ \ | | | | | | | | | | | | | | | | * bc/grep-i-F: grep: Allow case insensitive search of fixed-strings
| * | | grep: Allow case insensitive search of fixed-stringsBrian Collins2009-11-164-6/+27
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | "git grep" currently an error when you combine the -F and -i flags. This isn't in line with how GNU grep handles it. This patch allows the simultaneous use of those flags. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Brian Collins <bricollins@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | Merge branch 'jk/maint-break-rename-reduce-memory' into maintJunio C Hamano2009-12-032-3/+10
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | * jk/maint-break-rename-reduce-memory: diffcore-rename: reduce memory footprint by freeing blob data early diffcore-break: save cnt_data for other phases diffcore-break: free filespec data as we go
| * | | diffcore-rename: reduce memory footprint by freeing blob data earlyJunio C Hamano2009-11-201-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | After running one round of estimate_similarity(), filespecs on either side will have populated their cnt_data fields, and we do not need the blob text anymore. We used to retain the blob data to optimize for smaller projects (not freeing the blob data here would mean that the final output phase would not have to re-read it), but we are efficient enough without such optimization for smaller projects anyway, and freeing memory early will help larger projects. Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | diffcore-break: save cnt_data for other phasesJeff King2009-11-161-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The "break" phase works by counting changes between two blobs with the same path. We do this by splitting the file into chunks (or lines for text oriented files) and then keeping a count of chunk hashes. The "rename" phase counts changes between blobs at two different paths. However, it uses the exact same set of chunk hashes (which are immutable for a given sha1). The rename phase can therefore use the same hash data as break. Unfortunately, we were throwing this data away after computing it in the break phase. This patch instead attaches it to the filespec and lets it live through the rename phase, working under the assumption that most of the time that breaks are being computed, renames will be too. We only do this optimization for files which have actually been broken, as those ones will be candidates for rename detection (and it is a time-space tradeoff, so we don't want to waste space keeping useless data). Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | diffcore-break: free filespec data as we goJeff King2009-11-161-0/+4
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As we look at each changed file and consider breaking it, we load the blob data and make a decision about whether to break, which is independent of any other blobs that might have changed. However, we keep the data in memory while we consider breaking all of the other files. Which means that both versions of every file you are diffing are in memory at the same time. This patch instead frees the blob data as we finish with each file pair, leading to much lower memory usage. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | Merge branch 'rj/maint-simplify-cygwin-makefile' into maintJunio C Hamano2009-12-031-4/+2
|\ \ \ | | | | | | | | | | | | | | | | * rj/maint-simplify-cygwin-makefile: Makefile: merge two Cygwin configuration sections into one