{"thread":{"id":"29349","subject":"[PATCH] stash show: use default pretty format","startedAt":"2012-01-12T07:05:53Z","lastAt":"2012-01-12T19:06:53Z","messageCount":2,"participants":["Tay Ray Chuan","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"182418","messageId":"1326351953-3724-1-git-send-email-rctay89@gmail.com","threadId":"29349","inReplyTo":null,"subject":"[PATCH] stash show: use default pretty format","fromName":"Tay Ray Chuan","fromEmail":"rctay89@gmail.com","sentAt":"2012-01-12T07:05:53Z","receivedAt":"2012-01-12T07:05:53Z","isPatch":true,"sender":{"key":"rctay89@gmail.com","avatar":"https://avatars.githubusercontent.com/u/61553?v=4"},"body":"By default (ie. when stash show is invoked without any arguments), the\ndiff stat of the stashed changes is displayed. Let git-diff decide the\ndefault pretty format to use.\n\nThis gives git more consistency, as users who have set their\npretty.format config would naturally expect `git-stash show` to display\nthe diff in the same pretty format as the other diff-producing procelain\nlike git-log and git-show.\n\nSigned-off-by: Tay Ray Chuan <rctay89@gmail.com>\n---\n git-stash.sh     |    2 +-\n t/t3903-stash.sh |    4 ++--\n 2 files changed, 3 insertions(+), 3 deletions(-)\n\ndiff --git a/git-stash.sh b/git-stash.sh\nindex fe4ab28..a0db3de 100755\n--- a/git-stash.sh\n+++ b/git-stash.sh\n@@ -271,7 +271,7 @@ list_stash () {\n show_stash () {\n \tassert_stash_like \"$@\"\n \n-\tgit diff ${FLAGS:---stat} $b_commit $w_commit\n+\tgit diff ${FLAGS} $b_commit $w_commit\n }\n \n #\ndiff --git a/t/t3903-stash.sh b/t/t3903-stash.sh\nindex dbe2ac1..7a18af8 100755\n--- a/t/t3903-stash.sh\n+++ b/t/t3903-stash.sh\n@@ -446,7 +446,7 @@ test_expect_success 'stash show - stashes on stack, stash-like argument' '\n \t file |    1 +\n \t 1 files changed, 1 insertions(+), 0 deletions(-)\n \tEOF\n-\tgit stash show ${STASH_ID} >actual &&\n+\tgit stash show --stat ${STASH_ID} >actual &&\n \ttest_cmp expected actual\n '\n \n@@ -484,7 +484,7 @@ test_expect_success 'stash show - no stashes on stack, stash-like argument' '\n \t file |    1 +\n \t 1 files changed, 1 insertions(+), 0 deletions(-)\n \tEOF\n-\tgit stash show ${STASH_ID} >actual &&\n+\tgit stash show --stat ${STASH_ID} >actual &&\n \ttest_cmp expected actual\n '\n \n-- \n1.7.9.rc0.132.ge406\n"},{"id":"182456","messageId":"7vy5tc210y.fsf@alter.siamese.dyndns.org","threadId":"29349","inReplyTo":"1326351953-3724-1-git-send-email-rctay89@gmail.com","subject":"Re: [PATCH] stash show: use default pretty format","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2012-01-12T19:06:53Z","receivedAt":"2012-01-12T19:06:53Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Tay Ray Chuan <rctay89@gmail.com> writes:\n\n> By default (ie. when stash show is invoked without any arguments), the\n> diff stat of the stashed changes is displayed. Let git-diff decide the\n> default pretty format to use.\n>\n> This gives git more consistency, as users who have set their\n> pretty.format config would naturally expect `git-stash show` to display\n> the diff in the same pretty format as the other diff-producing procelain\n> like git-log and git-show.\n\nA handful of issues:\n\n - The stash entries, unlike the usual commits you store on branches and\n   inspect with \"show\", are designed to be quick escapes for emergency\n   interruption, and \"--stat\" is a good default to remind the user what\n   she was working on before she was interrupted _without_ scrolling the\n   top of the screen away by showing the full diff.  Careful design\n   decisions far outweigh mechanical application of \"consistency for the\n   sake of consistency\".\n\n - What does \"pretty.format\" has anything to do with \"stash\"?\n\n - If it does, why doesn't the script read from it?\n\n - How does this justify the UI regression for people who are used to the\n   good default \"--stat\" they have been seeing?\n"}]}