summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* credential: ignore SIGPIPE when writing to credential helperseb/cred-helper-ignore-sigpipeErik E Brady2018-03-291-0/+3
| | | | | | | | | | | | | | | | | | | | | | | The credential subsystem can trigger SIGPIPE when writing to an external helper if that helper closes its stdin before reading the whole input. Normally this is rare, since helpers would need to read that input to make a decision about how to respond, but: 1. It's reasonable to configure a helper which only handles "get" while ignoring "store". Such a handler might not read stdin for "store", thereby rapidly closing stdin upon helper exit. 2. A broken or misbehaving helper might exit immediately. That's an error, but it's not reasonable for it to take down the parent Git process with SIGPIPE. Even with such a helper, seeing this problem should be rare. Getting SIGPIPE requires the helper racily exiting before we've written the fairly small credential output. Signed-off-by: Erik E Brady <brady@cisco.com> Reviewed-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* Git 2.16.3v2.16.3snapJunio C Hamano2018-03-223-2/+51
| | | | Signed-off-by: Junio C Hamano <gitster@pobox.com>
* Merge branch 'ms/non-ascii-ticks' into maintJunio C Hamano2018-03-221-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/cached-commit-buffer' into maintJunio C Hamano2018-03-225-46/+1
|\ \ | | | | | | | | | | | | | | | | | | | | | Code clean-up. * jk/cached-commit-buffer: revision: drop --show-all option commit: drop uses of get_cached_commit_buffer()
| * | revision: drop --show-all optionjk/cached-commit-bufferJeff King2018-02-223-42/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This was an undocumented debugging aid that does not seem to have come in handy in the past decade, judging from its lack of mentions on the mailing list. Let's drop it in the name of simplicity. This is morally a revert of 3131b71301 (Add "--show-all" revision walker flag for debugging, 2008-02-09), but note that I did leave in the mapping of UNINTERESTING to "^" in get_revision_mark(). I don't think this would be possible to trigger with the current code, but it's the only sensible marker. We'll skip the usual deprecation period because this was explicitly a debugging aid that was never documented. Signed-off-by: Jeff King <peff@peff.net> Acked-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | commit: drop uses of get_cached_commit_buffer()Jeff King2018-02-222-4/+1
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The "--show-all" revision option shows UNINTERESTING commits. Some of these commits may be unparsed when we try to show them (since we may or may not need to walk their parents to fulfill the request). Commit 3131b71301 (Add "--show-all" revision walker flag for debugging, 2008-02-09) resolved this by just skipping pretty-printing for commits without their object contents cached, saying: Because we now end up listing commits we may not even have been parsed at all "show_log" and "show_commit" need to protect against commits that don't have a commit buffer entry. That was the easy fix to avoid the pretty-printer segfaulting, but: 1. It doesn't work for all formats. E.g., --oneline prints the oid for each such commit but not a trailing newline, leading to jumbled output. 2. It only affects some commits, depending on whether we happened to parse them or not (so if they were at the tip of an UNINTERESTING starting point, or if we happened to traverse over them, you'd see more data). 3. It unncessarily ties the decision to show the verbose header to whether the commit buffer was cached. That makes it harder to change the logic around caching (e.g., if we could traverse without actually loading the full commit objects). These days it's safe to feed such a commit to the pretty-print code. Since be5c9fb904 (logmsg_reencode: lazily load missing commit buffers, 2013-01-26), we'll load it on demand in such a case. So let's just always show the verbose headers. This does change the behavior of plumbing, but: a. The --show-all option was explicitly introduced as a debugging aid, and was never documented (and has rarely even been mentioned on the list by git devs). b. Avoiding the commits was already not deterministic due to (2) above. So the caller might have seen full headers for these commits anyway, and would need to be prepared for it. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | Merge branch 'sm/mv-dry-run-update' into maintJunio C Hamano2018-03-222-2/+7
|\ \ | | | | | | | | | | | | | | | | | | | | | Code clean-up. * sm/mv-dry-run-update: mv: remove unneeded 'if (!show_only)' t7001: add test case for --dry-run
| * | mv: remove unneeded 'if (!show_only)'sm/mv-dry-run-updateStefan Moch2018-02-071-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit a127331cd (mv: allow moving nested submodules, 2016-04-19), introduced if (show_only) continue; in this for-loop before if (!show_only) which became redundant, because it is now always true. Signed-off-by: Stefan Moch <stefanmoch@mail.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | t7001: add test case for --dry-runStefan Moch2018-02-071-0/+6
| | | | | | | | | | | | | | | | | | | | | Make sure that "git mv --dry-run" does not move file. Signed-off-by: Stefan Moch <stefanmoch@mail.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | Merge branch 'tg/worktree-create-tracking' into maintJunio C Hamano2018-03-221-2/+3
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | Hotfix for a recent topic. * tg/worktree-create-tracking: git-worktree.txt: fix indentation of example and text of 'add' command git-worktree.txt: fix missing ")" typo
| * | | git-worktree.txt: fix indentation of example and text of 'add' commandtg/worktree-create-trackingEric Sunshine2018-02-161-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When 4e85333197 (worktree: make add <path> <branch> dwim, 2017-11-26) added an example command in a literal code block, it neglected to insert a mandatory "+" line before the block. This omission resulted in both the literal code block and the (existing) paragraph following the block to be outdented, even though they should be indented under the 'add' sub-command along with the rest of the text pertaining to that command. Furthermore, the mandatory "+" line separating the code block from the following text got rendered as a leading character on the line ("+ If <commit-ish>...") rather than being treated as a formatting directive. Fix these problems by adding the missing "+" line before the example code block. Signed-off-by: Eric Sunshine <sunshine@sunshineco.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | git-worktree.txt: fix missing ")" typoEric Sunshine2018-02-161-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add the closing ")" to a parenthetical phrase introduced by 4e85333197 (worktree: make add <path> <branch> dwim, 2017-11-26). While at it, add a missing ":" at the end of the same sentence since it precedes an example literal command block. Reported-by: Mike Nordell <tamlin.thefirst@gmail.com> Signed-off-by: Eric Sunshine <sunshine@sunshineco.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | Merge branch 'gs/test-unset-xdg-cache-home' into maintJunio C Hamano2018-03-221-0/+1
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Test update. * gs/test-unset-xdg-cache-home: test-lib.sh: unset XDG_CACHE_HOME
| * | | | test-lib.sh: unset XDG_CACHE_HOMEgs/test-unset-xdg-cache-homeGenki Sky2018-02-161-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git respects XDG_CACHE_HOME for the credential cache. So, we should unset XDG_CACHE_HOME for the test environment, lest a user's custom one cause failure in the test. For example, t/t0301-credential-cache.sh expects a default directory to be used if it hasn't explicitly set XDG_CACHE_HOME. Signed-off-by: Genki Sky <sky@genki.is> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | Merge branch 'sb/status-doc-fix' into maintJunio C Hamano2018-03-221-2/+2
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Docfix. * sb/status-doc-fix: Documentation/git-status: clarify status table for porcelain mode
| * | | | | Documentation/git-status: clarify status table for porcelain modesb/status-doc-fixStefan Beller2018-02-151-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It is possible to have the output ' A' from 'git status --porcelain' by adding a file using the '--intend-to-add' flag. Make this clear by adding the pattern in the table of the documentation. However the mode 'DM' (deleted in the index, modified in the working tree) is not possible in the non-merge case in which the file only shows as 'D ' (and adding it back to the worktree would show an additional line of an '??' untracked file). It is also not possible in the merge case as then the mode involves a 'U' on one side of the merge. Remove that pattern. Reported-by: Ross Light <light@google.com> Signed-off-by: Stefan Beller <sbeller@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | | Merge branch 'rd/typofix' into maintJunio C Hamano2018-03-225-6/+6
|\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Typofix. * rd/typofix: Correct mispellings of ".gitmodule" to ".gitmodules" t/: correct obvious typo "detahced"
| * | | | | | Correct mispellings of ".gitmodule" to ".gitmodules"rd/typofixRobert P. J. Day2018-02-144-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There are a small number of misspellings, ".gitmodule", scattered throughout the code base, correct them ... no apparent functional changes. Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | | | t/: correct obvious typo "detahced"Robert P. J. Day2018-02-141-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | | | Merge branch 'bp/fsmonitor' into maintJunio C Hamano2018-03-221-2/+2
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Doc update for a recently added feature. * bp/fsmonitor: fsmonitor: update documentation to remove reference to invalid config settings
| * | | | | | | fsmonitor: update documentation to remove reference to invalid config settingsbp/fsmonitorBen Peart2018-02-141-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove the reference to setting core.fsmonitor to `true` (or `false`) as those are not valid settings. Signed-off-by: Ben Peart <benpeart@microsoft.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | | | | Merge branch 'bc/doc-interpret-trailers-grammofix' into maintJunio C Hamano2018-03-221-1/+1
|\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Docfix. * bc/doc-interpret-trailers-grammofix: docs/interpret-trailers: fix agreement error
| * | | | | | | | docs/interpret-trailers: fix agreement errorbc/doc-interpret-trailers-grammofixbrian m. carlson2018-02-131-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In the description of git interpret-trailers, we describe "a group…of lines" that have certain characteristics. Ensure both options describing this group use a singular verb for parallelism. Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | | | | | Merge branch 'sg/doc-test-must-fail-args' into maintJunio C Hamano2018-03-222-2/+22
|\ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Devdoc update. * sg/doc-test-must-fail-args: t: document 'test_must_fail ok=<signal-name>'
| * | | | | | | | | t: document 'test_must_fail ok=<signal-name>'sg/doc-test-must-fail-argsSZEDER Gábor2018-02-122-2/+22
| | |_|_|_|_|_|/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since 'test_might_fail' is implemented as a thin wrapper around 'test_must_fail', it also accepts the same options. Mention this in the docs as well. Signed-off-by: SZEDER Gábor <szeder.dev@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | | | | | Merge branch 'rj/sparse-updates' into maintJunio C Hamano2018-03-222-1/+2
|\ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Devtool update. * rj/sparse-updates: Makefile: suppress a sparse warning for pack-revindex.c config.mak.uname: remove SPARSE_FLAGS setting for cygwin
| * | | | | | | | | Makefile: suppress a sparse warning for pack-revindex.crj/sparse-updatesRamsay Jones2018-02-121-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Sparse has, for a long time, been issuing the following warning against the pack-revindex.c file: SP pack-revindex.c pack-revindex.c:64:23: warning: memset with byte count of 262144 This results from a unconditional check, with a hard-coded limit, which is really only appropriate for the kernel source code. (The check is for a 'large' byte count in a call to memcpy(), memset(), copy_from_user() and copy_to_user() functions). A recent release of sparse (v0.5.1) has introduced some options to allow this check to be turned off (-Wno-memcpy-max-count) or to specify the actual limit used (-fmemcpy-max-count=COUNT), rather than a hard-coded limit of 100000. In order to suppress the warning, add a target for pack-revindex.sp that adds the '-Wno-memcpy-max-count' option to the SPARSE_FLAGS variable. Signed-off-by: Ramsay Jones <ramsay@ramsayjones.plus.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | | | | | | config.mak.uname: remove SPARSE_FLAGS setting for cygwinRamsay Jones2018-02-121-1/+0
| | |_|_|/ / / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since commit f66450ae9 ("cygwin: Remove the Win32 l/stat() implementation", 2013-06-22), the cygwin build has not used the WIN32 API/header files. This means that the '-isystem /usr/include/w32api' option to sparse is no longer necessary (to allow sparse to find the WIN32 header files). In addition, the '-Wno-one-bit-signed-bitfield' option can be removed, since the warning suppressed by that option was only provoked by a WIN32 header file. Signed-off-by: Ramsay Jones <ramsay@ramsayjones.plus.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | | | | | Merge branch 'jk/gettext-poison' into maintJunio C Hamano2018-03-222-8/+4
|\ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Test updates. * jk/gettext-poison: git-sh-i18n: check GETTEXT_POISON before USE_GETTEXT_SCHEME t0205: drop redundant test
| * | | | | | | | | git-sh-i18n: check GETTEXT_POISON before USE_GETTEXT_SCHEMEjk/gettext-poisonJeff King2018-02-081-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Running "make NO_GETTEXT=1 GETTEXT_POISON=1" currently fails t0205. While it might seem nonsensical at first glance to both poison and disable gettext, it's useful to be able to do a poison test-run on a system that doesn't have gettext at all. And it works fine for C programs; the problem is only with the shell code. The issue is that we check the baked-in USE_GETTEXT_SCHEME value before GETTEXT_POISON. And when NO_GETTEXT is set, the Makefile sets USE_GETTEXT_SCHEME to "fallthrough". So one fix would be to have the Makefile just set USE_GETTEXT_SCHEME to "poison" if GETTEXT_POISON is set. But there are two problems with that: 1. USE_GETTEXT_SCHEME is actually a user-facing knob, so conceivably somebody could override it with: make USE_GETTEXT_SCHEME=gnu GETTEXT_POISON=1 which would do the wrong thing (though that's much less likely than them having the variable set in their config.mak and just overriding GETTEXT_POISON on the command-line for a one-off test). 2. We don't actually bake GETTEXT_POISON in to the shell library like we do for the C code. It checks $GIT_GETTEXT_POISON at runtime, which is set up by the test suite. So it makes sense to put the fix in the runtime code, too, which would cover something like: GIT_GETTEXT_POISON=foo git foo It's not likely that people use the poison code outside of running the test suite, but it's easy enough to make this case work. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | | | | | | t0205: drop redundant testJeff King2018-02-081-4/+0
| |/ / / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We check that a shell variable is non-empty, and then we check that it's equal to a particular value. Just checking the latter covers both cases. I suspect the original was trying to give better output when the test fails, but using "-x" covers that these days. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | | | | | Merge branch 'nd/ignore-glob-doc-update' into maintJunio C Hamano2018-03-221-6/+5
|\ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Doc update. * nd/ignore-glob-doc-update: gitignore.txt: elaborate shell glob syntax
| * | | | | | | | | gitignore.txt: elaborate shell glob syntaxnd/ignore-glob-doc-updateDuy Nguyen2018-02-021-6/+5
| | |/ / / / / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | `fnmatch(3)` is a great mention if the intended audience is programmers. For normal users it's probably better to spell out what a shell glob is. This paragraph is updated to roughly tell (or remind) what the main wildcards are supposed to do. All the details are still hidden away behind the `fnmatch(3)` wall because bringing the whole specification here may be too much. Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | | | | | Merge branch 'rs/cocci-strbuf-addf-to-addstr' into maintJunio C Hamano2018-03-221-16/+1
|\ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * rs/cocci-strbuf-addf-to-addstr: cocci: simplify check for trivial format strings
| * | | | | | | | | cocci: simplify check for trivial format stringsrs/cocci-strbuf-addf-to-addstrRené Scharfe2018-02-021-16/+1
| | |/ / / / / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 353d84c537 (coccicheck: make transformation for strbuf_addf(sb, "...") more precise) added a check to avoid transforming calls with format strings which contain percent signs, as that would change the result. It uses embedded Python code for that. Simplify this rule by using the regular expression matching operator instead. Signed-off-by: Rene Scharfe <l.s.r@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | | | | | Merge branch 'jc/worktree-add-short-help' into maintJunio C Hamano2018-03-221-1/+1
|\ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Error message fix. * jc/worktree-add-short-help: worktree: say that "add" takes an arbitrary commit in short-help
| * | | | | | | | | worktree: say that "add" takes an arbitrary commit in short-helpjc/worktree-add-short-helpJunio C Hamano2018-01-171-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | c4738aed ("worktree: add can be created from any commit-ish", 2017-11-26) taught "git worktree add" to start a new worktree with an arbitrary commit-ish checked out, not limited to a tip of a branch. "git worktree --help" was updated to describe this, but we forgot to update "git worktree -h". Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | | | | | | Merge branch 'tz/doc-show-defaults-to-head' into maintJunio C Hamano2018-03-221-2/+2
|\ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Doc update. * tz/doc-show-defaults-to-head: doc: mention 'git show' defaults to HEAD
| * | | | | | | | | | doc: mention 'git show' defaults to HEADtz/doc-show-defaults-to-headTodd Zullinger2018-01-301-2/+2
| | |_|/ / / / / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When 'git show' is called without any object it defaults to HEAD. This has been true since d4ed9793fd ("Simplify common default options setup for built-in log family.", 2006-04-16). The SYNOPSIS suggests that the object argument is required. Clarify that it is not required and note the default. Signed-off-by: Todd Zullinger <tmz@pobox.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | | | | | | Merge branch 'nd/shared-index-fix' into maintJunio C Hamano2018-03-222-18/+41
|\ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Code clean-up. * nd/shared-index-fix: read-cache: don't write index twice if we can't write shared index read-cache.c: move tempfile creation/cleanup out of write_shared_index read-cache.c: change type of "temp" in write_shared_index()
| * | | | | | | | | | read-cache: don't write index twice if we can't write shared indexnd/shared-index-fixNguyễn Thái Ngọc Duy2018-01-242-2/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In a0a967568e ("update-index --split-index: do not split if $GIT_DIR is read only", 2014-06-13), we tried to make sure we can still write an index, even if the shared index can not be written. We did so by just calling 'do_write_locked_index()' just before 'write_shared_index()'. 'do_write_locked_index()' always at least closes the tempfile nowadays, and used to close or commit the lockfile if COMMIT_LOCK or CLOSE_LOCK were given at the time this feature was introduced. COMMIT_LOCK or CLOSE_LOCK is passed in by most callers of 'write_locked_index()'. After calling 'write_shared_index()', we call 'write_split_index()', which calls 'do_write_locked_index()' again, which then tries to use the closed lockfile again, but in fact fails to do so as it's already closed. This eventually leads to a segfault. Make sure to write the main index only once. [nd: most of the commit message and investigation done by Thomas, I only tweaked the solution a bit] Helped-by: Thomas Gummerer <t.gummerer@gmail.com> Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | | | | | | | read-cache.c: move tempfile creation/cleanup out of write_shared_indexNguyễn Thái Ngọc Duy2018-01-161-16/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For one thing, we have more consistent cleanup procedure now and always keep errno intact. The real purpose is the ability to break out of write_locked_index() early when mks_tempfile() fails in the next patch. It's more awkward to do it if this mks_tempfile() is still inside write_shared_index(). Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | | | | | | | read-cache.c: change type of "temp" in write_shared_index()Nguyễn Thái Ngọc Duy2018-01-161-9/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This local variable 'temp' will be passed in from the caller in the next patch. To reduce patch noise, let's change its type now while it's still a local variable and get all the trival conversion out of the next patch. Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | | | | | | | Merge branch 'jc/mailinfo-cleanup-fix' into maintJunio C Hamano2018-03-221-4/+6
|\ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Corner case bugfix. * jc/mailinfo-cleanup-fix: mailinfo: avoid segfault when can't open files
| * | | | | | | | | | | mailinfo: avoid segfault when can't open filesjc/mailinfo-cleanup-fixJuan F. Codagnone2018-01-241-4/+6
| | |_|_|_|_|_|_|/ / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If <msg> or <patch> files can't be opened, then mailinfo() returns an error before it even initializes mi->p_hdr_data or mi->s_hdr_data. When cmd_mailinfo() then calls clear_mailinfo(), we dereference the NULL pointers trying to free their contents. Signed-off-by: Juan F. Codagnone <jcodagnone@gmail.com> Reviewed-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | | | | | | | Merge branch 'rb/hashmap-h-compilation-fix' into maintJunio C Hamano2018-03-221-2/+1
|\ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Code clean-up. * rb/hashmap-h-compilation-fix: hashmap.h: remove unused variable
| * | | | | | | | | | | hashmap.h: remove unused variablerb/hashmap-h-compilation-fixRandall S. Becker2018-01-161-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In 'hashmap_enable_item_counting()', item is assigned but never used. This causes a warning on HP NonStop. As the variable is never used, fix this by just removing it. Signed-off-by: Randall S. Becker <rsbecker@nexbridge.com> Helped-by: Thomas Gummerer <t.gummerer@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | | | | | | | | Merge branch 'rs/describe-unique-abbrev' into maintJunio C Hamano2018-03-221-1/+1
|\ \ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Code clean-up. * rs/describe-unique-abbrev: describe: use strbuf_add_unique_abbrev() for adding short hashes
| * | | | | | | | | | | | describe: use strbuf_add_unique_abbrev() for adding short hashesrs/describe-unique-abbrevRené Scharfe2018-01-161-1/+1
| | |_|/ / / / / / / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Call strbuf_add_unique_abbrev() to add an abbreviated hash to a strbuf instead of taking a detour through find_unique_abbrev() and its static buffer. This is shorter and a bit more efficient. Patch generated by Coccinelle (and contrib/coccinelle/strbuf.cocci). Signed-off-by: Rene Scharfe <l.s.r@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>