summaryrefslogtreecommitdiff
path: root/t/t4034/php
diff options
context:
space:
mode:
authorLibravatar Uwe Storbeck <uwe@ibr.ch>2014-03-15 00:56:43 +0100
committerLibravatar Junio C Hamano <gitster@pobox.com>2014-03-17 12:24:14 -0700
commit47be06602656ee9cac860f675d2c8d1f0deabdbe (patch)
tree4541122272ed41cbee9ec6152632ad8bd25b34d7 /t/t4034/php
parenti18n: proposed command missing leading dash (diff)
downloadtgif-47be06602656ee9cac860f675d2c8d1f0deabdbe.tar.xz
rebase -i: do not "echo" random user-supplied strings
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>
Diffstat (limited to 't/t4034/php')
0 files changed, 0 insertions, 0 deletions