summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* run_external_diff: refactor cmdline setup logicjk/external-diff-use-argv-arrayJeff King2014-04-211-11/+15
| | | | | | | | | | | The current logic makes it hard to see what gets put onto the command line in which cases. Pulling out a helper function lets us see that we have two sets of file data, and the second set either uses the original name, or the "other" renamed/copy name. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* run_external_diff: hoist common bits out of conditionalJeff King2014-04-211-5/+3
| | | | | | | | | | Whether we have diff_filespecs to give to the diff command or not, we always are going to run the program and pass it the pathname. Let's pull that duplicated part out of the conditional to make it more obvious. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* run_external_diff: drop fflush(NULL)Jeff King2014-04-211-1/+0
| | | | | | | | | | | | | This fflush was added in d5535ec (Use run_command() to spawn external diff programs instead of fork/exec., 2007-10-19), because flushing buffers before forking is a good habit. But later, 7d0b18a (Add output flushing before fork(), 2008-08-04) added it to the generic run-command interface, meaning that our flush here is redundant. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* run_external_diff: clean up error handlingJeff King2014-04-212-7/+4
| | | | | | | | | | | | | | | | | | | | | | | When the external diff reports an error, we try to clean up and die. However, we can make this process a bit simpler: 1. We do not need to bother freeing memory, since we are about to exit. Nor do we need to clean up our tempfiles, since the atexit() handler will do it for us. So we can die as soon as we see the error. 3. We can just call die() rather than fprintf/exit. This does technically change our exit code, but the exit code of "1" is not meaningful here. In fact, it is probably wrong, since "1" from diff usually means "completed successfully, but there were differences". And while we're there, we can mark the error message for translation, and drop the full stop at the end to make it more like our other messages. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* run_external_diff: use an argv_array for the environmentJeff King2014-04-211-9/+5
| | | | | | | | | | We currently use static buffers and a static array for formatting the environment passed to the external diff. There's nothing wrong in the code, but it is much easier to verify that it is correct if we use a dynamic argv_array. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* run_external_diff: use an argv_array for the command lineJeff King2014-04-211-16/+16
| | | | | | | | | | | | | | We currently generate the command-line for the external command using a fixed-length array of size 10. But if there is a rename, we actually need 11 elements (10 items, plus a NULL), and end up writing a random NULL onto the stack. Rather than bump the limit, let's just use an argv_array, which makes this sort of error impossible. Noticed-by: Max L <infthi.inbox@gmail.com> Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* Git 1.9.2v1.9.2Junio C Hamano2014-04-093-2/+23
| | | | | | | The second maintenance release for Git 1.9; contains all the fixes that are scheduled to appear in Git 2.0. Signed-off-by: Junio C Hamano <gitster@pobox.com>
* Merge branch 'jl/nor-or-nand-and' into maintJunio C Hamano2014-04-0957-90/+88
|\ | | | | | | | | | | | | | | * jl/nor-or-nand-and: code and test: fix misuses of "nor" comments: fix misuses of "nor" contrib: fix misuses of "nor" Documentation: fix misuses of "nor"
| * code and test: fix misuses of "nor"jl/nor-or-nand-andJustin Lebar2014-03-3112-16/+16
| | | | | | | | | | Signed-off-by: Justin Lebar <jlebar@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * comments: fix misuses of "nor"Justin Lebar2014-03-3120-27/+26
| | | | | | | | | | Signed-off-by: Justin Lebar <jlebar@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * contrib: fix misuses of "nor"Justin Lebar2014-03-312-3/+3
| | | | | | | | | | Signed-off-by: Justin Lebar <jlebar@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * Documentation: fix misuses of "nor"Justin Lebar2014-03-3125-44/+43
| | | | | | | | | | Signed-off-by: Justin Lebar <jlebar@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | Merge branch 'cn/fetch-prune-overlapping-destination' into maintJunio C Hamano2014-04-092-6/+64
|\ \ | | | | | | | | | | | | | | | * cn/fetch-prune-overlapping-destination: fetch: handle overlaping refspecs on --prune fetch: add a failing test for prunning with overlapping refspecs
| * | fetch: handle overlaping refspecs on --prunecn/fetch-prune-overlapping-destinationCarlos Martín Nieto2014-03-262-7/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We need to consider that a remote-tracking branch may match more than one rhs of a fetch refspec. In such a case, it is not enough to stop at the first match but look at all of the matches in order to determine whether a head is stale. To this goal, introduce a variant of query_refspecs which returns all of the matching refspecs and loop over those answers to check for staleness. Signed-off-by: Carlos Martín Nieto <cmn@elego.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | fetch: add a failing test for prunning with overlapping refspecsCarlos Martín Nieto2014-02-281-0/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When a remote has multiple fetch refspecs and these overlap in the target namespace, fetch may prune a remote-tracking branch which still exists in the remote. The test uses a popular form of this, by putting pull requests as stored in a popular hosting platform alongside "real" remote-tracking branches. The fetch command makes a decision of whether to prune based on the first matching refspec, which in this case is insufficient, as it covers the pull request names. This pair of refspecs does work as expected if the more "specific" refspec is the first in the list. Signed-off-by: Carlos Martín Nieto <cmn@elego.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | Merge branch 'mh/update-ref-batch-create-fix' into maintJunio C Hamano2014-04-092-0/+12
|\ \ \ | | | | | | | | | | | | | | | | * mh/update-ref-batch-create-fix: update-ref: fail create operation over stdin if ref already exists
| * | | update-ref: fail create operation over stdin if ref already existsmh/update-ref-batch-create-fixAman Gupta2014-04-022-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Aman Gupta <aman@tmm1.net> Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> Acked-by: Brad King <brad.king@kitware.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | Merge branch 'jk/commit-dates-parsing-fix' into maintJunio C Hamano2014-04-095-4/+47
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | * jk/commit-dates-parsing-fix: t4212: loosen far-in-future test for AIX date: recognize bogus FreeBSD gmtime output
| * | | | t4212: loosen far-in-future test for AIXjk/commit-dates-parsing-fixJeff King2014-04-011-4/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | One of the tests in t4212 checks our behavior when we feed gmtime a date so far in the future that it gives up and returns NULL. Some implementations, like AIX, may actually just provide us a bogus result instead. It's not worth it for us to come up with heuristics that guess whether the return value is sensible or not. On good platforms where gmtime reports the problem to us with NULL, we will print the epoch value. On bad platforms, we will print garbage. But our test should be written for the lowest common denominator so that it passes everywhere. Reported-by: Charles Bailey <cbailey32@bloomberg.net> Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | date: recognize bogus FreeBSD gmtime outputJeff King2014-04-014-0/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Most gmtime implementations return a NULL value when they encounter an error (and this behavior is specified by ANSI C and POSIX). FreeBSD's implementation, however, will simply leave the "struct tm" untouched. Let's also recognize this and convert it to a NULL (with this patch, t4212 should pass on FreeBSD). Reported-by: René Scharfe <l.s.r@web.de> Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | Merge branch 'jc/fix-diff-no-index-diff-opt-parse' into maintJunio C Hamano2014-04-091-1/+1
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | * jc/fix-diff-no-index-diff-opt-parse: diff-no-index: correctly diagnose error return from diff_opt_parse()
| * | | | | diff-no-index: correctly diagnose error return from diff_opt_parse()jc/fix-diff-no-index-diff-opt-parseJunio C Hamano2014-03-311-1/+1
| | |_|/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | diff_opt_parse() returns the number of options parsed, or often returns error() which is defined to return -1. Yes, return value of 0 is "I did not process that option at all", which should cause the caller to say that, but negative return should not be forgotten. This bug caused "diff --no-index" to infinitely show the same error message because the returned value was used to decrement the loop control variable, e.g. $ git diff --no-index --color=words a b error: option `color' expects "always", "auto", or "never" error: option `color' expects "always", "auto", or "never" ... Instead, make it act like so: $ git diff --no-index --color=words a b error: option `color' expects "always", "auto", or "never" fatal: invalid diff option/value: --color=words Reported-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | Merge commit 'doc/http-backend: missing accent grave in literal mark-up'Junio C Hamano2014-04-091-1/+1
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | * commit '5df05146d5cb94628a3dfc53063c802ee1152cec': doc/http-backend: missing accent grave in literal mark-up
| * | | | | doc/http-backend: missing accent grave in literal mark-upThomas Ackermann2014-04-091-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Thomas Ackermann <th.acker@arcor.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | | Update draft release notes to 1.9.2Junio C Hamano2014-04-081-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | | Merge branch 'mm/status-porcelain-format-i18n-fix' into maintJunio C Hamano2014-04-082-5/+9
|\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | * mm/status-porcelain-format-i18n-fix: status: disable translation when --porcelain is used
| * | | | | | status: disable translation when --porcelain is usedmm/status-porcelain-format-i18n-fixMatthieu Moy2014-03-262-5/+9
| | |/ / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | "git status --branch --porcelain" displays the status of the branch (ahead, behind, gone), and used gettext to translate the string. Use hardcoded strings when --porcelain is used, but keep the gettext translation for "git status --short" which is essentially the same, but meant to be read by a human. Reported-by: Anarky <ghostanarky@gmail.com> Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | | Merge branch 'bp/commit-p-editor' into maintJunio C Hamano2014-04-0810-39/+137
|\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * bp/commit-p-editor: run-command: mark run_hook_with_custom_index as deprecated merge hook tests: fix and update tests merge: fix GIT_EDITOR override for commit hook commit: fix patch hunk editing with "commit -p -m" test patch hunk editing with "commit -p -m" merge hook tests: use 'test_must_fail' instead of '!' merge hook tests: fix missing '&&' in test
| * | | | | | run-command: mark run_hook_with_custom_index as deprecatedbp/commit-p-editorBenoit Pierre2014-03-181-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Benoit Pierre <benoit.pierre@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | | | merge hook tests: fix and update testsBenoit Pierre2014-03-181-6/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - update 'no editor' hook test and add 'editor' hook test - make sure the tree is reset to a clean state after running a test (using test_when_finished) so later tests are not impacted Signed-off-by: Benoit Pierre <benoit.pierre@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | | | merge: fix GIT_EDITOR override for commit hookBenoit Pierre2014-03-181-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Don't set GIT_EDITOR to ":" when calling prepare-commit-msg hook if the editor is going to be called (e.g. with "merge -e"). Signed-off-by: Benoit Pierre <benoit.pierre@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | | | commit: fix patch hunk editing with "commit -p -m"Benoit Pierre2014-03-189-32/+80
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Don't change git environment: move the GIT_EDITOR=":" override to the hook command subprocess, like it's already done for GIT_INDEX_FILE. Signed-off-by: Benoit Pierre <benoit.pierre@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | | | test patch hunk editing with "commit -p -m"Benoit Pierre2014-03-181-0/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add (failing) tests: with commit changing the environment to let hooks know that no editor will be used (by setting GIT_EDITOR to ":"), the "edit hunk" functionality does not work (no editor is launched and the whole hunk is committed). Signed-off-by: Benoit Pierre <benoit.pierre@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | | | merge hook tests: use 'test_must_fail' instead of '!'Benoit Pierre2014-03-111-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Benoit Pierre <benoit.pierre@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | | | merge hook tests: fix missing '&&' in testBenoit Pierre2014-03-111-1/+1
| | |_|_|/ / | |/| | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Benoit Pierre <benoit.pierre@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | | Start preparing for 1.9.1Junio C Hamano2014-04-032-1/+39
| | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | | Merge branch 'jk/mv-submodules-fix' into maintJunio C Hamano2014-04-032-1/+21
|\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * jk/mv-submodules-fix: mv: prevent mismatched data when ignoring errors. builtin/mv: fix out of bounds write Conflicts: t/t7001-mv.sh
| * | | | | | mv: prevent mismatched data when ignoring errors.jk/mv-submodules-fixbrian m. carlson2014-03-172-1/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We shrink the source and destination arrays, but not the modes or submodule_gitfile arrays, resulting in potentially mismatched data. Shrink all the arrays at the same time to prevent this. Add tests to ensure the problem does not recur. Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | | | builtin/mv: fix out of bounds writeJohn Keeping2014-03-111-0/+4
| | |/ / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When commit a88c915 (mv: move submodules using a gitfile, 2013-07-30) added the submodule_gitfile array, it was not added to the block that enlarges the arrays when we are moving a directory so that we do not have to worry about it being a directory when we perform the actual move. After this, the loop continues over the enlarged set of sources. Since we assume that submodule_gitfile has size argc, if any of the items in the source directory are submodules we are guaranteed to write beyond the end of submodule_gitfile. Fix this by realloc'ing submodule_gitfile at the same time as the other arrays. Reported-by: Guillaume Gelin <contact@ramnes.eu> Signed-off-by: John Keeping <john@keeping.me.uk> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | | Merge branch 'mh/remove-subtree-long-pathname-fix' into maintJunio C Hamano2014-04-031-32/+32
|\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * mh/remove-subtree-long-pathname-fix: entry.c: fix possible buffer overflow in remove_subtree() checkout_entry(): use the strbuf throughout the function
| * | | | | | entry.c: fix possible buffer overflow in remove_subtree()mh/remove-subtree-long-pathname-fixMichael Haggerty2014-03-131-17/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | remove_subtree() manipulated path in a fixed-size buffer even though the length of the input, let alone the length of entries within the directory, were not known in advance. Change the function to take a strbuf argument and use that object as its scratch space. Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | | | checkout_entry(): use the strbuf throughout the functionMichael Haggerty2014-03-131-16/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There is no need to break out the "buf" and "len" members into separate temporary variables. Rename path_buf to path and use path.buf and path.len directly. This makes it easier to reason about the data flow in the function. Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | | | Merge branch 'jk/lib-terminal-lazy' into maintJunio C Hamano2014-04-031-18/+19
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * jk/lib-terminal-lazy: t/lib-terminal: make TTY a lazy prerequisite
| * | | | | | | t/lib-terminal: make TTY a lazy prerequisitejk/lib-terminal-lazyJeff King2014-03-141-18/+19
| | |/ / / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When lib-terminal.sh is sourced by a test script, we immediately set up the TTY prerequisite. We do so inside a test_expect_success, because that nicely isolates any generated output. However, this early test can interfere with a script that later wants to skip all tests (e.g., t5541 then goes on to set up the httpd server, and wants to skip_all if that fails). TAP output doesn't let us skip everything after we have already run at least one test. We could fix this by reordering the inclusion of lib-terminal.sh in t5541 to go after the httpd setup. That solves this case, but we might eventually hit a case with circular dependencies, where either lib-*.sh include might want to skip_all after the other has run a test. So instead, let's just remove the ordering constraint entirely by doing the setup inside a test_lazy_prereq construct, rather than in a regular test. We never cared about the test outcome anyway (it was written to always succeed). Note that in addition to setting up the prerequisite, the current test also defines test_terminal. Since we can't affect the environment from a lazy_prereq, we have to hoist that out. We previously depended on it _not_ being defined when the TTY prereq isn't set as a way to ensure that tests properly declare their dependency on TTY. However, we still cover the case (see the in-code comment for details). Reported-by: Jens Lehmann <Jens.Lehmann@web.de> Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | | | Merge branch 'nd/index-pack-error-message' into maintJunio C Hamano2014-04-031-2/+2
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * nd/index-pack-error-message: index-pack: report error using the correct variable
| * | | | | | | index-pack: report error using the correct variablend/index-pack-error-messageJunio C Hamano2014-03-171-2/+2
| |/ / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We feed a string pointer that is potentially NULL to die() when showing the message. Don't. Noticed-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | | | Merge branch 'us/printf-not-echo' into maintJunio C Hamano2014-04-032-3/+3
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * us/printf-not-echo: test-lib.sh: do not "echo" caller-supplied strings rebase -i: do not "echo" random user-supplied strings
| * | | | | | | test-lib.sh: do not "echo" caller-supplied stringsus/printf-not-echoUwe Storbeck2014-03-181-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In some places we "echo" a string that is supplied by the calling test script and may contain backslash sequences. The echo command of some shells, most notably "dash", interprets these backslash sequences (POSIX.1 allows this) which may scramble the test output. Signed-off-by: Uwe Storbeck <uwe@ibr.ch> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | | | | rebase -i: do not "echo" random user-supplied stringsUwe Storbeck2014-03-171-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In some places we "echo" a string that comes from a commit log message, which may have a backslash sequence that is interpreted by the command (POSIX.1 allows this), most notably "dash"'s built-in 'echo'. A commit message which contains the string '\n' (or ends with the string '\c') may result in a garbage line in the todo list of an interactive rebase which causes the rebase to fail. To reproduce the behavior (with dash as /bin/sh): mkdir test && cd test && git init echo 1 >foo && git add foo git commit -m"this commit message ends with '\n'" echo 2 >foo && git commit -a --fixup HEAD git rebase -i --autosquash --root Now the editor opens with garbage in line 3 which has to be removed or the rebase fails. Signed-off-by: Uwe Storbeck <uwe@ibr.ch> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | | | | Merge branch 'rr/doc-merge-strategies' into maintJunio C Hamano2014-04-031-2/+2
|\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * rr/doc-merge-strategies: Documentation/merge-strategies: avoid hyphenated commands