summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Seventh batch for 2.17Junio C Hamano2018-03-061-0/+50
| | | | Signed-off-by: Junio C Hamano <gitster@pobox.com>
* Merge branch 'bw/perl-timegm-timelocal-fix'Junio C Hamano2018-03-064-4/+8
|\ | | | | | | | | | | | | Y2k20 fix ;-) for our perl scripts. * bw/perl-timegm-timelocal-fix: perl: call timegm and timelocal with 4-digit year
| * perl: call timegm and timelocal with 4-digit yearbw/perl-timegm-timelocal-fixBernhard M. Wiedemann2018-02-234-4/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Amazingly, timegm(gmtime(0)) is only 0 before 2020 because perl's timegm deviates from GNU timegm(3) in how it handles years. man Time::Local says Whenever possible, use an absolute four digit year instead. with a detailed explanation about ambiguity of 2-digit years above that. Even though this ambiguity is error-prone with >50% of users getting it wrong, it has been like this for 20+ years, so we just use 4-digit years everywhere to be on the safe side. We add some extra logic to cvsimport because it allows 2-digit year input and interpreting an 18 as 1918 can be avoided easily and safely. Signed-off-by: Bernhard M. Wiedemann <bwiedemann@suse.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | Merge branch 'jk/strbuf-read-file-close-error'Junio C Hamano2018-03-061-1/+5
|\ \ | | | | | | | | | | | | | | | | | | Code clean-up. * jk/strbuf-read-file-close-error: strbuf_read_file(): preserve errno across close() call
| * | strbuf_read_file(): preserve errno across close() calljk/strbuf-read-file-close-errorJeff King2018-02-231-1/+5
| |/ | | | | | | | | | | | | | | | | | | If we encounter a read error, the user may want to report it by looking at errno. However, our close() call may clobber errno, leading to confusing results. Let's save and restore it in the error case. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | Merge branch 'bw/c-plus-plus'Junio C Hamano2018-03-0663-662/+663
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Avoid using identifiers that clash with C++ keywords. Even though it is not a goal to compile Git with C++ compilers, changes like this help use of code analysis tools that targets C++ on our codebase. * bw/c-plus-plus: (37 commits) replace: rename 'new' variables trailer: rename 'template' variables tempfile: rename 'template' variables wrapper: rename 'template' variables environment: rename 'namespace' variables diff: rename 'template' variables environment: rename 'template' variables init-db: rename 'template' variables unpack-trees: rename 'new' variables trailer: rename 'new' variables submodule: rename 'new' variables split-index: rename 'new' variables remote: rename 'new' variables ref-filter: rename 'new' variables read-cache: rename 'new' variables line-log: rename 'new' variables imap-send: rename 'new' variables http: rename 'new' variables entry: rename 'new' variables diffcore-delta: rename 'new' variables ...
| * | replace: rename 'new' variablesbw/c-plus-plusBrandon Williams2018-02-221-17/+17
| | | | | | | | | | | | | | | | | | | | | | | | Rename C++ keyword in order to bring the codebase closer to being able to be compiled with a C++ compiler. Signed-off-by: Brandon Williams <bmwill@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | trailer: rename 'template' variablesBrandon Williams2018-02-221-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | Rename C++ keyword in order to bring the codebase closer to being able to be compiled with a C++ compiler. Signed-off-by: Brandon Williams <bmwill@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | tempfile: rename 'template' variablesBrandon Williams2018-02-222-23/+23
| | | | | | | | | | | | | | | | | | | | | | | | Rename C++ keyword in order to bring the codebase closer to being able to be compiled with a C++ compiler. Signed-off-by: Brandon Williams <bmwill@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | wrapper: rename 'template' variablesBrandon Williams2018-02-222-22/+22
| | | | | | | | | | | | | | | | | | | | | | | | Rename C++ keyword in order to bring the codebase closer to being able to be compiled with a C++ compiler. Signed-off-by: Brandon Williams <bmwill@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | environment: rename 'namespace' variablesBrandon Williams2018-02-221-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | Rename C++ keyword in order to bring the codebase closer to being able to be compiled with a C++ compiler. Signed-off-by: Brandon Williams <bmwill@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | diff: rename 'template' variablesBrandon Williams2018-02-221-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | Rename C++ keyword in order to bring the codebase closer to being able to be compiled with a C++ compiler. Signed-off-by: Brandon Williams <bmwill@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | environment: rename 'template' variablesBrandon Williams2018-02-222-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | Rename C++ keyword in order to bring the codebase closer to being able to be compiled with a C++ compiler. Signed-off-by: Brandon Williams <bmwill@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | init-db: rename 'template' variablesBrandon Williams2018-02-221-15/+15
| | | | | | | | | | | | | | | | | | | | | | | | Rename C++ keyword in order to bring the codebase closer to being able to be compiled with a C++ compiler. Signed-off-by: Brandon Williams <bmwill@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | unpack-trees: rename 'new' variablesBrandon Williams2018-02-221-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | Rename C++ keyword in order to bring the codebase closer to being able to be compiled with a C++ compiler. Signed-off-by: Brandon Williams <bmwill@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | trailer: rename 'new' variablesBrandon Williams2018-02-221-17/+17
| | | | | | | | | | | | | | | | | | | | | | | | Rename C++ keyword in order to bring the codebase closer to being able to be compiled with a C++ compiler. Signed-off-by: Brandon Williams <bmwill@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | submodule: rename 'new' variablesBrandon Williams2018-02-222-16/+16
| | | | | | | | | | | | | | | | | | | | | | | | Rename C++ keyword in order to bring the codebase closer to being able to be compiled with a C++ compiler. Signed-off-by: Brandon Williams <bmwill@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | split-index: rename 'new' variablesBrandon Williams2018-02-222-9/+9
| | | | | | | | | | | | | | | | | | | | | | | | Rename C++ keyword in order to bring the codebase closer to being able to be compiled with a C++ compiler. Signed-off-by: Brandon Williams <bmwill@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | remote: rename 'new' variablesBrandon Williams2018-02-221-10/+10
| | | | | | | | | | | | | | | | | | | | | | | | Rename C++ keyword in order to bring the codebase closer to being able to be compiled with a C++ compiler. Signed-off-by: Brandon Williams <bmwill@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | ref-filter: rename 'new' variablesBrandon Williams2018-02-221-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | Rename C++ keyword in order to bring the codebase closer to being able to be compiled with a C++ compiler. Signed-off-by: Brandon Williams <bmwill@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | read-cache: rename 'new' variablesBrandon Williams2018-02-221-20/+20
| | | | | | | | | | | | | | | | | | | | | | | | Rename C++ keyword in order to bring the codebase closer to being able to be compiled with a C++ compiler. Signed-off-by: Brandon Williams <bmwill@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | line-log: rename 'new' variablesBrandon Williams2018-02-221-28/+28
| | | | | | | | | | | | | | | | | | | | | | | | Rename C++ keyword in order to bring the codebase closer to being able to be compiled with a C++ compiler. Signed-off-by: Brandon Williams <bmwill@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | imap-send: rename 'new' variablesBrandon Williams2018-02-221-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | Rename C++ keyword in order to bring the codebase closer to being able to be compiled with a C++ compiler. Signed-off-by: Brandon Williams <bmwill@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | http: rename 'new' variablesBrandon Williams2018-02-221-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | Rename C++ keyword in order to bring the codebase closer to being able to be compiled with a C++ compiler. Signed-off-by: Brandon Williams <bmwill@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | entry: rename 'new' variablesBrandon Williams2018-02-221-20/+20
| | | | | | | | | | | | | | | | | | | | | | | | Rename C++ keyword in order to bring the codebase closer to being able to be compiled with a C++ compiler. Signed-off-by: Brandon Williams <bmwill@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | diffcore-delta: rename 'new' variablesBrandon Williams2018-02-221-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | Rename C++ keyword in order to bring the codebase closer to being able to be compiled with a C++ compiler. Signed-off-by: Brandon Williams <bmwill@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | diff: rename 'new' variablesBrandon Williams2018-02-221-22/+22
| | | | | | | | | | | | | | | | | | | | | | | | Rename C++ keyword in order to bring the codebase closer to being able to be compiled with a C++ compiler. Signed-off-by: Brandon Williams <bmwill@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | diff-lib: rename 'new' variableBrandon Williams2018-02-221-19/+19
| | | | | | | | | | | | | | | | | | | | | | | | Rename C++ keyword in order to bring the codebase closer to being able to be compiled with a C++ compiler. Signed-off-by: Brandon Williams <bmwill@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | commit: rename 'new' variablesBrandon Williams2018-02-221-9/+9
| | | | | | | | | | | | | | | | | | | | | | | | Rename C++ keyword in order to bring the codebase closer to being able to be compiled with a C++ compiler. Signed-off-by: Brandon Williams <bmwill@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | combine-diff: rename 'new' variablesBrandon Williams2018-02-221-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | Rename C++ keyword in order to bring the codebase closer to being able to be compiled with a C++ compiler. Signed-off-by: Brandon Williams <bmwill@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | remote: rename 'new' variablesBrandon Williams2018-02-221-33/+33
| | | | | | | | | | | | | | | | | | | | | | | | Rename C++ keyword in order to bring the codebase closer to being able to be compiled with a C++ compiler. Signed-off-by: Brandon Williams <bmwill@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | reflog: rename 'new' variablesBrandon Williams2018-02-221-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | Rename C++ keyword in order to bring the codebase closer to being able to be compiled with a C++ compiler. Signed-off-by: Brandon Williams <bmwill@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | pack-redundant: rename 'new' variablesBrandon Williams2018-02-221-27/+27
| | | | | | | | | | | | | | | | | | | | | | | | Rename C++ keyword in order to bring the codebase closer to being able to be compiled with a C++ compiler. Signed-off-by: Brandon Williams <bmwill@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | help: rename 'new' variablesBrandon Williams2018-02-221-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | Rename C++ keyword in order to bring the codebase closer to being able to be compiled with a C++ compiler. Signed-off-by: Brandon Williams <bmwill@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | checkout: rename 'new' variablesBrandon Williams2018-02-221-98/+98
| | | | | | | | | | | | | | | | | | | | | | | | Rename C++ keyword in order to bring the codebase closer to being able to be compiled with a C++ compiler. Signed-off-by: Brandon Williams <bmwill@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | apply: rename 'new' variablesBrandon Williams2018-02-221-27/+27
| | | | | | | | | | | | | | | | | | | | | | | | Rename C++ keyword in order to bring the codebase closer to being able to be compiled with a C++ compiler. Signed-off-by: Brandon Williams <bmwill@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | apply: rename 'try' variablesBrandon Williams2018-02-221-34/+34
| | | | | | | | | | | | | | | | | | | | | | | | Rename C++ keyword in order to bring the codebase closer to being able to be compiled with a C++ compiler. Signed-off-by: Brandon Williams <bmwill@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | diff: rename 'this' variablesBrandon Williams2018-02-221-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | Rename C++ keyword in order to bring the codebase closer to being able to be compiled with a C++ compiler. Signed-off-by: Brandon Williams <bmwill@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | rev-parse: rename 'this' variableBrandon Williams2018-02-141-17/+17
| | | | | | | | | | | | | | | | | | | | | | | | Rename C++ keyword in order to bring the codebase closer to being able to be compiled with a C++ compiler. Signed-off-by: Brandon Williams <bmwill@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | pack-objects: rename 'this' variablesBrandon Williams2018-02-141-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | Rename C++ keyword in order to bring the codebase closer to being able to be compiled with a C++ compiler. Signed-off-by: Brandon Williams <bmwill@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | blame: rename 'this' variablesBrandon Williams2018-02-141-16/+17
| | | | | | | | | | | | | | | | | | | | | | | | Rename C++ keyword in order to bring the codebase closer to being able to be compiled with a C++ compiler. Signed-off-by: Brandon Williams <bmwill@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | object: rename function 'typename' to 'type_name'Brandon Williams2018-02-1432-73/+73
| | | | | | | | | | | | | | | | | | | | | | | | Rename C++ keyword in order to bring the codebase closer to being able to be compiled with a C++ compiler. Signed-off-by: Brandon Williams <bmwill@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | object_info: change member name from 'typename' to 'type_name'Brandon Williams2018-02-144-10/+10
| | | | | | | | | | | | | | | | | | | | | | | | Rename C++ keyword in order to bring the codebase closer to being able to be compiled with a C++ compiler. Signed-off-by: Brandon Williams <bmwill@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | Merge branch 'rs/strbuf-read-file-or-whine'Junio C Hamano2018-03-061-46/+28
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | Code clean-up. * rs/strbuf-read-file-or-whine: sequencer: factor out strbuf_read_file_or_whine()
| * | | sequencer: factor out strbuf_read_file_or_whine()rs/strbuf-read-file-or-whineRené Scharfe2018-02-221-46/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Reduce code duplication by factoring out a function that reads an entire file into a strbuf, or reports errors on stderr if something goes wrong. Signed-off-by: Rene Scharfe <l.s.r@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | Merge branch 'ms/non-ascii-ticks'Junio C Hamano2018-03-061-7/+7
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Doc markup fix. * ms/non-ascii-ticks: Documentation/gitsubmodules.txt: avoid non-ASCII apostrophes
| * | | | Documentation/gitsubmodules.txt: avoid non-ASCII apostrophesms/non-ascii-ticksMotoki Seki2018-02-221-7/+7
| | |_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In gitsubmodules.txt, a few non-ASCII apostrophes are used to spell possessive, e.g. "submodule's". These unfortunately are not rendered at https://git-scm.com/docs/gitsubmodules correctly by the renderer used there. Use ASCII apostrophes instead to work around the problem. It also is good to be consistent, as there are possessives spelled with ASCII apostrophes. Signed-off-by: Motoki Seki <marmot.motoki@gmail.com> Acked-by: Stefan Beller <sbeller@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | Merge branch 'jk/test-helper-v-output-fix'Junio C Hamano2018-03-061-10/+10
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Test framework update. * jk/test-helper-v-output-fix: t: send verbose test-helper output to fd 4
| * | | | t: send verbose test-helper output to fd 4jk/test-helper-v-output-fixJeff King2018-02-221-10/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Test helper functions like test_must_fail may produce messages to stderr when they see a problem. When the tests are run with "--verbose", this ends up on the test script's stderr, and the user can read it. But there's a problem. Some tests record stderr as part of the test, like: test_must_fail git foo 2>output && test_i18ngrep expected.message output In this case the error text goes into "output". This makes the --verbose output less useful (it also means we might accidentally match it in the second, though in practice we tend to produce these messages only on error, so we'd abort the test when the first command fails). Let's instead send this user-facing output directly to descriptor 4, which always points to the original stderr (or /dev/null in non-verbose mode). And it's already forbidden to redirect descriptor 4, since we use it for BASH_XTRACEFD, as explained in 9be795fbce (t5615: avoid re-using descriptor 4, 2017-12-08). Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | Merge branch 'jk/cached-commit-buffer'Junio C Hamano2018-03-065-46/+1
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Code clean-up. * jk/cached-commit-buffer: revision: drop --show-all option commit: drop uses of get_cached_commit_buffer()