diff options
author | Garima Singh <garima.singh@microsoft.com> | 2019-10-07 19:38:56 (GMT) |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2019-10-08 03:59:29 (GMT) |
commit | ce2d7ed2fd454d60a0957508141438f26c4100c7 (patch) | |
tree | f9931ce203516b16c591299cb3a1dc7e6268a036 /t | |
parent | 5fa0f5238b0cd46cfe7f6fa76c3f526ea98148d9 (diff) | |
download | git-ce2d7ed2fd454d60a0957508141438f26c4100c7.zip git-ce2d7ed2fd454d60a0957508141438f26c4100c7.tar.gz git-ce2d7ed2fd454d60a0957508141438f26c4100c7.tar.bz2 |
sq_quote_buf_pretty: don't drop empty arguments
Empty arguments passed on the command line can be represented by
a '', however sq_quote_buf_pretty was incorrectly dropping these
arguments altogether. Fix this problem by ensuring that such
arguments are emitted as '' instead.
Signed-off-by: Garima Singh <garima.singh@microsoft.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't')
-rwxr-xr-x | t/t0014-alias.sh | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/t/t0014-alias.sh b/t/t0014-alias.sh index a070e64..2694c81 100755 --- a/t/t0014-alias.sh +++ b/t/t0014-alias.sh @@ -37,4 +37,11 @@ test_expect_success 'looping aliases - internal execution' ' # test_i18ngrep "^fatal: alias loop detected: expansion of" output #' +test_expect_success 'run-command formats empty args properly' ' + GIT_TRACE=1 git frotz a "" b " " c 2>&1 | + sed -ne "/run_command:/s/.*trace: run_command: //p" >actual && + echo "git-frotz a '\'''\'' b '\'' '\'' c" >expect && + test_cmp expect actual +' + test_done |