summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2016-05-31Merge branch 'bn/http-cookiefile-config' into maintJunio C Hamano
"http.cookieFile" configuration variable clearly wants a pathname, but we forgot to treat it as such by e.g. applying tilde expansion. * bn/http-cookiefile-config: http: expand http.cookieFile as a path Documentation: config: improve word ordering for http.cookieFile
2016-05-31Merge branch 'jk/test-send-sh-x-trace-elsewhere' into maintJunio C Hamano
Running tests with '-x' option to trace the individual command executions is a useful way to debug test scripts, but some tests that capture the standard error stream and check what the command said can be broken with the trace output mixed in. When running our tests under "bash", however, we can redirect the trace output to another file descriptor to keep the standard error of programs being tested intact. * jk/test-send-sh-x-trace-elsewhere: test-lib: set BASH_XTRACEFD automatically
2016-05-31Merge branch 'js/name-rev-use-oldest-ref' into maintJunio C Hamano
"git describe --contains" often made a hard-to-justify choice of tag to give name to a given commit, because it tried to come up with a name with smallest number of hops from a tag, causing an old commit whose close descendant that is recently tagged were not described with respect to an old tag but with a newer tag. It did not help that its computation of "hop" count was further tweaked to penalize being on a side branch of a merge. The logic has been updated to favor using the tag with the oldest tagger date, which is a lot easier to explain to the end users: "We describe a commit in terms of the (chronologically) oldest tag that contains the commit." * js/name-rev-use-oldest-ref: name-rev: include taggerdate in considering the best name
2016-05-31rebase -i: remove an unnecessary 'rerere' invocationJohannes Sixt
Interactive rebase uses 'git cherry-pick' and 'git merge' to replay commits. Both invoke the 'rerere' machinery when they fail due to merge conflicts. Note that all code paths with these two commands also invoke the shell function die_with_patch when the commands fail. Since commit 629716d2 ("rerere: do use multiple variants") the second operation of the rerere machinery can be observed by a duplicated message "Recorded preimage for 'file'". This second operation records the same preimage as the first one and, hence, only wastes cycles. Remove the 'git rerere' invocation from die_with_patch. Shell function die_with_patch can be called after the failure of "git commit", too, which also calls into the rerere machinery, but it does so only after a successful commit to record the resolution. Therefore, it is wrong to call 'git rerere' from die_with_patch after "git commit" fails. Signed-off-by: Johannes Sixt <j6t@kdbg.org> Acked-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-05-31perf: make the tests work without a worktreeRené Scharfe
In regular repositories $source_git and $objects_dir contain relative paths based on $source. Go there to allow cp to resolve them. Signed-off-by: Rene Scharfe <l.s.r@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-05-31grep: -W: don't extend context to trailing empty linesRené Scharfe
Empty lines between functions are shown by grep -W, as it considers them to be part of the function preceding them. They are not interesting in most languages. The previous patches stopped showing them for diff -W. Stop showing empty lines trailing a function with grep -W. Grep scans the lines of a buffer from top to bottom and prints matching lines immediately. Thus we need to peek ahead in order to determine if an empty line is part of a function body and worth showing or not. Remember how far ahead we peeked in order to avoid having to do so repeatedly when handling multiple consecutive empty lines. Signed-off-by: Rene Scharfe <l.s.r@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-05-31t7810: add test for grep -W and trailing empty context linesRené Scharfe
Add a test demonstrating that git grep -W prints empty lines following the function context we're actually interested in. The modified test file makes it necessary to adjust three unrelated test cases. Signed-off-by: Rene Scharfe <l.s.r@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-05-31xdiff: don't trim common tail with -WRené Scharfe
The function trim_common_tail() exits early if context lines are requested. If -U0 and -W are specified together then it can still trim context lines that might belong to a changed function. As a result that function is shown incompletely. Fix that by calling trim_common_tail() only if no function context or fixed context is requested. The parameter ctx is no longer needed now; remove it. While at it fix an outdated comment as well. Signed-off-by: Rene Scharfe <l.s.r@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-05-31xdiff: -W: don't include common trailing empty lines in contextRené Scharfe
Empty lines between functions are shown by diff -W, as it considers them to be part of the function preceding them. They are not interesting in most languages. The previous patch stopped showing them in the special case of a function added at the end of a file. Stop extending context to those empty lines by skipping back over them from the start of the next function. Signed-off-by: Rene Scharfe <l.s.r@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-05-31xdiff: ignore empty lines before added functions with -WRené Scharfe
If a new function and a preceding empty line is appended, diff -W shows the previous function in full in order to provide context for that empty line. In most languages empty lines between sections are not interesting in and off themselves and showing a whole extra function for them is not what we want. Skip empty lines when checking of the appended chunk starts with a function line, thereby avoiding to extend the context just for them. Helped-by: Ramsay Jones <ramsay@ramsayjones.plus.com> Signed-off-by: Rene Scharfe <l.s.r@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-05-31xdiff: handle appended chunks better with -WRené Scharfe
If lines are added at the end of a file, diff -W shows the whole file. That's because get_func_line() only considers the pre-image and gives up if it sees a record index beyond its end. Consider the post-image as well to see if the added lines already make up a full function. If it doesn't then search for the previous function line by starting from the bottom of the pre-image, thereby avoiding to confuse get_func_line(). Reuse the existing label called "again", as it's exactly where we need to jump to when we're done handling the pre-context, but rename it to "post_context_calculation" in order to document its new purpose better. Reported-by: Junio C Hamano <gitster@pobox.com> Initial-patch-by: Junio C Hamano <gitster@pobox.com> Signed-off-by: Rene Scharfe <l.s.r@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-05-31xdiff: factor out match_func_rec()René Scharfe
Add match_func_rec(), a helper that wraps accessing a record and calling the appropriate function for checking if it contains a function line. Signed-off-by: Rene Scharfe <l.s.r@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-05-31t4051: rewrite, add more testsRené Scharfe
Remove the tests that checked against a fixed result and replace them with more focused checks of desired properties of the created diffs. That way we get more detailed and meaningful diagnostics. Store test file contents in files in a subdirectory in order to avoid cluttering the test script with them. Use tagged commits to store the changes to test diff -W against instead of using changes to the worktree. Use the worktree instead to try and apply the generated patch in order to validate it. Document unwanted features: trailing empty lines, too much context for appended functions, insufficient context at the end with -U0. Helped-by: Junio C Hamano <gitster@pobox.com> Signed-off-by: Rene Scharfe <l.s.r@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-05-31Merge branch 'es/t1500-modernize'Junio C Hamano
test updates to make it more readable and maintainable. * es/t1500-modernize: t1500: avoid setting environment variables outside of tests t1500: avoid setting configuration options outside of tests t1500: avoid changing working directory outside of tests t1500: test_rev_parse: facilitate future test enhancements t1500: be considerate to future potential tests
2016-05-31Merge branch 'jk/cat-file-buffered-batch-all'Junio C Hamano
"git cat-file --batch-all" has been sped up, by taking advantage of the fact that it does not have to read a list of objects, in two ways. * jk/cat-file-buffered-batch-all: cat-file: default to --buffer when --batch-all-objects is used cat-file: avoid noop calls to sha1_object_info_extended
2016-05-31Merge branch 'fc/fast-import-broken-marks-file'Junio C Hamano
"git fast-import --export-marks" would overwrite the existing marks file even when it makes a dump from its custom die routine. Prevent it from doing so when we have an import-marks file but haven't finished reading it. * fc/fast-import-broken-marks-file: fast-import: do not truncate exported marks file
2016-05-31Documentation: bold literals in manErwan Mathoniere
Backticks are emphasized through monospaced styling in the HTML version of Git documentation. But they were left unstyled in the manual pages. To make the man pages more comfortably read, `MAN_BOLD_LITERAL` was added by 5121a6d (Documentation: option to render literal text as bold for manpages, 2009-03-27). It allowed the user to build the manpages with literals in bold style. For precaution it was not set by default back then. Since 79c461d (docs: default to more modern toolset, 2010-11-19), it is assumed ASCIIDOC 8 and at least docbook-xsl 1.73 are used, so the need for compatibility concern is much lessor now. Remove `MAN_BOLD_LITERAL`, and typeset literals as bold by default . Add `NO_MAN_BOLD_LITERAL`, a new Makefile option, disabling this feature when defined. Signed-off-by: Erwan MATHONIERE <erwan.mathoniere@grenoble-inp.org> Signed-off-by: Samuel GROOT <samuel.groot@grenoble-inp.org> Signed-off-by: Tom RUSSELLO <tom.russello@grenoble-inp.org> Signed-off-by: Matthieu MOY <matthieu.moy@grenoble-inp.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-05-31l10n: pt_PT: update Portuguese translationVasco Almeida
Signed-off-by: Vasco Almeida <vascomalmeida@sapo.pt>
2016-05-31l10n: pt_PT: update according to git-gui glossaryVasco Almeida
Signed-off-by: Vasco Almeida <vascomalmeida@sapo.pt>
2016-05-31l10n: pt_PT: merge git.pot fileVasco Almeida
Signed-off-by: Vasco Almeida <vascomalmeida@sapo.pt>
2016-05-31Makefile: move 'ifdef DEVELOPER' after config.mak* inclusionMatthieu Moy
The DEVELOPER knob was introduced in 658df95 (add DEVELOPER makefile knob to check for acknowledged warnings, 2016-02-25), and works well when used as "make DEVELOPER=1", and when the configure script was not used. However, the advice given in CodingGuidelines to add DEVELOPER=1 to config.mak does not: config.mak is included after testing for DEVELOPER in the Makefile, and at least GNU Make's manual specifies "Conditional directives are parsed immediately", hence the config.mak declaration is not visible at the time the conditional is evaluated. Also, when using the configure script to generate a config.mak.autogen, the later file contained a "CFLAGS = <flags>" initialization, which overrode the "CFLAGS += -W..." triggered by DEVELOPER. This patch fixes both issues. Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-05-31README.md: format CLI commands with code syntaxBenjamin Dopplinger
CLI commands which are mentioned in the readme are now formatted with the Markdown code syntax to make the documentation more readable. Signed-off-by: Benjamin Dopplinger <b.dopplinger@gmail.com> Reviewed-by: Matthieu Moy <Matthieu.Moy@imag.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-05-30Final batch before 2.9-rc1Junio C Hamano
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-05-30Merge branch 'ak/t0008-ksh88-workaround'Junio C Hamano
Test portability workaround. * ak/t0008-ksh88-workaround: t0008: 4 tests fail with ksh88
2016-05-30Merge branch 'js/t6044-use-test-seq'Junio C Hamano
Test portability fix. * js/t6044-use-test-seq: t6044: replace seq by test_seq
2016-05-30Merge branch 'ak/t4204-shell-portability'Junio C Hamano
Update a test to run also under ksh88. * ak/t4204-shell-portability: t4204: do not let $name variable clobbered
2016-05-30Merge branch 'rj/log-decorate-auto'Junio C Hamano
We forgot to add "git log --decorate=auto" to documentation when we added the feature back in v2.1.0 timeframe. * rj/log-decorate-auto: log: document the --decorate=auto option
2016-05-30Merge branch 'mr/send-email-doc-gmail-2fa'Junio C Hamano
Give hints to GMail users with two-factor auth enabled that they need app-specific-password when using send-email. * mr/send-email-doc-gmail-2fa: Documentation: add instructions to help setup gmail 2FA
2016-05-30Merge branch 'kb/msys2-tty'Junio C Hamano
The "are we talking with TTY, doing an interactive session?" detection has been updated to work better for "Git for Windows". * kb/msys2-tty: mingw: make isatty() recognize MSYS2's pseudo terminals (/dev/pty*)
2016-05-30git-cherry-pick.txt: correct a small typoPablo Santiago Blum de Aguiar
Most of the document mentions `behavior` instead of the British variation, `behaviour`. This change makes it consistent. Signed-off-by: Pablo Santiago Blum de Aguiar <scorphus@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-05-30patch-id: use starts_with() and skip_prefix()René Scharfe
Get rid of magic numbers and avoid running over the end of a NUL terminated string by using starts_with() and skip_prefix() instead of memcmp(). Signed-off-by: Rene Scharfe <l.s.r@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-05-30apply: remove unused parameters from name_terminate()René Scharfe
Signed-off-by: Rene Scharfe <l.s.r@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-05-29l10n: Updated Bulgarian translation of git (2597t,0f,0u)Alexander Shopov
Signed-off-by: Alexander Shopov <ash@kambanaria.org>
2016-05-29Merge branch 'v2.9.0_rnd1_fr' of git://github.com/jnavila/gitJiang Xin
* 'v2.9.0_rnd1_fr' of git://github.com/jnavila/git: l10n: fr.po v2.9.0rnd1
2016-05-27Documentation: add instructions to help setup gmail 2FAMichael Rappazzo
For those who use two-factor authentication with gmail, git-send-email will not work unless it is setup with an app-specific password. The example for setting up git-send-email for use with gmail will now include information on generating and storing the app-specific password. Signed-off-by: Michael Rappazzo <rappazzo@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-05-27log: document the --decorate=auto optionRamsay Jones
Signed-off-by: Ramsay Jones <ramsay@ramsayjones.plus.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-05-27format_commit_message: honor `color=auto` for `%C(auto)`Edward Thomson
git-log(1) documents that when specifying the `%C(auto)` format placeholder will "turn on auto coloring on the next %placeholders until the color is switched again." However, when `%C(auto)` is used, the present implementation will turn colors on unconditionally (even if the color configuration is turned off for the current context - for example, `--no-color` was specified or the color is `auto` and the output is not a tty). Update `format_commit_one` to examine the current context when a format string of `%C(auto)` is specified, which ensures that we will not unconditionally write colors. This brings that behavior in line with the behavior of `%C(auto,<colorname>)`, and allows the user the ability to specify that color should be displayed only when the output is a tty. Additionally, add a test for `%C(auto)` and update the existing tests for `%C(auto,...)` as they were misidentified as being applicable to `%C(auto)`. Tests from Jeff King. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Edward Thomson <ethomson@edwardthomson.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-05-27l10n: sv.po: Update Swedish translation (2597t0f0u)Peter Krefting
Signed-off-by: Peter Krefting <peter@softwolves.pp.se>
2016-05-26l10n: fr.po v2.9.0rnd1Jean-Noel Avila
Signed-off-by: Jean-Noel Avila <jn.avila@free.fr>
2016-05-26Sync with maintJunio C Hamano
* maint: Start preparing for 2.8.4 archive-tar: convert snprintf to xsnprintf
2016-05-26Start preparing for 2.8.4Junio C Hamano
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-05-26Merge branch 'jc/linkgit-fix' into maintJunio C Hamano
Many 'linkgit:<git documentation page>' references were broken, which are all fixed with this. * jc/linkgit-fix: Documentation: fix linkgit references
2016-05-26Merge branch 'ls/travis-build-doc' into maintJunio C Hamano
CI test was taught to build documentation pages. * ls/travis-build-doc: travis-ci: build documentation
2016-05-26Merge branch 'jc/fsck-nul-in-commit' into maintJunio C Hamano
"git fsck" learned to catch NUL byte in a commit object as potential error and warn. * jc/fsck-nul-in-commit: fsck: detect and warn a commit with embedded NUL fsck_commit_buffer(): do not special case the last validation
2016-05-26Merge branch 'jk/rebase-interative-eval-fix' into maintJunio C Hamano
Portability enhancement for "rebase -i" to help platforms whose shell does not like "for i in <empty>" (which is not POSIX-kosher). * jk/rebase-interative-eval-fix: rebase--interactive: avoid empty list in shell for-loop
2016-05-26Merge branch 'js/windows-dotgit' into maintJunio C Hamano
On Windows, .git and optionally any files whose name starts with a dot are now marked as hidden, with a core.hideDotFiles knob to customize this behaviour. * js/windows-dotgit: mingw: remove unnecessary definition mingw: introduce the 'core.hideDotFiles' setting
2016-05-26Merge branch 'kf/gpg-sig-verification-doc' into maintJunio C Hamano
Documentation for "git merge --verify-signatures" has been updated to clarify that the signature of only the commit at the tip is verified. Also the phrasing used for signature and key validity is adjusted to align with that used by OpenPGP. * kf/gpg-sig-verification-doc: Documentation: clarify signature verification
2016-05-26Merge branch 'lp/typofixes' into maintJunio C Hamano
Typofixes. * lp/typofixes: typofix: assorted typofixes in comments, documentation and messages
2016-05-26Merge branch 'sb/z-is-gnutar-ism' into maintJunio C Hamano
Test fix. * sb/z-is-gnutar-ism: t6041: do not compress backup tar file t3513: do not compress backup tar file
2016-05-26Merge branch 'va/i18n-misc-updates' into maintJunio C Hamano
Mark several messages for translation. * va/i18n-misc-updates: i18n: unpack-trees: avoid substituting only a verb in sentences i18n: builtin/pull.c: split strings marked for translation i18n: builtin/pull.c: mark placeholders for translation i18n: git-parse-remote.sh: mark strings for translation i18n: branch: move comment for translators i18n: branch: unmark string for translation i18n: builtin/rm.c: remove a comma ',' from string i18n: unpack-trees: mark strings for translation i18n: builtin/branch.c: mark option for translation i18n: index-pack: use plural string instead of normal one