1
0
Fork 0
mirror of https://github.com/git/git.git synced 2024-11-01 14:57:52 +01:00
Commit graph

40734 commits

Author SHA1 Message Date
Junio C Hamano
f0bc854623 Sync with 2.5.2 2015-09-09 14:30:35 -07:00
Junio C Hamano
7a2c4af7a8 Release Notes: typofix
Thanks to Andreas Schwab for careful reading.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-09-09 10:34:35 -07:00
Junio C Hamano
689efb737a Git 2.6-rc1
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-09-08 15:38:43 -07:00
Junio C Hamano
d6a2b05cbb Merge branch 'jc/builtin-am-signoff-regression-fix'
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-08 15:35:05 -07:00
Junio C Hamano
aab845424e am: match --signoff to the original scripted version
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-06 19:59:40 -07:00
Junio C Hamano
ec371ff6e3 Sync with maint
* maint:
2015-09-04 14:34:57 -07:00
Junio C Hamano
27ea6f85be Git 2.5.2
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-09-04 10:46:07 -07:00
Junio C Hamano
3d3caf0b78 Sync with 2.4.9 2015-09-04 10:43:23 -07:00
Junio C Hamano
74b6763816 Git 2.4.9
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-09-04 10:36:14 -07:00
Junio C Hamano
ef0e938a1a Sync with 2.3.9 2015-09-04 10:34:19 -07:00
Junio C Hamano
ecad27cf98 Git 2.3.9
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-09-04 10:32:15 -07:00
Junio C Hamano
8267cd11d6 Sync with 2.2.3 2015-09-04 10:29:28 -07:00
Junio C Hamano
441c4a4017 Git 2.2.3
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-09-04 10:26:23 -07:00
Junio C Hamano
f54cb059b1 Merge branch 'jk/long-paths' into maint-2.2 2015-09-04 10:25:23 -07:00
Jeff King
78f23bdf68 show-branch: use a strbuf for reflog descriptions
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-04 09:48:26 -07:00
Jeff King
5015f01c12 read_info_alternates: handle paths larger than PATH_MAX
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-04 09:36:51 -07:00
Jeff King
c29edfefb6 notes: use a strbuf in add_non_note
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-04 09:36:28 -07:00
Jeff King
f514ef9787 verify_absent: allow filenames longer than PATH_MAX
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-04 08:50:50 -07:00
Junio C Hamano
fb8880dea3 Merge branch 'ee/clean-test-fixes' into maint
* ee/clean-test-fixes:
  t7300: fix broken && chains
2015-09-03 19:18:05 -07:00
Junio C Hamano
5af77d1352 Merge branch 'jk/log-missing-default-HEAD' into maint
"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-03 19:18:04 -07:00
Junio C Hamano
9d939886db Merge branch 'cc/trailers-corner-case-fix' into maint
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-03 19:18:03 -07:00
Junio C Hamano
311e5ce2cc Merge branch '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-03 19:18:02 -07:00
Junio C Hamano
1c82039228 Merge branch 'rs/archive-zip-many' into maint
"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-03 19:18:01 -07:00
Junio C Hamano
ae6ac8483b Merge branch 'jc/calloc-pathspec' into maint
Minor code cleanup.

* jc/calloc-pathspec:
  ps_matched: xcalloc() takes nmemb and then element size
2015-09-03 19:18:00 -07:00
Junio C Hamano
8136099a31 Merge branch 'ss/fix-config-fd-leak' into maint
* ss/fix-config-fd-leak:
  config: close config file handle in case of error
2015-09-03 19:17:59 -07:00
Junio C Hamano
dc4e7b0244 Merge branch 'sg/wt-status-header-inclusion' into maint
* sg/wt-status-header-inclusion:
  wt-status: move #include "pathspec.h" to the header
2015-09-03 19:17:57 -07:00
Junio C Hamano
659227be2e Merge branch 'po/po-readme' into maint
Doc updates for i18n.

* po/po-readme:
  po/README: Update directions for l10n contributors
2015-09-03 19:17:56 -07:00
Junio C Hamano
57a2bb1f92 Merge branch 'sg/t3020-typofix' into maint
* sg/t3020-typofix:
  t3020: fix typo in test description
2015-09-03 19:17:55 -07:00
Junio C Hamano
c1fa16b193 Merge branch 'as/docfix-reflog-expire-unreachable' into maint
Docfix.

* as/docfix-reflog-expire-unreachable:
  Documentation/config: fix inconsistent label on gc.*.reflogExpireUnreachable
2015-09-03 19:17:53 -07:00
Junio C Hamano
d6c196abfd Merge branch 'nd/fixup-linked-gitdir' into maint
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-03 19:17:53 -07:00
Junio C Hamano
e654e3b574 Merge branch 'jk/rev-list-has-no-notes' into maint
"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-03 19:17:53 -07:00
Junio C Hamano
fa6d3749ed Merge branch 'jk/fix-alias-pager-config-key-warnings' into maint
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-03 19:17:52 -07:00
Junio C Hamano
0b2cef2805 Merge branch 'nd/dwim-wildcards-as-pathspecs' into maint
Test updates for Windows.

* nd/dwim-wildcards-as-pathspecs:
  t2019: skip test requiring '*' in a file name non Windows
2015-09-03 19:17:51 -07:00
Junio C Hamano
969560bddc Merge branch 'sg/help-group' into maint
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-03 19:17:51 -07:00
Junio C Hamano
d11448f685 Merge branch 'ps/t1509-chroot-test-fixup' into maint
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-03 19:17:50 -07:00
Junio C Hamano
8b2707101a Merge branch 'jh/strbuf-read-use-read-in-full' into maint
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-03 19:17:50 -07:00
Junio C Hamano
6c0850f2dd Merge branch 'jk/long-error-messages' into maint
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-03 19:17:49 -07:00
Junio C Hamano
cbcd3dcaa8 Merge branch 'cb/open-noatime-clear-errno' into maint
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-03 19:17:49 -07:00
Junio C Hamano
03ea02771a Merge branch 'mh/get-remote-group-fix' into maint
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-03 19:17:48 -07:00
Junio C Hamano
7662973ea3 Merge branch 'jk/am-rerere-lock-fix'
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-03 14:14:01 -07:00
Junio C Hamano
16ffa6443e Git 2.6-rc0
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-09-02 12:55:28 -07:00
Junio C Hamano
cdd00dfe94 Merge branch 'cc/trailers-corner-case-fix'
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-02 12:50:21 -07:00
Junio C Hamano
8f8386eeb4 Merge branch 'sb/read-cache-one-indent-style-fix'
* sb/read-cache-one-indent-style-fix:
  read-cache: fix indentation in read_index_from
2015-09-02 12:50:18 -07:00
Junio C Hamano
83d9092f95 Merge branch 'ee/clean-test-fixes'
* ee/clean-test-fixes:
  t7300: fix broken && chains
2015-09-02 12:50:16 -07:00
Junio C Hamano
699a0f3748 Merge branch 'jk/log-missing-default-HEAD'
"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-02 12:50:10 -07:00
Junio C Hamano
7aa67f62c7 Ninth batch for 2.6
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-09-01 16:31:58 -07:00
Junio C Hamano
81d0e33a22 Merge branch 'dt/commit-preserve-base-index-upon-opportunistic-cache-tree-update'
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-01 16:31:29 -07:00
Junio C Hamano
0fb8e24234 Merge branch 'rt/remove-hold-lockfile-for-append'
* rt/remove-hold-lockfile-for-append:
  lockfile: remove function "hold_lock_file_for_append"
2015-09-01 16:31:27 -07:00
Junio C Hamano
565f575791 Merge branch 'rs/archive-zip-many'
"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-01 16:31:24 -07:00
Junio C Hamano
bb84dceb04 Merge branch 'ls/p4-fold-case-client-specs'
On case insensitive systems, "git p4" did not work well with client
specs.

* ls/p4-fold-case-client-specs:
  git-p4: honor core.ignorecase when using P4 client specs
2015-09-01 16:31:22 -07:00