aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAge
* Merge branch 'jl/maint-diff-ignore-submodules'Junio C Hamano2010-06-30
|\ | | | | | | | | | | | | * jl/maint-diff-ignore-submodules: t4027,4041: Use test -s to test for an empty file Add optional parameters to the diff option "--ignore-submodules" git diff: rename test that had a conflicting name
| * t4027,4041: Use test -s to test for an empty fileBrian Gernhardt2010-06-25
| | | | | | | | | | | | | | | | | | | | | | The tests used a mixture of 'echo -n' (which is non-portable) and either test_cmp or diff to check if a file is empty. The much easier and portable method to check for an empty file is '! test -s' While we're in t4027, there was an excess test_done. Remove it. Signed-off-by: Brian Gernhardt <brian@gernhardtsoftware.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * Add optional parameters to the diff option "--ignore-submodules"Jens Lehmann2010-06-11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In some use cases it is not desirable that the diff family considers submodules that only contain untracked content as dirty. This may happen e.g. when the submodule is not under the developers control and not all build generated files have been added to .gitignore by the upstream developers. Using the "untracked" parameter for the "--ignore-submodules" option disables checking for untracked content and lets git diff report them as changed only when they have new commits or modified content. Sometimes it is not wanted to have submodules show up as changed when they just contain changes to their work tree. An example for that are scripts which just want to check for submodule commits while ignoring any changes to the work tree. Also users having large submodules known not to change might want to use this option, as the - sometimes substantial - time it takes to scan the submodule work tree(s) is saved. Signed-off-by: Jens Lehmann <Jens.Lehmann@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * git diff: rename test that had a conflicting nameJens Lehmann2010-06-11
| | | | | | | | | | | | | | | | | | In 86140d5 the new test t4041-diff-submodule.sh was introduced although t4027-diff-submodule.sh already existed. Rename the newer test to t4041-diff-submodule-option.sh to fix that. Signed-off-by: Jens Lehmann <Jens.Lehmann@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | Sync with 1.7.1.1Junio C Hamano2010-06-29
|\ \ | | | | | | | | | Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | Git 1.7.1.1v1.7.1.1Junio C Hamano2010-06-29
| | | | | | | | | | | | Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | t/t9001: use egrep when regular expressions are involvedBrandon Casey2010-06-29
| | | | | | | | | | | | | | | | | | | | | | | | Supplying backslashed, extended regular expressions to grep is not portable. Use egrep instead. Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | Merge branch 'maint'Junio C Hamano2010-06-28
|\ \ \ | |/ / | | | | | | | | | | | | | | | * maint: Update draft release notes to 1.7.1.1 notes: Initialise variable to appease gcc notes: check number of parameters to "git notes copy"
| * | Update draft release notes to 1.7.1.1Junio C Hamano2010-06-28
| | | | | | | | | | | | Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | Merge branch 'tr/send-email-8bit' into maintJunio C Hamano2010-06-28
| |\ \ | | | | | | | | | | | | | | | | * tr/send-email-8bit: send-email: ask about and declare 8bit mails
| * \ \ Merge branch 'pb/maint-perl-errmsg-no-dir' into maintJunio C Hamano2010-06-28
| |\ \ \ | | | | | | | | | | | | | | | | | | | | * pb/maint-perl-errmsg-no-dir: Git.pm: better error message
| * \ \ \ Merge branch 'js/maint-am-rebase-invalid-author' into maintJunio C Hamano2010-06-28
| |\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | * js/maint-am-rebase-invalid-author: am: use get_author_ident_from_commit instead of mailinfo when rebasing
| * \ \ \ \ Merge branch 'jc/maint-simpler-common-prefix' into maintJunio C Hamano2010-06-28
| |\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | * jc/maint-simpler-common-prefix: common_prefix: simplify and fix scanning for prefixes
| * \ \ \ \ \ Merge branch 'bd/maint-unpack-trees-parawalk-fix' into maintJunio C Hamano2010-06-28
| |\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * bd/maint-unpack-trees-parawalk-fix: unpack-trees: Make index lookahead less pessimal
| * | | | | | | notes: Initialise variable to appease gccRamsay Jones2010-06-28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | gcc version 3.4.4 thinks that the 'cmp' variable could be used while uninitialised and complains thus: notes.c: In function `write_each_non_note_until': notes.c:719: warning: 'cmp' might be used uninitialized in \ this function Note that gcc versions 4.1.2 and 4.4.0 do not issue this warning. Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | | | | notes: check number of parameters to "git notes copy"Jeff King2010-06-28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Otherwise we may segfault with too few parameters. Signed-off-by: Jeff King <peff@peff.net> Tested-by: Bert Wesarg <Bert.Wesarg@googlemail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | | | | msvc: Select the "fast" definition of the {get,put}_be32() macrosRamsay Jones2010-06-27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On Intel machines, the msvc compiler defines the CPU architecture macros _M_IX86 and _M_X64 (equivalent to __i386__ and __x86_64__ respectively). Use these macros in the pre-processor expression to select the "fast" definition of the {get,put}_be32() macros. Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk> Acked-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | | | | Git 1.7.2-rc0v1.7.2-rc0Junio C Hamano2010-06-27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | | | | Merge branch 'cp/textconv-cat-file'Junio C Hamano2010-06-27
|\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * cp/textconv-cat-file: git-cat-file.txt: Document --textconv t/t8007: test textconv support for cat-file textconv: support for cat_file sha1_name: add get_sha1_with_context()
| * | | | | | | | git-cat-file.txt: Document --textconvMichael J Gruber2010-06-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | | | | | t/t8007: test textconv support for cat-fileClément Poulain2010-06-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Test the correct functionning of textconv with cat-file <sha1:blob> and cat-file HEAD^ <file>. Test the case when no driver is specified Signed-off-by: Clément Poulain <clement.poulain@ensimag.imag.fr> Signed-off-by: Diane Gasselin <diane.gasselin@ensimag.imag.fr> Signed-off-by: Axel Bonnet <axel.bonnet@ensimag.imag.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | | | | | textconv: support for cat_fileClément Poulain2010-06-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make the textconv_object function public, and add --textconv option to cat-file to perform conversion on blob objects. Using --textconv implies that we are working on a blob. As files drivers need to be initialized, a new config is required in addition to git_default_config. Therefore git_cat_file_config() is introduced Signed-off-by: Clément Poulain <clement.poulain@ensimag.imag.fr> Signed-off-by: Diane Gasselin <diane.gasselin@ensimag.imag.fr> Signed-off-by: Axel Bonnet <axel.bonnet@ensimag.imag.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | | | | | sha1_name: add get_sha1_with_context()Clément Poulain2010-06-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Textconv is defined by the diff driver, which is associated with a pathname, not a blob. This fonction permits to know the context for the sha1 you're looking for, especially his pathname Signed-off-by: Clément Poulain <clement.poulain@ensimag.imag.fr> Signed-off-by: Diane Gasselin <diane.gasselin@ensimag.imag.fr> Signed-off-by: Axel Bonnet <axel.bonnet@ensimag.imag.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | | | | | Merge branch 'pb/maint-perl-errmsg-no-dir'Junio C Hamano2010-06-27
|\ \ \ \ \ \ \ \ \ | | |_|_|_|_|/ / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | * pb/maint-perl-errmsg-no-dir: Git.pm: better error message
| * | | | | | | | Git.pm: better error messagePhilippe Bruhat (BooK)2010-06-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Provide the bad directory name alongside with $! Note: $! is set if there is "No such file or directory", but isn't set if the file exists but is not a directory. Signed-off-by: Philippe Bruhat (BooK) <book@cpan.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | | | | | Merge branch 'tr/send-email-8bit'Junio C Hamano2010-06-27
|\ \ \ \ \ \ \ \ \ | | |_|_|_|_|_|/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | * tr/send-email-8bit: send-email: ask about and declare 8bit mails
| * | | | | | | | send-email: ask about and declare 8bit mailsThomas Rast2010-06-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git-send-email passes on an 8bit mail as-is even if it does not declare a content-type. Because the user can edit email between format-patch and send-email, such invalid mails are unfortunately not very hard to come by. Make git-send-email stop and ask about the encoding to use if it encounters any such mail. Also provide a configuration setting to permanently configure an encoding. Signed-off-by: Thomas Rast <trast@student.ethz.ch> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | | | | | Merge branch 'js/maint-am-rebase-invalid-author'Junio C Hamano2010-06-27
|\ \ \ \ \ \ \ \ \ | | |_|_|_|_|_|/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | * js/maint-am-rebase-invalid-author: am: use get_author_ident_from_commit instead of mailinfo when rebasing
| * | | | | | | | am: use get_author_ident_from_commit instead of mailinfo when rebasingJay Soffian2010-06-16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In certain situations, commit authorship can consist of an invalid e-mail address. For example, this is the case when working with git svn repos where the author email has had the svn repo UUID appended such as: author@example.com <author@example.com@deadbeef-dead-beef-dead-beefdeadbeef> Given such an address, mailinfo extracts the authorship incorrectly as it assumes a valid domain. However, when rebasing the original authorship should be preserved irrespective of its validity as an email address. Using get_author_ident_from_commit instead of mailinfo when rebasing preserves the original authorship. Signed-off-by: Jay Soffian <jaysoffian@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | | | | | Merge branch 'ab/blame-textconv'Junio C Hamano2010-06-27
|\ \ \ \ \ \ \ \ \ | | |_|_|/ / / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * ab/blame-textconv: t/t8006: test textconv support for blame textconv: support for blame textconv: make the API public Conflicts: diff.h
| * | | | | | | | t/t8006: test textconv support for blameAxel Bonnet2010-06-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Test the correct functionning of textconv with blame <file> and blame HEAD^ <file>. Test the case when no driver is specified. Signed-off-by: Axel Bonnet <axel.bonnet@ensimag.imag.fr> Signed-off-by: Clément Poulain <clement.poulain@ensimag.imag.fr> Signed-off-by: Diane Gasselin <diane.gasselin@ensimag.imag.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | | | | | textconv: support for blameAxel Bonnet2010-06-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patches enables to perform textconv with blame if a textconv driver is available fos the file. The main task is performed by the textconv_object function which prepares diff_filespec and if possible converts the file using diff textconv API. Only regular files are converted, so the mode of diff_filespec is faked. Textconv conversion is enabled by default (equivalent to the option --textconv), since blaming binary files is useless in most cases. The option --no-textconv is used to disable textconv conversion. The declarations of several functions are modified to give access to a diff_options, in order to know whether the textconv option is activated or not. Signed-off-by: Axel Bonnet <axel.bonnet@ensimag.imag.fr> Signed-off-by: Clément Poulain <clement.poulain@ensimag.imag.fr> Signed-off-by: Diane Gasselin <diane.gasselin@ensimag.imag.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | | | | | textconv: make the API publicAxel Bonnet2010-06-11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The textconv functionality allows one to convert a file into text before running diff. But this functionality can be useful to other features such as blame. Signed-off-by: Axel Bonnet <axel.bonnet@ensimag.imag.fr> Signed-off-by: Clément Poulain <clement.poulain@ensimag.imag.fr> Signed-off-by: Diane Gasselin <diane.gasselin@ensimag.imag.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | | | | | Merge branch 'jn/show-num-walks'Junio C Hamano2010-06-27
|\ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * jn/show-num-walks: DWIM 'git show -5' to 'git show --do-walk -5'
| * | | | | | | | | DWIM 'git show -5' to 'git show --do-walk -5'Jonathan Nieder2010-06-02
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | To show the last two commits with one command, one might try 1) git show -s master~2.. 2) git show -s ^master~2 master 3) git show -s master^ master 4) git show -s -2 master Choice (3) works because both commits are listed on the command line. Choices (1) and (2) have worked ever since v1.6.4-rc~3 (Make 'git show' more useful, 2009-07-13) disabled --no-walk in this case because there is no other useful meaning for them to have. Unfortunately, (4) does not work: it outputs only one commit, because --no-walk stays on. So disable --no-walk in this case so ‘git show’ and future ‘git cherry-pick’ can behave as expected. As a side effect, this unfortunately changes the meaning of ‘git log --oneline --decorate --no-walk -5 --all’: instead of listing five refs, after this patch that command would list the five most recent commits. Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | | | | | | Merge branch 'maint'Junio C Hamano2010-06-25
|\ \ \ \ \ \ \ \ \ \ | | |_|_|_|_|/ / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * maint: msvc: Fix some compiler warnings Documentation: grep: fix asciidoc problem with -- msvc: Fix some "expr evaluates to function" compiler warnings
| * | | | | | | | | msvc: Fix some compiler warningsRamsay Jones2010-06-25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In particular, using the normal (or production) compiler warning level (-W3), msvc complains as follows: .../sha1.c(244) : warning C4018: '<' : signed/unsigned mismatch .../sha1.c(270) : warning C4244: 'function' : conversion from \ 'unsigned __int64' to 'unsigned long', possible loss of data .../sha1.c(271) : warning C4244: 'function' : conversion from \ 'unsigned __int64' to 'unsigned long', possible loss of data Note that gcc issues a similar complaint about line 244 when compiling with -Wextra. Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | | | | | | Documentation: grep: fix asciidoc problem with --Christian Couder2010-06-25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Asciidoc interprets two dashes separated by spaces as a single big dash. So let's escape the first dash, so that "\--" will properly appear as "--". Signed-off-by: Christian Couder <chriscool@tuxfamily.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | | | | | | msvc: Fix some "expr evaluates to function" compiler warningsRamsay Jones2010-06-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In particular, the following warning is issued while compiling notes.c: notes.c(927) : warning C4550: expression evaluates to a \ function which is missing an argument list along with identical warnings on lines 928, 1016 and 1017. In order to suppress the warning, we change the definition of combine_notes_fn, so that the symbol type is an (explicit) "pointer to function ...". As a result, several other declarations need some minor fix-up to take account of the new typedef. Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk> Acked-by: Johan Herland <johan@herland.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | | | | | | Merge branch 'jk/url-decode'Junio C Hamano2010-06-23
|\ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * jk/url-decode: url.c: "<scheme>://" part at the beginning should not be URL decoded
| * | | | | | | | | | url.c: "<scheme>://" part at the beginning should not be URL decodedJunio C Hamano2010-06-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When using the protocol git+ssh:// for example we do not want to decode the '+' as a space. The url decoding must take place only for the server name and parameters. This fixes a regression introduced in 9d2e942. Initial-fix-by: Pascal Obry <pascal.obry@gmail.com> Acked-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | | | | | | | Update draft release notes to 1.7.2Junio C Hamano2010-06-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | | | | | | | Merge branch 'jc/maint-simpler-common-prefix'Junio C Hamano2010-06-22
|\ \ \ \ \ \ \ \ \ \ \ | | |_|_|_|_|_|_|_|/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * jc/maint-simpler-common-prefix: common_prefix: simplify and fix scanning for prefixes
| * | | | | | | | | | common_prefix: simplify and fix scanning for prefixesJunio C Hamano2010-06-16
| | |_|_|_|/ / / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | common_prefix() scans backwards from the far end of each 'next' pathspec, starting from 'len', shortening the 'prefix' using 'path' as a reference. However, there is a small opportunity for an out-of-bounds access because len is unconditionally set to prefix-1 after a "direct match" test failed. This means that if 'next' is shorter than prefix+2, we read past it. Instead of a minimal fix, simplify the loop: scan *forward* over the 'next' entry, remembering the last '/' where it matched the prefix known so far. This is far easier to read and also has the advantage that we only scan over each entry once. Acked-by: Thomas Rast <trast@student.ethz.ch> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | | | | | | Merge branch 'sb/format-patch-signature'Junio C Hamano2010-06-22
|\ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * sb/format-patch-signature: completion: Add --signature and format.signature format-patch: Add a signature option (--signature)
| * | | | | | | | | | completion: Add --signature and format.signatureStephen Boyd2010-06-16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Cc: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Stephen Boyd <bebarino@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | | | | | | | format-patch: Add a signature option (--signature)Stephen Boyd2010-06-16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | By default, git uses the version string as the signature for all patches output by format-patch. Many employers (mine included) require the use of a signature on all outgoing mails. In a format-patch | send-email workflow there isn't an easy way to modify the signature without breaking the pipe and manually replacing the version string with the signature required. Instead of doing all that work, add an option (--signature) and a config variable (format.signature) to replace the default git version signature when formatting patches. This does modify the original behavior of format-patch a bit. First off the version string is now placed in the cover letter by default. Secondly, once the configuration variable format.signature is added to the .config file there is no way to revert back to the default git version signature. Instead, specifying the --no-signature option will remove the signature from the patches entirely. Signed-off-by: Stephen Boyd <bebarino@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | | | | | | | Merge branch 'mg/pretty-magic-space'Junio C Hamano2010-06-22
|\ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * mg/pretty-magic-space: pretty: Introduce ' ' modifier to add space if non-empty Conflicts: pretty.c
| * | | | | | | | | | | pretty: Introduce ' ' modifier to add space if non-emptyMichael J Gruber2010-06-16
| |/ / / / / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We have the '+' modifiier which helps combine format specifiers which may possibly be empty, e.g. '%s%+b%n'. Introduce an analogous ' ' (space) modifier which adds a space before non-empty items. This helps assemble "one line type" format specifiers. Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | | | | | | | Merge branch 'jn/gitweb-return-or-exit-cleanup'Junio C Hamano2010-06-22
|\ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * jn/gitweb-return-or-exit-cleanup: gitweb: Return or exit after done serving request Conflicts: gitweb/gitweb.perl