Skip to content

Commit 1e20a40

Browse files
sorganovgitster
authored andcommitted
stash list: stop passing "-m" to "git log"
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 23f6d40 commit 1e20a40

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

builtin/stash.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -759,7 +759,7 @@ static int list_stash(int argc, const char **argv, const char *prefix)
759759

760760
cp.git_cmd = 1;
761761
strvec_pushl(&cp.args, "log", "--format=%gd: %gs", "-g",
762-
"--first-parent", "-m", NULL);
762+
"--first-parent", NULL);
763763
strvec_pushv(&cp.args, argv);
764764
strvec_push(&cp.args, ref_stash);
765765
strvec_push(&cp.args, "--");

t/t3903-stash.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -859,7 +859,7 @@ test_expect_success 'setup stash with index and worktree changes' '
859859
git stash
860860
'
861861

862-
test_expect_success 'stash list implies --first-parent -m' '
862+
test_expect_success 'stash list -p shows simple diff' '
863863
cat >expect <<-EOF &&
864864
stash@{0}
865865

0 commit comments

Comments
 (0)