]> git.ipfire.org Git - thirdparty/git.git/commitdiff
stash list: stop passing "-m" to "git log"
authorSergey Organov <sorganov@gmail.com>
Thu, 20 May 2021 21:47:01 +0000 (00:47 +0300)
committerJunio C Hamano <gitster@pobox.com>
Fri, 21 May 2021 00:24:14 +0000 (09:24 +0900)
Passing "-m" in "git log --first-parent -m" is not needed as
--first-parent implies --diff-merges=first-parent anyway. OTOH, it
will stop being harmless once we let "-m" imply "-p".

While we are at it, fix corresponding test description in t3903-stash
to match what it actually tests.

Signed-off-by: Sergey Organov <sorganov@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/stash.c
t/t3903-stash.sh

index ba774cce674f339bf68d5fcda80eb8b2d8253cf2..7c92bb51cbaef95694bab8a22ee40db14936ad70 100644 (file)
@@ -759,7 +759,7 @@ static int list_stash(int argc, const char **argv, const char *prefix)
 
        cp.git_cmd = 1;
        strvec_pushl(&cp.args, "log", "--format=%gd: %gs", "-g",
-                    "--first-parent", "-m", NULL);
+                    "--first-parent", NULL);
        strvec_pushv(&cp.args, argv);
        strvec_push(&cp.args, ref_stash);
        strvec_push(&cp.args, "--");
index 5f282ecf6175d381242b13178b9088a76cd28805..873aa56e359d6401b6cab262cfc70fcf9f94a45b 100755 (executable)
@@ -859,7 +859,7 @@ test_expect_success 'setup stash with index and worktree changes' '
        git stash
 '
 
-test_expect_success 'stash list implies --first-parent -m' '
+test_expect_success 'stash list -p shows simple diff' '
        cat >expect <<-EOF &&
        stash@{0}