sort by:
Revision Author Date Message Commit Date
68eb7b1 Merge branch 'js/regexec-buf' into maint A follow-up to an already graduated topic. * js/regexec-buf: configure.ac: improve description of NO_REGEX test 28 October 2016, 16:01:12 UTC
76796d4 Merge branch 'rs/c-auto-resets-attributes' into maint When "%C(auto)" appears at the very beginning of the pretty format string, it did not need to issue the reset sequence, but it did. This is a small optimization to already graduated topic. * rs/c-auto-resets-attributes: pretty: avoid adding reset for %C(auto) if output is empty pretty: let %C(auto) reset all attributes 28 October 2016, 16:01:11 UTC
03969df Merge branch 'yk/git-tag-remove-mention-of-old-layout-in-doc' into maint Shorten description of auto-following in "git tag" by removing a mention of historical remotes layout which is not relevant to the main topic. * yk/git-tag-remove-mention-of-old-layout-in-doc: doc: remove reference to the traditional layout in git-tag.txt 28 October 2016, 16:01:10 UTC
749a227 doc: remove reference to the traditional layout in git-tag.txt This is the only place in the documentation that the traditional layout is mentioned, and it is confusing. Remove it. * Documentation/git-tag.txt: Here. Signed-off-by: Younes Khoudli <younes.khoudli@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com> 20 October 2016, 16:31:42 UTC
23415c2 Merge tag 'l10n-2.10.0-rnd2.4' of git://github.com/git-l10n/git-po into maint l10n-2.10.0-rnd2.4 * tag 'l10n-2.10.0-rnd2.4' of git://github.com/git-l10n/git-po: l10n: de.po: translate 260 new messages l10n: de.po: fix translation of autostash l10n: ru.po: update Russian translation 17 October 2016, 20:27:38 UTC
4dc2ce9 Merge branch 'russian-l10n' of https://github.com/DJm00n/git-po-ru * 'russian-l10n' of https://github.com/DJm00n/git-po-ru: l10n: ru.po: update Russian translation 16 October 2016, 12:11:41 UTC
6fcf786 l10n: de.po: translate 260 new messages Translate 260 new message came from git.pot updates in 9fa976f (l10n: git.pot: v2.10.0 round 1 (248 new, 56 removed)) and 5bd166d (l10n: git.pot: v2.10.0 round 2 (12 new, 44 removed)). Signed-off-by: Ralf Thielow <ralf.thielow@gmail.com> Acked-by: Matthias Rüster <matthias.ruester@gmail.com> 12 October 2016, 16:31:13 UTC
74eeaf7 Start preparing for 2.10.2 Signed-off-by: Junio C Hamano <gitster@pobox.com> 11 October 2016, 21:24:02 UTC
6823506 Merge branch 'jk/verify-packfile-gently' into maint A low-level function verify_packfile() was meant to show errors that were detected without dying itself, but under some conditions it didn't and died instead, which has been fixed. * jk/verify-packfile-gently: verify_packfile: check pack validity before accessing data 11 October 2016, 21:21:36 UTC
fdb70b1 Merge branch 'jc/worktree-config' into maint "git worktree", even though it used the default_abbrev setting that ought to be affected by core.abbrev configuration variable, ignored the variable setting. The command has been taught to read the default set of configuration variables to correct this. * jc/worktree-config: worktree: honor configuration variables 11 October 2016, 21:21:17 UTC
f7f0a87 Merge branch 'jc/verify-loose-object-header' into maint Codepaths that read from an on-disk loose object were too loose in validating what they are reading is a proper object file and sometimes read past the data they read from the disk, which has been corrected. H/t to Gustavo Grieco for reporting. * jc/verify-loose-object-header: unpack_sha1_header(): detect malformed object header streaming: make sure to notice corrupt object 11 October 2016, 21:21:03 UTC
0bc409d Merge branch 'rs/git-gui-use-modern-git-merge-syntax' into maint The original command line syntax for "git merge", which was "git merge <msg> HEAD <parent>...", has been deprecated for quite some time, and "git gui" was the last in-tree user of the syntax. This is finally fixed, so that we can move forward with the deprecation. * rs/git-gui-use-modern-git-merge-syntax: git-gui: stop using deprecated merge syntax 11 October 2016, 21:20:37 UTC
e1eb84c Merge branch 'kd/mailinfo-quoted-string' into maint An author name, that spelled a backslash-quoted double quote in the human readable part "My \"double quoted\" name", was not unquoted correctly while applying a patch from a piece of e-mail. * kd/mailinfo-quoted-string: mailinfo: unescape quoted-pair in header fields t5100-mailinfo: replace common path prefix with variable 11 October 2016, 21:20:32 UTC
54a9f14 Merge branch 'pb/rev-list-reverse-with-count' into maint Doc update to clarify what "log -3 --reverse" does. * pb/rev-list-reverse-with-count: rev-list-options: clarify the usage of --reverse 11 October 2016, 21:20:06 UTC
9534df9 Merge branch 'jc/blame-abbrev' into maint Almost everybody uses DEFAULT_ABBREV to refer to the default setting for the abbreviation, but "git blame" peeked into underlying variable bypassing the macro for no good reason. * jc/blame-abbrev: blame: use DEFAULT_ABBREV macro 11 October 2016, 21:19:52 UTC
18fd96f Merge branch 'jk/graph-padding-fix' into maint The "graph" API used in "git log --graph" miscounted the number of output columns consumed so far when drawing a padding line, which has been fixed; this did not affect any existing code as nobody tried to write anything after the padding on such a line, though. * jk/graph-padding-fix: graph: fix extra spaces in graph_padding_line 11 October 2016, 21:19:03 UTC
1f253d8 Merge branch 'sg/ref-filter-parse-optim' into maint The code that parses the format parameter of for-each-ref command has seen a micro-optimization. * sg/ref-filter-parse-optim: ref-filter: strip format option after a field name only once while parsing 11 October 2016, 21:18:57 UTC
a813b19 Merge branch 'rs/copy-array' into maint Code cleanup. * rs/copy-array: use COPY_ARRAY add COPY_ARRAY 11 October 2016, 21:18:32 UTC
f7e2e59 Merge branch 'dt/mailinfo' into maint * dt/mailinfo: add David Turner's Two Sigma address 11 October 2016, 21:17:52 UTC
842a516 configure.ac: improve description of NO_REGEX test The commit 2f8952250a ("regex: add regexec_buf() that can work on a non NUL-terminated string", 2016-09-21) changed description of NO_REGEX build config variable to be more neutral, and actually say that it is about support for REG_STARTEND. Change description in configure.ac to match. Change also the test message and variable name to match. The test just checks that REG_STARTEND is #defined. Issue-found-by: Ramsay Jones <ramsay@ramsayjones.plus.com> Signed-off-by: Jakub Narębski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com> 10 October 2016, 23:15:15 UTC
6406bdc Git 2.10.1 Signed-off-by: Junio C Hamano <gitster@pobox.com> 03 October 2016, 20:24:18 UTC
11738dd Merge branch 'jk/ident-ai-canonname-could-be-null' into maint In the codepath that comes up with the hostname to be used in an e-mail when the user didn't tell us, we looked at ai_canonname field in struct addrinfo without making sure it is not NULL first. * jk/ident-ai-canonname-could-be-null: ident: handle NULL ai_canonname 03 October 2016, 20:22:32 UTC
3d0049e Merge branch 'jk/doc-cvs-update' into maint Documentation around tools to import from CVS was fairly outdated. * jk/doc-cvs-update: docs/cvs-migration: mention cvsimport caveats docs/cvs-migration: update link to cvsps homepage docs/cvsimport: prefer cvs-fast-export to parsecvs 03 October 2016, 20:22:25 UTC
f4315ee Merge branch 'jk/pack-tag-of-tag' into maint "git pack-objects --include-tag" was taught that when we know that we are sending an object C, we want a tag B that directly points at C but also a tag A that points at the tag B. We used to miss the intermediate tag B in some cases. * jk/pack-tag-of-tag: pack-objects: walk tag chains for --include-tag t5305: simplify packname handling t5305: use "git -C" t5305: drop "dry-run" of unpack-objects t5305: move cleanup into test block 03 October 2016, 20:22:13 UTC
e94ce13 ref-filter: strip format option after a field name only once while parsing When parse_ref_filter_atom() iterates over a list of valid atoms to check that a field name is one of them, it has to strip the optional colon-separated format option suffix that might follow the field name. However, it does so inside the loop, i.e. it performs the exact same stripping over and over again. Move stripping the format option suffix out of that loop, so it's only performed once for each parsed field name. Signed-off-by: SZEDER Gábor <szeder@ira.uka.de> Signed-off-by: Junio C Hamano <gitster@pobox.com> 03 October 2016, 19:47:19 UTC
82b83da pretty: avoid adding reset for %C(auto) if output is empty We emit an escape sequence for resetting color and attribute for %C(auto) to make sure automatic coloring is displayed as intended. Stop doing that if the output strbuf is empty, i.e. when %C(auto) appears at the start of the format string, because then there is no need for a reset and we save a few bytes in the output. Signed-off-by: Rene Scharfe <l.s.r@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com> 30 September 2016, 03:44:09 UTC
92d4266 Prepare for 2.10.1 Signed-off-by: Junio C Hamano <gitster@pobox.com> 29 September 2016, 23:52:15 UTC
36f6403 Merge branch 'tg/add-chmod+x-fix' into maint "git add --chmod=+x <pathspec>" added recently only toggled the executable bit for paths that are either new or modified. This has been corrected to flip the executable bit for all paths that match the given pathspec. * tg/add-chmod+x-fix: t3700-add: do not check working tree file mode without POSIXPERM t3700-add: create subdirectory gently add: modify already added files when --chmod is given read-cache: introduce chmod_index_entry update-index: add test for chmod flags 29 September 2016, 23:49:47 UTC
bf3a55a Merge branch 'et/add-chmod-x' into maint "git add --chmod=+x" added recently lacked documentation, which has been corrected. * et/add-chmod-x: add: document the chmod option 29 September 2016, 23:49:46 UTC
cec5f0b Merge branch 'rt/rebase-i-broken-insn-advise' into maint When "git rebase -i" is given a broken instruction, it told the user to fix it with "--edit-todo", but didn't say what the step after that was (i.e. "--continue"). * rt/rebase-i-broken-insn-advise: rebase -i: improve advice on bad instruction lines 29 September 2016, 23:49:46 UTC
d2a4131 Merge branch 'ls/travis-homebrew-path-fix' into maint The procedure to build Git on Mac OS X for Travis CI hardcoded the internal directory structure we assumed HomeBrew uses, which was a no-no. The procedure has been updated to ask HomeBrew things we need to know to fix this. * ls/travis-homebrew-path-fix: travis-ci: ask homebrew for its path instead of hardcoding it 29 September 2016, 23:49:45 UTC
300e95f Merge branch 'js/regexec-buf' into maint Some codepaths in "git diff" used regexec(3) on a buffer that was mmap(2)ed, which may not have a terminating NUL, leading to a read beyond the end of the mapped region. This was fixed by introducing a regexec_buf() helper that takes a <ptr,len> pair with REG_STARTEND extension. * js/regexec-buf: regex: use regexec_buf() regex: add regexec_buf() that can work on a non NUL-terminated string regex: -G<pattern> feeds a non NUL-terminated string to regexec() and fails 29 September 2016, 23:49:45 UTC
d336b67 Merge branch 'nd/checkout-disambiguation' into maint "git checkout <word>" does not follow the usual disambiguation rules when the <word> can be both a rev and a path, to allow checking out a branch 'foo' in a project that happens to have a file 'foo' in the working tree without having to disambiguate. This was poorly documented and the check was incorrect when the command was run from a subdirectory. * nd/checkout-disambiguation: checkout: fix ambiguity check in subdir checkout.txt: document a common case that ignores ambiguation rules checkout: add some spaces between code and comment 29 September 2016, 23:49:44 UTC
7106584 Merge branch 'ep/doc-check-ref-format-example' into maint A shell script example in check-ref-format documentation has been fixed. * ep/doc-check-ref-format-example: git-check-ref-format.txt: fixup documentation 29 September 2016, 23:49:43 UTC
a74a3b7 Merge branch 'mm/config-color-ui-default-to-auto' into maint Documentation for individual configuration variables to control use of color (like `color.grep`) said that their default value is 'false', instead of saying their default is taken from `color.ui`. When we updated the default value for color.ui from 'false' to 'auto' quite a while ago, all of them broke. This has been corrected. * mm/config-color-ui-default-to-auto: Documentation/config: default for color.* is color.ui 29 September 2016, 23:49:42 UTC
eb293ac Merge branch 'jk/reduce-gc-aggressive-depth' into maint "git gc --aggressive" used to limit the delta-chain length to 250, which is way too deep for gaining additional space savings and is detrimental for runtime performance. The limit has been reduced to 50. * jk/reduce-gc-aggressive-depth: gc: default aggressive depth to 50 29 September 2016, 23:49:42 UTC
e25e6f3 Merge branch 'jk/rebase-i-drop-ident-check' into maint Even when "git pull --rebase=preserve" (and the underlying "git rebase --preserve") can complete without creating any new commit (i.e. fast-forwards), it still insisted on having a usable ident information (read: user.email is set correctly), which was less than nice. As the underlying commands used inside "git rebase" would fail with a more meaningful error message and advice text when the bogus ident matters, this extra check was removed. * jk/rebase-i-drop-ident-check: rebase-interactive: drop early check for valid ident 29 September 2016, 23:49:41 UTC
7b7e977 Merge branch 'jt/format-patch-base-info-above-sig' into maint "git format-patch --base=..." feature that was recently added showed the base commit information after "-- " e-mail signature line, which turned out to be inconvenient. The base information has been moved above the signature line. * jt/format-patch-base-info-above-sig: format-patch: show base info before email signature 29 September 2016, 23:49:40 UTC
08d0f7a Merge branch 'ks/perf-build-with-autoconf' into maint Performance tests done via "t/perf" did not use the same set of build configuration if the user relied on autoconf generated configuration. * ks/perf-build-with-autoconf: t/perf/run: copy config.mak.autogen & friends to build area 29 September 2016, 23:49:40 UTC
ef4f0ca Merge branch 'rs/xdiff-merge-overlapping-hunks-for-W-context' into maint "git diff -W" output needs to extend the context backward to include the header line of the current function and also forward to include the body of the entire current function up to the header line of the next one. This process may have to merge to adjacent hunks, but the code forgot to do so in some cases. * rs/xdiff-merge-overlapping-hunks-for-W-context: xdiff: fix merging of hunks with -W context and -u context 29 September 2016, 23:49:39 UTC
e007a09 Merge branch 'ew/http-do-not-forget-to-call-curl-multi-remove-handle' into maint The http transport (with curl-multi option, which is the default these days) failed to remove curl-easy handle from a curlm session, which led to unnecessary API failures. * ew/http-do-not-forget-to-call-curl-multi-remove-handle: http: always remove curl easy from curlm session on release http: consolidate #ifdefs for curl_multi_remove_handle http: warn on curl_multi_add_handle failures 29 September 2016, 23:49:39 UTC
35ca3e5 Merge branch 'jk/patch-ids-no-merges' into maint "git log --cherry-pick" used to include merge commits as candidates to be matched up with other commits, resulting a lot of wasted time. The patch-id generation logic has been updated to ignore merges to avoid the wastage. * jk/patch-ids-no-merges: patch-ids: refuse to compute patch-id for merge commit patch-ids: turn off rename detection 29 September 2016, 23:49:38 UTC
d7e74c9 Merge branch 'js/git-gui-commit-gpgsign' into maint "git commit-tree" stopped reading commit.gpgsign configuration variable that was meant for Porcelain "git commit" in Git 2.9; we forgot to update "git gui" to look at the configuration to match this change. * js/git-gui-commit-gpgsign: git-gui: respect commit.gpgsign again 29 September 2016, 23:49:38 UTC
35ec7fd Merge branch 'jk/fix-remote-curl-url-wo-proto' into maint "git fetch http::/site/path" did not die correctly and segfaulted instead. * jk/fix-remote-curl-url-wo-proto: remote-curl: handle URLs without protocol 29 September 2016, 23:49:38 UTC
8183592 Merge branch 'sy/git-gui-i18n-ja' into maint Update Japanese translation for "git-gui". * sy/git-gui-i18n-ja: git-gui: update Japanese information git-gui: update Japanese translation git-gui: add Japanese language code git-gui: apply po template to Japanese translation git-gui: consistently use the same word for "blame" in Japanese git-gui: consistently use the same word for "remote" in Japanese 29 September 2016, 23:49:37 UTC
7333629 Merge branch 'mr/vcs-svn-printf-ulong' into maint Code cleanup. * mr/vcs-svn-printf-ulong: vcs-svn/fast_export: fix timestamp fmt specifiers 29 September 2016, 23:49:37 UTC
633212b Merge branch 'rs/unpack-trees-reduce-file-scope-global' into maint Code cleanup. * rs/unpack-trees-reduce-file-scope-global: unpack-trees: pass checkout state explicitly to check_updates() 29 September 2016, 23:49:36 UTC
b0af481 Merge branch 'rs/strbuf-remove-fix' into maint Code cleanup. * rs/strbuf-remove-fix: strbuf: use valid pointer in strbuf_remove() 29 September 2016, 23:49:35 UTC
3a3bb36 Merge branch 'rs/checkout-some-states-are-const' into maint Code cleanup. * rs/checkout-some-states-are-const: checkout: constify parameters of checkout_stage() and checkout_merged() 29 September 2016, 23:49:35 UTC
9e2c4fa Merge branch 'bw/pathspec-remove-unused-extern-decl' into maint Code cleanup. * bw/pathspec-remove-unused-extern-decl: pathspec: remove unnecessary function prototypes 29 September 2016, 23:49:34 UTC
1647793 graph: fix extra spaces in graph_padding_line The graph_padding_line() function outputs a series of "|" columns, and then pads with spaces to graph->width by calling graph_pad_horizontally(). However, we tell the latter that we wrote graph->num_columns characters, which is not true; we also needed spaces between the columns. Let's keep a count of how many characters we've written, which is what all the other callers of graph_pad_horizontally() do. Without this, any output that is written at the end of a padding line will be bumped out by at least an extra graph->num_columns spaces. Presumably nobody ever noticed the bug because there's no code path that actually writes to the end of a padding line. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com> 29 September 2016, 23:43:47 UTC
5293284 blame: use DEFAULT_ABBREV macro This does not make any practical difference in today's code, but everybody else accesses the default abbreviation length via the DEFAULT_ABBREV macro. Make sure this oddball codepath does not stray from the convention. Signed-off-by: Junio C Hamano <gitster@pobox.com> 28 September 2016, 21:56:00 UTC
f357e5d mailinfo: unescape quoted-pair in header fields rfc2822 has provisions for quoted strings in structured header fields, but also allows for escaping these with so-called quoted-pairs. The only thing git currently does is removing exterior quotes, but quotes within are left alone. Remove exterior quotes and remove escape characters so that they don't show up in the author field. Signed-off-by: Kevin Daudt <me@ikke.info> Signed-off-by: Junio C Hamano <gitster@pobox.com> 28 September 2016, 20:21:18 UTC
ee4d679 t5100-mailinfo: replace common path prefix with variable Many tests need to store data in a file, and repeat the same pattern to refer to that path: "$TEST_DIRECTORY"/t5100/ Create a variable that contains this path, and use that instead. While we're making this change, make sure the quotes are not just around the variable, but around the entire string to not give the impression we want shell splitting to affect the other variables. Signed-off-by: Kevin Daudt <me@ikke.info> Signed-off-by: Junio C Hamano <gitster@pobox.com> 28 September 2016, 20:16:59 UTC
04be694 rev-list-options: clarify the usage of --reverse Users often wonder if the oldest or the newest n commits are shown by `log -n --reverse`. Clarify that --reverse kicks in only after deciding which commits are to be shown to unconfuse them. Reported-by: Ruediger Meier <sweet_f_a@gmx.de> Signed-off-by: Pranit Bauva <pranit.bauva@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com> 27 September 2016, 22:09:07 UTC
d49028e worktree: honor configuration variables The command accesses default_abbrev (defined in environment.c and is updated via core.abbrev configuration), but never makes any call to git_config(). The output from "worktree list" ignores the abbrev setting for this reason. Make a call to git_config() to read the default set of configuration variables at the beginning of the command. Signed-off-by: Junio C Hamano <gitster@pobox.com> 27 September 2016, 17:51:33 UTC
8201688 add David Turner's Two Sigma address Signed-off-by: David Turner <novalis@novalis.org> Signed-off-by: Junio C Hamano <gitster@pobox.com> 27 September 2016, 00:46:44 UTC
d21f842 unpack_sha1_header(): detect malformed object header When opening a loose object file, we often do this sequence: - prepare a short buffer for the object header (on stack) - call unpack_sha1_header() and have early part of the object data inflated, enough to fill the buffer - parse that data in the short buffer, assuming that the first part of the object is <typename> SP <length> NUL Because the parsing function parse_sha1_header_extended() is not given the number of bytes inflated into the header buffer, it you craft a file whose early part inflates a garbage sequence without SP or NUL, and replace a loose object with it, it will end up reading past the end of the inflated data. To correct this, do the following four things: - rename unpack_sha1_header() to unpack_sha1_short_header() and have unpack_sha1_header_to_strbuf() keep calling that as its helper function. This will detect and report zlib errors, but is not aware of the format of a loose object (as before). - introduce unpack_sha1_header() that calls the same helper function, and when zlib reports it inflated OK into the buffer, check if the inflated data has NUL. This would ensure that parsing function will terminate within the buffer that holds the inflated header. - update unpack_sha1_header_to_strbuf() to check if the resulting buffer has NUL for the same effect. - update parse_sha1_header_extended() to make sure that its loop to find the SP that terminates the <typename> stops at NUL. Essentially, this makes unpack_*() functions that are asked to unpack a loose object header to be a bit more strict and detect an input that cannot possibly be a valid object header, even before the parsing function kicks in. Reported-by: Gustavo Grieco <gustavo.grieco@imag.fr> Helped-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com> 26 September 2016, 17:48:22 UTC
97026fe streaming: make sure to notice corrupt object The streaming read interface from a loose object called parse_sha1_header() but discarded its return value, without noticing a potential error. Signed-off-by: Junio C Hamano <gitster@pobox.com> 26 September 2016, 17:48:03 UTC
ff65e79 Merge branch 'rs/use-modern-git-merge-syntax' of git-gui into rs/git-gui-use-modern-git-merge-syntax * 'rs/use-modern-git-merge-syntax' of git-gui: git-gui: stop using deprecated merge syntax 26 September 2016, 14:16:48 UTC
b5f325c git-gui: stop using deprecated merge syntax Starting with v2.5.0 git merge can handle FETCH_HEAD internally and warns when it's called like 'git merge <message> HEAD <commit>' because that syntax is deprecated. Use this feature in git-gui and get rid of that warning. Signed-off-by: Rene Scharfe <l.s.r@web.de> Tested-by: Johannes Sixt <j6t@kdbg.org> Signed-off-by: Junio C Hamano <gitster@pobox.com> 26 September 2016, 14:15:28 UTC
45ccef8 use COPY_ARRAY Add a semantic patch for converting certain calls of memcpy(3) to COPY_ARRAY() and apply that transformation to the code base. The result is shorter and safer code. For now only consider calls where source and destination have the same type, or in other words: easy cases. Signed-off-by: Rene Scharfe <l.s.r@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com> 25 September 2016, 23:44:13 UTC
60566cb add COPY_ARRAY Add COPY_ARRAY, a safe and convenient helper for copying arrays, complementing ALLOC_ARRAY and REALLOC_ARRAY. Users just specify source, destination and the number of elements; the size of an element is inferred automatically. It checks if the multiplication of size and element count overflows. The inferred size is passed first to st_mult, which allows the division there to be done at compilation time. As a basic type safety check it makes sure the sizes of source and destination elements are the same. That's evaluated at compilation time as well. COPY_ARRAY is safe to use with NULL as source pointer iff 0 elements are to be copied. That convention is used in some cases for initializing arrays. Raw memcpy(3) does not support it -- compilers are allowed to assume that only valid pointers are passed to it and can optimize away NULL checks after such a call. Signed-off-by: Rene Scharfe <l.s.r@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com> 25 September 2016, 23:44:12 UTC
c375a7e ident: handle NULL ai_canonname We call getaddrinfo() to try to convert a short hostname into a fully-qualified one (to use it as an email domain). If there isn't a canonical name, getaddrinfo() will generally return either a NULL addrinfo list, or one in which ai->ai_canonname is a copy of the original name. However, if the result of gethostname() looks like an IP address, then getaddrinfo() behaves differently on some systems. On OS X, it will return a "struct addrinfo" with a NULL ai_canonname, and we segfault feeding it to strchr(). This is hard to test reliably because it involves not only a system where we we have to fallback to gethostname() to come up with an ident, but also where the hostname is a number with no dots. But I was able to replicate the bug by faking a hostname, like: diff --git a/ident.c b/ident.c index e20a772..b790d28 100644 --- a/ident.c +++ b/ident.c @@ -128,6 +128,7 @@ static void add_domainname(struct strbuf *out, int *is_bogus) *is_bogus = 1; return; } + xsnprintf(buf, sizeof(buf), "1"); if (strchr(buf, '.')) strbuf_addstr(out, buf); else if (canonical_name(buf, out) < 0) { and running "git var GIT_AUTHOR_IDENT" on an OS X system. Before this patch it segfaults, and after we correctly complain of the bogus "user@1.(none)" address (though this bogus address would be suitable for non-object uses like writing reflogs). Reported-by: Jonas Thiel <jonas.lierschied@gmx.de> Diagnosed-by: John Keeping <john@keeping.me.uk> Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com> 23 September 2016, 17:01:15 UTC
106b672 docs/cvs-migration: mention cvsimport caveats Back when this guide was written, cvsimport was the only game in town. These days it is probably not the best option. Rather than go into details, let's point people to the note at the top of cvsimport which gives other options. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com> 22 September 2016, 18:23:45 UTC
72e0877 docs/cvs-migration: update link to cvsps homepage The old page gives a 404 now. Searching for "cvsps" via Google returns a GitHub project page as the top hit. Reported-by: Dan Pritts Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com> 22 September 2016, 18:23:45 UTC
1eba3e5 docs/cvsimport: prefer cvs-fast-export to parsecvs parsecvs maintenance was taken over by ESR, and the name changed to cvs-fast-export as it learned to support that output format. Let's point to cvs-fast-export, as it should have additional bug-fixes and be more convenient to use. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com> 22 September 2016, 18:23:45 UTC
a9445d8 verify_packfile: check pack validity before accessing data The verify_packfile() does not explicitly open the packfile; instead, it starts with a sha1 checksum over the whole pack, and relies on use_pack() to open the packfile as a side effect. If the pack cannot be opened for whatever reason (either because its header information is corrupted, or perhaps because a simultaneous repack deleted it), then use_pack() will die(), as it has no way to return an error. This is not ideal, as verify_packfile() otherwise tries to gently return an error (this lets programs like git-fsck go on to check other packs). Instead, let's check is_pack_valid() up front, and return an error if it fails. This will open the pack as a side effect, and then use_pack() will later rely on our cached descriptor, and avoid calling die(). Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com> 22 September 2016, 18:18:13 UTC
f86f49b travis-ci: ask homebrew for its path instead of hardcoding it The TravisCI macOS build is broken because homebrew (a macOS dependency manager) changed its internal directory structure [1]. This is a problem because we modify the Perforce dependencies in the homebrew repository before installing them. Fix it by asking homebrew for its path instead of hardcoding it. [1] https://github.com/Homebrew/brew/commit/0a09ae30f8b6117ad699b4a0439010738989c547 Signed-off-by: Lars Schneider <larsxschneider@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com> 22 September 2016, 17:23:01 UTC
40e0dc1 t3700-add: do not check working tree file mode without POSIXPERM A recently introduced test checks the result of 'git status' after setting the executable bit on a file. This check does not yield the expected result when the filesystem does not support the executable bit. What we care about is that a file added with "--chmod=+x" has executable bit in the index and that "--chmod=+x" (or any other options for that matter) does not muck with working tree files. The former is tested by other existing tests, so let's check the latter more explicitly and only under POSIXPERM prerequisite. Signed-off-by: Johannes Sixt <j6t@kdbg.org> Signed-off-by: Junio C Hamano <gitster@pobox.com> 21 September 2016, 21:09:54 UTC
b7d36ff regex: use regexec_buf() The new regexec_buf() function operates on buffers with an explicitly specified length, rather than NUL-terminated strings. We need to use this function whenever the buffer we want to pass to regexec(3) may have been mmap(2)ed (and is hence not NUL-terminated). Note: the original motivation for this patch was to fix a bug where `git diff -G <regex>` would crash. This patch converts more callers, though, some of which allocated to construct NUL-terminated strings, or worse, modified buffers to temporarily insert NULs while calling regexec(3). By converting them to use regexec_buf(), the code has become much cleaner. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com> 21 September 2016, 20:56:15 UTC
2f89522 regex: add regexec_buf() that can work on a non NUL-terminated string We just introduced a test that demonstrates that our sloppy use of regexec() on a mmap()ed area can result in incorrect results or even hard crashes. So what we need to fix this is a function that calls regexec() on a length-delimited, rather than a NUL-terminated, string. Happily, there is an extension to regexec() introduced by the NetBSD project and present in all major regex implementation including Linux', MacOSX' and the one Git includes in compat/regex/: by using the (non-POSIX) REG_STARTEND flag, it is possible to tell the regexec() function that it should only look at the offsets between pmatch[0].rm_so and pmatch[0].rm_eo. That is exactly what we need. Since support for REG_STARTEND is so widespread by now, let's just introduce a helper function that always uses it, and tell people on a platform whose regex library does not support it to use the one from our compat/regex/ directory. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com> 21 September 2016, 20:56:15 UTC
db5dfa3 regex: -G<pattern> feeds a non NUL-terminated string to regexec() and fails When our pickaxe code feeds file contents to regexec(), it implicitly assumes that the file contents are read into implicitly NUL-terminated buffers (i.e. that we overallocate by 1, appending a single '\0'). This is not so. In particular when the file contents are simply mmap()ed, we can be virtually certain that the buffer is preceding uninitialized bytes, or invalid pages. Note that the test we add here is known to be flakey: we simply cannot know whether the byte following the mmap()ed ones is a NUL or not. Typically, on Linux the test passes. On Windows, it fails virtually every time due to an access violation (that's a segmentation fault for you Unix-y people out there). And Windows would be correct: the regexec() call wants to operate on a regular, NUL-terminated string, there is no NUL in the mmap()ed memory range, and it is undefined whether the next byte is even legal to access. When run with --valgrind it demonstrates quite clearly the breakage, of course. Being marked with `test_expect_failure`, this test will sometimes be declare "TODO fixed", even if it only passes by mistake. This test case represents a Minimal, Complete and Verifiable Example of a breakage reported by Chris Sidi. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com> 21 September 2016, 20:56:15 UTC
92dece7 git-check-ref-format.txt: fixup documentation die is not a standard shell function. Use a different shell code for the example. Signed-off-by: Elia Pinto <gitter.spiros@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com> 21 September 2016, 18:12:41 UTC
b07ad46 t3700-add: create subdirectory gently The subdirectory 'sub' is created early in the test file. Later, a test case removes it during its clean-up actions. However, this test case is protected by POSIXPERM. Consequently, 'sub' remains when the POSIXPERM prerequisite is not satisfied. Later, a recently introduced test case creates 'sub' again. Use -p with mkdir so that it does not fail if 'sub' already exists. Signed-off-by: Johannes Sixt <j6t@kdbg.org> Signed-off-by: Junio C Hamano <gitster@pobox.com> 21 September 2016, 18:05:35 UTC
b829b94 checkout: fix ambiguity check in subdir The two functions in parse_branchname_arg(), verify_non_filename and check_filename, need correct prefix in order to reconstruct the paths and check for their existence. With NULL prefix, they just check paths at top dir instead. Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com> 21 September 2016, 15:44:41 UTC
19e5656 checkout.txt: document a common case that ignores ambiguation rules Normally we err on the safe side: if something can be seen as both an SHA1 and a pathspec, we stop and scream. In checkout, there is one exception added in 859fdab (git-checkout: improve error messages, detect ambiguities. - 2008-07-23), to allow the common case "git checkout branch". Let's document this exception. Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com> 21 September 2016, 15:44:41 UTC
7c0304a Start preparing for 2.10.1 Signed-off-by: Junio C Hamano <gitster@pobox.com> 19 September 2016, 20:54:50 UTC
ddf8ee8 Merge branch 'sb/diff-cleanup' into maint Code cleanup. * sb/diff-cleanup: diff: remove dead code diff: omit found pointer from emit_callback diff.c: use diff_options directly 19 September 2016, 20:51:45 UTC
9f3d73e Merge branch 'ah/misc-message-fixes' into maint Message cleanup. * ah/misc-message-fixes: unpack-trees: do not capitalize "working" git-merge-octopus: do not capitalize "octopus" git-rebase--interactive: fix English grammar cat-file: put spaces around pipes in usage string am: put spaces around pipe in usage string 19 September 2016, 20:51:45 UTC
0303939 Merge branch 'sb/transport-report-missing-submodule-on-stderr' into maint Message cleanup. * sb/transport-report-missing-submodule-on-stderr: transport: report missing submodule pushes consistently on stderr 19 September 2016, 20:51:45 UTC
51673a7 Merge branch 'sb/xdiff-remove-unused-static-decl' into maint Code cleanup. * sb/xdiff-remove-unused-static-decl: xdiff: remove unneeded declarations 19 September 2016, 20:51:45 UTC
294573e Merge branch 'js/t9903-chaining' into maint Test fix. * js/t9903-chaining: t9903: fix broken && chain 19 September 2016, 20:51:44 UTC
c3befae Merge branch 'rs/hex2chr' into maint Code cleanup. * rs/hex2chr: introduce hex2chr() for converting two hexadecimal digits to a character 19 September 2016, 20:51:43 UTC
815a73f Merge branch 'rs/compat-strdup' into maint Code cleanup. * rs/compat-strdup: compat: move strdup(3) replacement to its own file 19 September 2016, 20:51:42 UTC
3d54b93 Merge branch 'jk/squelch-false-warning-from-gcc-o3' into maint Compilation fix. * jk/squelch-false-warning-from-gcc-o3: color_parse_mem: initialize "struct color" temporary error_errno: use constant return similar to error() 19 September 2016, 20:51:41 UTC
1e28677 Merge branch 'ep/use-git-trace-curl-in-tests' into maint Update a few tests that used to use GIT_CURL_VERBOSE to use the newer GIT_TRACE_CURL. * ep/use-git-trace-curl-in-tests: t5551-http-fetch-smart.sh: use the GIT_TRACE_CURL environment var t5550-http-fetch-dumb.sh: use the GIT_TRACE_CURL environment var test-lib.sh: preserve GIT_TRACE_CURL from the environment t5541-http-push-smart.sh: use the GIT_TRACE_CURL environment var 19 September 2016, 20:51:41 UTC
8e26535 Merge branch 'js/t6026-clean-up' into maint A test spawned a short-lived background process, which sometimes prevented the test directory from getting removed at the end of the script on some platforms. * js/t6026-clean-up: t6026-merge-attr: clean up background process at end of test case 19 September 2016, 20:51:41 UTC
d664531 Merge branch 'jc/forbid-symbolic-ref-d-HEAD' into maint "git symbolic-ref -d HEAD" happily removes the symbolic ref, but the resulting repository becomes an invalid one. Teach the command to forbid removal of HEAD. * jc/forbid-symbolic-ref-d-HEAD: symbolic-ref -d: do not allow removal of HEAD 19 September 2016, 20:51:41 UTC
4c10c31 Merge branch 'jc/submodule-anchor-git-dir' into maint Having a submodule whose ".git" repository is somehow corrupt caused a few commands that recurse into submodules loop forever. * jc/submodule-anchor-git-dir: submodule: avoid auto-discovery in prepare_submodule_repo_env() 19 September 2016, 20:51:40 UTC
79b51eb Merge branch 'jk/test-lib-drop-pid-from-results' into maint The test framework left the number of tests and success/failure count in the t/test-results directory, keyed by the name of the test script plus the process ID. The latter however turned out not to serve any useful purpose. The process ID part of the filename has been removed. * jk/test-lib-drop-pid-from-results: test-lib: drop PID from test-results/*.count 19 September 2016, 20:51:39 UTC
276661f Merge branch 'bh/diff-highlight-graph' into maint "diff-highlight" script (in contrib/) learned to work better with "git log -p --graph" output. * bh/diff-highlight-graph: diff-highlight: avoid highlighting combined diffs diff-highlight: add multi-byte tests diff-highlight: ignore test cruft diff-highlight: add support for --graph output diff-highlight: add failing test for handling --graph output diff-highlight: add some tests 19 September 2016, 20:51:38 UTC
f0b2db2 Merge branch 'po/range-doc' into maint Clarify various ways to specify the "revision ranges" in the documentation. * po/range-doc: doc: revisions: sort examples and fix alignment of the unchanged doc: revisions: show revision expansion in examples doc: revisions - clarify reachability examples doc: revisions - define `reachable` doc: gitrevisions - clarify 'latter case' is revision walk doc: gitrevisions - use 'reachable' in page description doc: revisions: single vs multi-parent notation comparison doc: revisions: extra clarification of <rev>^! notation effects doc: revisions: give headings for the two and three dot notations doc: show the actual left, right, and boundary marks doc: revisions - name the left and right sides doc: use 'symmetric difference' consistently 19 September 2016, 20:51:38 UTC
c99ad27 pretty: let %C(auto) reset all attributes Reset colors and attributes upon %C(auto) to enable full automatic control over them; otherwise attributes like bold or reverse could still be in effect from previous %C placeholders. Signed-off-by: Rene Scharfe <l.s.r@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com> 19 September 2016, 17:50:32 UTC
14d16e2 Documentation/config: default for color.* is color.ui Since 4c7f181 (make color.ui default to 'auto', 2013-06-10), the default for color.* when nothing is set is 'auto' and we still claimed that the default was 'false'. Be more precise by saying explicitly that the default is to follow color.ui, and recall that the default is 'auto' to avoid one indirection for the reader. Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com> 16 September 2016, 19:34:14 UTC
cd5c281 t/perf/run: copy config.mak.autogen & friends to build area Otherwise for people who use autotools-based configure in main worktree, the performance testing results will be inconsistent as work and build trees could be using e.g. different optimization levels. See e.g. http://public-inbox.org/git/20160818175222.bmm3ivjheokf2qzl@sigill.intra.peff.net/ for example. NOTE config.status has to be copied because otherwise without it the build would want to run reconfigure this way loosing just copied config.mak.autogen. Signed-off-by: Kirill Smelkov <kirr@nexedi.com> Signed-off-by: Junio C Hamano <gitster@pobox.com> 15 September 2016, 20:41:11 UTC
610d55a add: modify already added files when --chmod is given When the chmod option was added to git add, it was hooked up to the diff machinery, meaning that it only works when the version in the index differs from the version on disk. As the option was supposed to mirror the chmod option in update-index, which always changes the mode in the index, regardless of the status of the file, make sure the option behaves the same way in git add. Signed-off-by: Thomas Gummerer <t.gummerer@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com> 15 September 2016, 19:13:54 UTC
d9d7096 read-cache: introduce chmod_index_entry As there are chmod options for both add and update-index, introduce a new chmod_index_entry function to do the work. Use it in update-index, while it will be used in add in the next patch. Signed-off-by: Thomas Gummerer <t.gummerer@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com> 15 September 2016, 19:13:54 UTC
480871e format-patch: show base info before email signature Any text below the "-- " for the email signature gets treated as part of the signature, and many mail clients will trim it from the quoted text for a reply. Move it above the signature, so people can reply to it more easily. Similarly, when producing the patch as a MIME attachment, the original code placed the base info after the attached part, which would be discarded. Move the base info to the end of the part, still inside the part boundary. Add tests for the exact format of the email signature, and add tests to ensure that the base info appears before the email signature when producing a plain-text output, and that it appears before the part boundary when producing a MIME attachment. Signed-off-by: Josh Triplett <josh@joshtriplett.org> Signed-off-by: Junio C Hamano <gitster@pobox.com> 15 September 2016, 17:07:10 UTC
45d2f75 xdiff: fix merging of hunks with -W context and -u context If the function context for a hunk (with -W) reaches the beginning of the next hunk then we need to merge these two -- otherwise we'd show some lines twice, which looks strange and even confuses git apply. We already do this checking and merging in xdl_emit_diff(), but forget to consider regular context (with -u or -U). Fix that by merging hunks already if function context of the first one touches or overlaps regular context of the second one. Signed-off-by: Rene Scharfe <l.s.r@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com> 14 September 2016, 23:07:21 UTC
back to top