summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Support sizes >=2G in various config options accepting 'g' sizes.na/strtoimaxNick Alcock2011-11-051-10/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The config options core.packedGitWindowSize, core.packedGitLimit, core.deltaBaseCacheLimit, core.bigFileThreshold, pack.windowMemory and pack.packSizeLimit all claim to support suffixes up to and including 'g'. This implies that they should accept sizes >=2G on 64-bit systems: certainly, specifying a size of 3g should not silently be translated to zero or transformed into a large negative value due to integer overflow. However, due to use of git_config_int() rather than git_config_ulong(), that is exactly what happens: % git config core.bigFileThreshold 2g % git gc --aggressive # with extra debugging code to print out # core.bigfilethreshold after parsing bigfilethreshold: -2147483648 [...] This is probably irrelevant for core.deltaBaseCacheLimit, but is problematic for the other values. (It is particularly problematic for core.packedGitLimit, which can't even be set to its default value in the config file due to this bug.) This fixes things for 32-bit platforms as well. They get the usual bad config error if an overlarge value is specified, e.g.: fatal: bad config value for 'core.bigfilethreshold' in /home/nix/.gitconfig This is detected in all cases, even if the 32-bit platform has no size larger than 'long'. For signed integral configuration values, we also detect the case where the value is too large for the signed type but not the unsigned type. Signed-off-by: Nick Alcock <nix@esperi.org.uk> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* Compatibility: declare strtoimax() under NO_STRTOUMAXJohannes Sixt2011-11-051-0/+2
| | | | | | | | The previous one introduced an implementation of the function, but forgot to add a declaration. Signed-off-by: Johannes Sixt <j6t@kdbg.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* Add strtoimax() compatibility function.Nick Alcock2011-11-022-3/+13
| | | | | | | | | | Since systems that omit strtoumax() will likely omit strtomax() too, and likewise for strtoull() and strtoll(), we arrange for the make variables NO_STRTOUMAX and NO_STRTOULL to cover both the signed and unsigned functions, and define compatibility implementations for them. Signed-off-by: Nick Alcock <nix@esperi.org.uk> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* Git 1.7.6v1.7.6Junio C Hamano2011-06-263-8/+7
| | | | Signed-off-by: Junio C Hamano <gitster@pobox.com>
* Merge branch 'maint'Junio C Hamano2011-06-261-1/+1
|\ | | | | | | | | * maint: completion: replace core.abbrevguard to core.abbrev
| * Merge branch 'maint-1.7.4' into maintJunio C Hamano2011-06-241-1/+1
| |\ | | | | | | | | | | | | * maint-1.7.4: completion: replace core.abbrevguard to core.abbrev
| | * completion: replace core.abbrevguard to core.abbrevNamhyung Kim2011-06-241-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | The core.abbrevguard config variable had removed and now core.abbrev has been used instead. Teach it. Signed-off-by: Namhyung Kim <namhyung@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | Git 1.7.6-rc3v1.7.6-rc3Junio C Hamano2011-06-221-1/+1
| | | | | | | | | | | | Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | Merge branch 'maint'Junio C Hamano2011-06-221-4/+8
|\ \ \ | |/ / | | | | | | | | | * maint: Documentation: git diff --check respects core.whitespace
| * | Documentation: git diff --check respects core.whitespaceChristof Krüger2011-06-221-4/+8
| | | | | | | | | | | | | | | | | | | | | | | | Fix documentation on "git diff --check" by adopting the description from "git apply --whitespace". Signed-off-by: Christof Krüger <git@christof-krueger.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | Merge branch 'maint'Junio C Hamano2011-06-211-0/+2
|\ \ \ | |/ / | | | | | | | | | * maint: gitweb: 'pickaxe' and 'grep' features requires 'search' to be enabled
| * | gitweb: 'pickaxe' and 'grep' features requires 'search' to be enabledJakub Narebski2011-06-211-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Both 'pickaxe' (searching changes) and 'grep' (searching files) require basic 'search' feature to be enabled to work. Enabling e.g. only 'pickaxe' won't work. Add a comment about this. Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | Merge branch 'mk/grep-pcre'Junio C Hamano2011-06-201-3/+3
|\ \ \ | | | | | | | | | | | | | | | | * mk/grep-pcre: t7810: avoid unportable use of "echo"
| * | | t7810: avoid unportable use of "echo"Junio C Hamano2011-06-201-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Michael J Gruber noticed that under /bin/dash this test failed (as is expected -- \n in the string can be interpreted by the command), while it passed with bash. We probably could work it around by using backquote in front of it, but it is safer and more readable to avoid "echo" altogether in a case like this. Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | plug a few coverity-spotted leaksJim Meyering2011-06-204-5/+12
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Jim Meyering <meyering@redhat.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | Merge branch 'di/no-no-existant'Junio C Hamano2011-06-197-14/+14
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | * di/no-no-existant: Fix typo: existant->existent
| * | | | Fix typo: existant->existentDmitry Ivankov2011-06-167-14/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | refs.c had a error message "Trying to write ref with nonexistant object". And no tests relied on the wrong spelling. Also typo was present in some test scripts internals, these tests still pass. Signed-off-by: Dmitry Ivankov <divanorama@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | Merge branch 'maint'Junio C Hamano2011-06-191-1/+1
|\ \ \ \ \ | | |_|/ / | |/| | | | | | | | | | | | | * maint: builtin/gc.c: add missing newline in message
| * | | | builtin/gc.c: add missing newline in messageAndreas Schwab2011-06-191-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Andreas Schwab <schwab@linux-m68k.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | tests: link shell libraries into valgrind directoryJeff King2011-06-171-2/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When we run tests under valgrind, we symlink anything executable that starts with git-* or test-* into a special valgrind bin directory, and then make that our GIT_EXEC_PATH. However, shell libraries like git-sh-setup do not have the executable bit marked, and did not get symlinked. This means that any test looking for shell libraries in our exec-path would fail to find them, even though that is a fine thing to do when testing against a regular git build (or in a git install, for that matter). t2300 demonstrated this problem. The fix is to symlink these shell libraries directly into the valgrind directory. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | t/Makefile: pass test opts to valgrind target properlyJeff King2011-06-171-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The valgrind target just reinvokes make with GIT_TEST_OPTS set to "--valgrind". However, it does this using an environment variable, which means GIT_TEST_OPTS in your config.mak would override it, and "make valgrind" would simply run the test suite without valgrind on. Instead, we should pass GIT_TEST_OPTS on the command-line, overriding what's in config.mak, and take care to append to whatever the user has there already. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | Merge branch 'ab/i18n-scripts-basic'Junio C Hamano2011-06-171-1/+0
|\ \ \ \ \ | |_|/ / / |/| | | | | | | | | | | | | | * ab/i18n-scripts-basic: sh-i18n--envsubst.c: do not #include getopt.h
| * | | | sh-i18n--envsubst.c: do not #include getopt.hBrandon Casey2011-06-171-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The getopt.h header file is not used. It's inclusion is left over from the original version of this source. Additionally, getopt.h does not exist on all platforms (SunOS 5.7) and will cause a compilation failure. So, let's remove it. Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | Git 1.7.6-rc2v1.7.6-rc2Junio C Hamano2011-06-162-2/+2
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | gitweb: do not misparse nonnumeric content tag files that contain a digitJonathan Nieder2011-06-092-1/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | v1.7.6-rc0~27^2~4 (gitweb: Change the way "content tags" ('ctags') are handled, 2011-04-29) tried to make gitweb's tag cloud feature more intuitive for webmasters by checking whether the ctags/<label> under a project's .git dir contains a number (representing the strength of association to <label>) before treating it as one. With that change, after putting '$feature{'ctags'}{'default'} = [1];' in your $GITWEB_CONFIG, you could do echo Linux >.git/ctags/linux and gitweb would treat that as a request to tag the current repository with the Linux tag, instead of the previous behavior of writing an error page embedded in the projects list that triggers error messages from Chromium and Firefox about malformed XML. Unfortunately the pattern (\d+) used to match numbers is too loose, and the "XML declaration allowed only at the start of the document" error can still be experienced if you write "Linux-2.6" in place of "Linux" in the example above. Fix it by tightening the pattern to ^\d+$. Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | Git 1.7.6-rc1v1.7.6-rc1Junio C Hamano2011-06-082-3/+11
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | Merge branch 'maint'Junio C Hamano2011-06-081-2/+4
|\ \ \ \ \ | | |/ / / | |/| | | | | | | | | | | | | * maint: fetch: do not leak a refspec
| * | | | fetch: do not leak a refspecJim Meyering2011-06-081-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Jim Meyering <meyering@redhat.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | Merge branch 'jc/magic-pathspec'Junio C Hamano2011-06-071-6/+6
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | * jc/magic-pathspec: t3703: skip more tests using colons in file names on Windows
| * | | | | t3703: skip more tests using colons in file names on WindowsAlex Riesen2011-06-071-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use the same test and prerequisite as introduced in similar fix in 650af7ae8bdf92bd92df2. Signed-off-by: Alex Riesen <raa.lkml@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | | Merge branch 'jn/mime-type-with-params'Junio C Hamano2011-06-061-1/+1
|\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | * jn/mime-type-with-params: gitweb: Fix usability of $prevent_xss
| * | | | | | gitweb: Fix usability of $prevent_xssJakub Narebski2011-06-051-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With XSS prevention on (enabled using $prevent_xss), blobs ('blob_plain') of all types except a few known safe ones are served with "Content-Disposition: attachment". However the check was too strict; it didn't take into account optional parameter attributes, media-type = type "/" subtype *( ";" parameter ) as described in RFC 2616 http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.17 http://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.7 This fixes that, and it for example treats following as safe MIME media type: text/plain; charset=utf-8 Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | | | Merge branch 'jn/gitweb-docs'Junio C Hamano2011-06-062-131/+135
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * jn/gitweb-docs: gitweb: Move "Requirements" up in gitweb/INSTALL gitweb: Describe CSSMIN and JSMIN in gitweb/INSTALL gitweb: Move information about installation from README to INSTALL
| * | | | | | | gitweb: Move "Requirements" up in gitweb/INSTALLJakub Narebski2011-06-031-15/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This way you can examine prerequisites at first glance, before detailed instructions on installing gitweb. Straightforward text movement. Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | | | | gitweb: Describe CSSMIN and JSMIN in gitweb/INSTALLJakub Narebski2011-06-021-6/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The build-time configuration variables JSMIN and CSSMIN were mentioned only in Makefile; add their description to gitweb/INSTALL. This required moving description of GITWEB_JS up, near GITWEB_CSS and just introduced CSMIN and JSMIN. Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | | | | gitweb: Move information about installation from README to INSTALLJakub Narebski2011-06-022-116/+113
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Almost straightformard moving of "How to configure gitweb for your local system" section from gitweb/README to gitweb/INSTALL, as it is about build time configuration. Updated references to it. Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | | | | Merge branch 'jk/diff-not-so-quick'Junio C Hamano2011-06-065-5/+16
|\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * jk/diff-not-so-quick: diff: futureproof "stop feeding the backend early" logic diff_tree: disable QUICK optimization with diff filter Conflicts: diff.c
| * | | | | | | | diff: futureproof "stop feeding the backend early" logicJunio C Hamano2011-05-314-6/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Refactor the "do not stop feeding the backend early" logic into a small helper function and use it in both run_diff_files() and diff_tree() that has the stop-early optimization. We may later add other types of diffcore transformation that require to look at the whole result like diff-filter does, and having the logic in a single place is essential for longer term maintainability. Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | | | | | diff_tree: disable QUICK optimization with diff filterJeff King2011-05-312-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We stop looking for changes early with QUICK, so our diff queue contains only a subset of the changes. However, we don't apply diff filters until later; it will appear at that point as though there are no changes matching our filter, when in reality we simply didn't keep looking for changes long enough. Commit 2cfe8a6 (diff --quiet: disable optimization when --diff-filter=X is used, 2011-03-16) fixes this in some cases by disabling the optimization when a filter is present. However, it only tweaked run_diff_files, missing the similar case in diff_tree. Thus the fix worked only for diffing the working tree and index, but not between trees. Noticed by Yasushi SHOJI. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | | | | | Merge branch 'bc/maint-status-z-to-use-porcelain'Junio C Hamano2011-06-062-3/+11
|\ \ \ \ \ \ \ \ \ | |_|/ / / / / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * bc/maint-status-z-to-use-porcelain: builtin/commit.c: set status_format _after_ option parsing t7508: demonstrate status's failure to use --porcelain format with -z Conflicts: builtin/commit.c
| * | | | | | | | builtin/commit.c: set status_format _after_ option parsingBrandon Casey2011-05-292-4/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 'git status' should use --porcelain output format when -z is given. It was not doing so since the _effect_ of using -z, namely that null_termination would be set, was being checked _before_ option parsing was performed. So, move the check so that it is performed after option parsing. Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | | | | | t7508: demonstrate status's failure to use --porcelain format with -zBrandon Casey2011-05-291-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When 'git status' is supplied the -z switch, and no output format has been selected, it is supposed to use the --porcelain format. This does not happen. Instead, the standard long format is used. Add a test to demonstrate this failure. Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | | | | | Sync with 1.7.5.4v1.7.6-rc0Junio C Hamano2011-06-012-1/+5
|\ \ \ \ \ \ \ \ \ | | |_|_|_|/ / / / | |/| | | | | | | | | | | | | | | | Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | | | | | Git 1.7.5.4v1.7.5.4Junio C Hamano2011-06-013-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | | | | | Merge branch 'jk/maint-config-alias-fix' into maintJunio C Hamano2011-06-014-48/+30
| |\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * jk/maint-config-alias-fix: handle_options(): do not miscount how many arguments were used config: always parse GIT_CONFIG_PARAMETERS during git_config git_config: don't peek at global config_parameters config: make environment parsing routines static
| * \ \ \ \ \ \ \ \ Merge branch 'jc/fmt-req-fix' into maintJunio C Hamano2011-06-011-1/+1
| |\ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * jc/fmt-req-fix: userformat_find_requirements(): find requirement for the correct format
| * \ \ \ \ \ \ \ \ \ Merge branch 'jk/maint-docs' into maintJunio C Hamano2011-06-014-15/+35
| |\ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * jk/maint-docs: docs: fix some antique example output docs: make sure literal "->" isn't converted to arrow docs: update status --porcelain format docs: minor grammar fixes to git-status
| * \ \ \ \ \ \ \ \ \ \ Merge branch 'jn/doc-remote-helpers' into maintJunio C Hamano2011-06-011-3/+3
| |\ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * jn/doc-remote-helpers: Documentation: do not misinterpret refspecs as bold text
| * \ \ \ \ \ \ \ \ \ \ \ Merge branch 'kk/maint-prefix-in-config-mak' into maintJunio C Hamano2011-06-011-0/+1
| |\ \ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * kk/maint-prefix-in-config-mak: config.mak.in: allow "configure --sysconfdir=/else/where"
| * | | | | | | | | | | | | diffcore-rename.c: avoid set-but-not-used warningJim Meyering2011-06-011-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since 9d8a5a5 (diffcore-rename: refactor "too many candidates" logic, 2011-01-06), diffcore_rename() initializes num_src but does not use it anymore. "-Wunused-but-set-variable" in gcc-4.6 complains about this. Signed-off-by: Jim Meyering <meyering@redhat.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>