summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2015-09-14Merge branch 'gb/apply-comment-typofix'Junio C Hamano
* gb/apply-comment-typofix: apply: comment grammar fix
2015-09-10Merge git://bogomips.org/git-svnJunio C Hamano
* git://bogomips.org/git-svn: git-svn: parse authors file more leniently
2015-09-10git-svn: parse authors file more lenientlyMichael J Gruber
Currently, git-svn parses an authors file using the perl regex /^(.+?|\(no author\))\s*=\s*(.+?)\s*<(.+)>\s*$/ in order to extract svn user name, real name and e-mail. This does not match an empty e-mail field like "<>". On the other hand, the output of an authors-prog is parsed with the perl regex /^\s*(.+?)\s*<(.*)>\s*$/ in order to extract real name and e-mail. So, specifying a trivial file grep such as grep "$1" /tmp/authors | head -n 1 | cut -d'=' -f2 | cut -c'2-' as the authors prog gives different results compared to specifying /tmp/authors as the authors file directly. Instead, make git svn uses the perl regex /^(.+?|\(no author\))\s*=\s*(.+?)\s*<(.*)>\s*$/ for parsing the authors file so that the same (slightly more lenient) regex is used in both cases. Reported-by: Till Schäfer <till2.schaefer@tu-dortmund.de> Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net> Signed-off-by: Eric Wong <normalperson@yhbt.net>
2015-09-09Sync with 2.5.2Junio C Hamano
2015-09-09Release Notes: typofixJunio C Hamano
Thanks to Andreas Schwab for careful reading. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-09-09apply: comment grammar fixGiuseppe Bilotta
Signed-off-by: Giuseppe Bilotta <giuseppe.bilotta@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-09-08Git 2.6-rc1v2.6.0-rc1Junio C Hamano
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-09-08Merge branch 'jc/builtin-am-signoff-regression-fix'Junio C Hamano
Recent "git am" had regression when adding a Signed-off-by line with its "-s" option by an unintended tightening of how an existing trailer block is detected. * jc/builtin-am-signoff-regression-fix: am: match --signoff to the original scripted version
2015-09-07am: match --signoff to the original scripted versionJunio C Hamano
Linus noticed that the recently reimplemented "git am -s" defines the trailer block too rigidly, resulting in an unnecessary blank line between the existing sign-offs and his new sign-off. An e-mail submission sent to Linus in real life ends with mixture of sign-offs and commentaries, e.g. title here message here Signed-off-by: Original Author <original@auth.or> [rv: tweaked frotz and nitfol] Signed-off-by: Re Viewer <rv@ew.er> Signed-off-by: Other Reviewer <other@rev.ewer> --- patch here Because the reimplementation reused append_signoff() helper that is used by other codepaths, which is unaware that people intermix such comments with their sign-offs in the trailer block, such a message was judged to end with a non-trailer, resulting in an extra blank line before adding a new sign-off. The original scripted version of "git am" used a lot looser definition, i.e. "if and only if there is no line that begins with Signed-off-by:, add a blank line before adding a new sign-off". For the upcoming release, stop using the append_signoff() in "git am" and reimplement the looser definition used by the scripted version to use only in "git am" to fix this regression in "am" while avoiding new regressions to other users of append_signoff(). In the longer term, we should look into loosening append_signoff() so that other codepaths that add a new sign-off behave the same way as "git am -s", but that is a task for post-release. Reported-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-09-04Sync with maintJunio C Hamano
* maint:
2015-09-04Git 2.5.2v2.5.2Junio C Hamano
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-09-04Sync with 2.4.9Junio C Hamano
2015-09-04Git 2.4.9v2.4.9Junio C Hamano
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-09-04Sync with 2.3.9Junio C Hamano
2015-09-04Git 2.3.9v2.3.9Junio C Hamano
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-09-04Sync with 2.2.3Junio C Hamano
2015-09-04Git 2.2.3v2.2.3Junio C Hamano
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-09-04Merge branch 'jk/long-paths' into maint-2.2Junio C Hamano
2015-09-04show-branch: use a strbuf for reflog descriptionsJeff King
When we show "branch@{0}", we format into a fixed-size buffer using sprintf. This can overflow if you have long branch names. We can fix it by using a temporary strbuf. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-09-04read_info_alternates: handle paths larger than PATH_MAXJeff King
This function assumes that the relative_base path passed into it is no larger than PATH_MAX, and writes into a fixed-size buffer. However, this path may not have actually come from the filesystem; for example, add_submodule_odb generates a path using a strbuf and passes it in. This is hard to trigger in practice, though, because the long submodule directory would have to exist on disk before we would try to open its info/alternates file. We can easily avoid the bug, though, by simply creating the filename on the heap. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-09-04notes: use a strbuf in add_non_noteJeff King
When we are loading a notes tree into our internal hash table, we also collect any files that are clearly non-notes. We format the name of the file into a PATH_MAX buffer, but unlike true notes (which cannot be larger than a fanned-out sha1 hash), these tree entries can be arbitrarily long, overflowing our buffer. We can fix this by switching to a strbuf. It doesn't even cost us an extra allocation, as we can simply hand ownership of the buffer over to the non-note struct. This is of moderate security interest, as you might fetch notes trees from an untrusted remote. However, we do not do so by default, so you would have to manually fetch into the notes namespace. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-09-04verify_absent: allow filenames longer than PATH_MAXJeff King
When unpack-trees wants to know whether a path will overwrite anything in the working tree, we use lstat() to see if there is anything there. But if we are going to write "foo/bar", we can't just lstat("foo/bar"); we need to look for leading prefixes (e.g., "foo"). So we use the lstat cache to find the length of the leading prefix, and copy the filename up to that length into a temporary buffer (since the original name is const, we cannot just stick a NUL in it). The copy we make goes into a PATH_MAX-sized buffer, which will overflow if the prefix is longer than PATH_MAX. How this happens is a little tricky, since in theory PATH_MAX is the biggest path we will have read from the filesystem. But this can happen if: - the compiled-in PATH_MAX does not accurately reflect what the filesystem is capable of - the leading prefix is not _quite_ what is on disk; it contains the next element from the name we are checking. So if we want to write "aaa/bbb/ccc/ddd" and "aaa/bbb" exists, the prefix of interest is "aaa/bbb/ccc". If "aaa/bbb" approaches PATH_MAX, then "ccc" can overflow it. So this can be triggered, but it's hard to do. In particular, you cannot just "git clone" a bogus repo. The verify_absent checks happen before unpack-trees writes anything to the filesystem, so there are never any leading prefixes during the initial checkout, and the bug doesn't trigger. And by definition, these files are larger than PATH_MAX, so writing them will fail, and clone will complain (though it may write a partial path, which will cause a subsequent "git checkout" to hit the bug). We can fix it by creating the temporary path on the heap. The extra malloc overhead is not important, as we are already making at least one stat() call (and probably more for the prefix discovery). Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-09-04Merge branch 'ee/clean-test-fixes' into maintJunio C Hamano
* ee/clean-test-fixes: t7300: fix broken && chains
2015-09-04Merge branch 'jk/log-missing-default-HEAD' into maintJunio C Hamano
"git init empty && git -C empty log" said "bad default revision 'HEAD'", which was found to be a bit confusing to new users. * jk/log-missing-default-HEAD: log: diagnose empty HEAD more clearly
2015-09-04Merge branch 'cc/trailers-corner-case-fix' into maintJunio C Hamano
The "interpret-trailers" helper mistook a multi-paragraph title of a commit log message with a colon in it as the end of the trailer block. * cc/trailers-corner-case-fix: trailer: support multiline title trailer: retitle a test and correct an in-comment message trailer: ignore first line of message
2015-09-04Merge branch ↵Junio C Hamano
'dt/commit-preserve-base-index-upon-opportunistic-cache-tree-update' into maint When re-priming the cache-tree opportunistically while committing the in-core index as-is, we mistakenly invalidated the in-core index too aggressively, causing the experimental split-index code to unnecessarily rewrite the on-disk index file(s). * dt/commit-preserve-base-index-upon-opportunistic-cache-tree-update: commit: don't rewrite shared index unnecessarily
2015-09-04Merge branch 'rs/archive-zip-many' into maintJunio C Hamano
"git archive" did not use zip64 extension when creating an archive with more than 64k entries, which nobody should need, right ;-)? * rs/archive-zip-many: archive-zip: support more than 65535 entries archive-zip: use a local variable to store the creator version t5004: test ZIP archives with many entries
2015-09-04Merge branch 'jc/calloc-pathspec' into maintJunio C Hamano
Minor code cleanup. * jc/calloc-pathspec: ps_matched: xcalloc() takes nmemb and then element size
2015-09-04Merge branch 'ss/fix-config-fd-leak' into maintJunio C Hamano
* ss/fix-config-fd-leak: config: close config file handle in case of error
2015-09-04Merge branch 'sg/wt-status-header-inclusion' into maintJunio C Hamano
* sg/wt-status-header-inclusion: wt-status: move #include "pathspec.h" to the header
2015-09-04Merge branch 'po/po-readme' into maintJunio C Hamano
Doc updates for i18n. * po/po-readme: po/README: Update directions for l10n contributors
2015-09-04Merge branch 'sg/t3020-typofix' into maintJunio C Hamano
* sg/t3020-typofix: t3020: fix typo in test description
2015-09-04Merge branch 'as/docfix-reflog-expire-unreachable' into maintJunio C Hamano
Docfix. * as/docfix-reflog-expire-unreachable: Documentation/config: fix inconsistent label on gc.*.reflogExpireUnreachable
2015-09-04Merge branch 'nd/fixup-linked-gitdir' into maintJunio C Hamano
The code in "multiple-worktree" support that attempted to recover from an inconsistent state updated an incorrect file. * nd/fixup-linked-gitdir: setup: update the right file in multiple checkouts
2015-09-04Merge branch 'jk/rev-list-has-no-notes' into maintJunio C Hamano
"git rev-list" does not take "--notes" option, but did not complain when one is given. * jk/rev-list-has-no-notes: rev-list: make it obvious that we do not support notes
2015-09-04Merge branch 'jk/fix-alias-pager-config-key-warnings' into maintJunio C Hamano
Because the configuration system does not allow "alias.0foo" and "pager.0foo" as the configuration key, the user cannot use '0foo' as a custom command name anyway, but "git 0foo" tried to look these keys up and emitted useless warnings before saying '0foo is not a git command'. These warning messages have been squelched. * jk/fix-alias-pager-config-key-warnings: config: silence warnings for command names with invalid keys
2015-09-04Merge branch 'nd/dwim-wildcards-as-pathspecs' into maintJunio C Hamano
Test updates for Windows. * nd/dwim-wildcards-as-pathspecs: t2019: skip test requiring '*' in a file name non Windows
2015-09-04Merge branch 'sg/help-group' into maintJunio C Hamano
We rewrote one of the build scripts in Perl but this reimplements in Bourne shell. * sg/help-group: generate-cmdlist: re-implement as shell script
2015-09-04Merge branch 'ps/t1509-chroot-test-fixup' into maintJunio C Hamano
t1509 test that requires a dedicated VM environment had some bitrot, which has been corrected. * ps/t1509-chroot-test-fixup: tests: fix cleanup after tests in t1509-root-worktree tests: fix broken && chains in t1509-root-worktree
2015-09-04Merge branch 'jh/strbuf-read-use-read-in-full' into maintJunio C Hamano
strbuf_read() used to have one extra iteration (and an unnecessary strbuf_grow() of 8kB), which was eliminated. * jh/strbuf-read-use-read-in-full: strbuf_read(): skip unnecessary strbuf_grow() at eof
2015-09-04Merge branch 'jk/long-error-messages' into maintJunio C Hamano
The codepath to produce error messages had a hard-coded limit to the size of the message, primarily to avoid memory allocation while calling die(). * jk/long-error-messages: vreportf: avoid intermediate buffer vreportf: report to arbitrary filehandles
2015-09-04Merge branch 'cb/open-noatime-clear-errno' into maintJunio C Hamano
When trying to see that an object does not exist, a state errno leaked from our "first try to open a packfile with O_NOATIME and then if it fails retry without it" logic on a system that refuses O_NOATIME. This confused us and caused us to die, saying that the packfile is unreadable, when we should have just reported that the object does not exist in that packfile to the caller. * cb/open-noatime-clear-errno: git_open_noatime: return with errno=0 on success
2015-09-04Merge branch 'mh/get-remote-group-fix' into maintJunio C Hamano
An off-by-one error made "git remote" to mishandle a remote with a single letter nickname. * mh/get-remote-group-fix: get_remote_group(): use skip_prefix() get_remote_group(): eliminate superfluous call to strcspn() get_remote_group(): rename local variable "space" to "wordlen" get_remote_group(): handle remotes with single-character names
2015-09-03Merge branch 'jk/am-rerere-lock-fix'Junio C Hamano
Recent "git am" introduced a double-locking failure when used with the "--3way" option that invokes rerere machinery. * jk/am-rerere-lock-fix: rerere: release lockfile in non-writing functions
2015-09-02Git 2.6-rc0v2.6.0-rc0Junio C Hamano
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-09-02Merge branch 'cc/trailers-corner-case-fix'Junio C Hamano
The "interpret-trailers" helper mistook a multi-paragraph title of a commit log message with a colon in it as the end of the trailer block. * cc/trailers-corner-case-fix: trailer: support multiline title
2015-09-02Merge branch 'sb/read-cache-one-indent-style-fix'Junio C Hamano
* sb/read-cache-one-indent-style-fix: read-cache: fix indentation in read_index_from
2015-09-02Merge branch 'ee/clean-test-fixes'Junio C Hamano
* ee/clean-test-fixes: t7300: fix broken && chains
2015-09-02Merge branch 'jk/log-missing-default-HEAD'Junio C Hamano
"git init empty && git -C empty log" said "bad default revision 'HEAD'", which was found to be a bit confusing to new users. * jk/log-missing-default-HEAD: log: diagnose empty HEAD more clearly
2015-09-01Ninth batch for 2.6Junio C Hamano
Signed-off-by: Junio C Hamano <gitster@pobox.com>