{"thread":{"id":"46138","subject":"Feature Request: Show status of the stash in git status command","startedAt":"2017-06-07T22:46:25Z","lastAt":"2017-06-13T13:06:35Z","messageCount":13,"participants":["Houston Fortney","Jeff King","Samuel Lijin","liam Beguin","Randall S. Becker","Igor Djordjevic","Junio C Hamano","Konstantin Khomoutov"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"321717","messageId":"CA+B9myHRahTd+FDgzK5AhXW+hq_Y_czMX9X6MXYBcr9WSPeiDw@mail.gmail.com","threadId":"46138","inReplyTo":null,"subject":"Feature Request: Show status of the stash in git status command","fromName":"Houston Fortney","fromEmail":"houstonfortney@gmail.com","sentAt":"2017-06-07T22:46:18Z","receivedAt":"2017-06-07T22:46:25Z","isPatch":false,"sender":{"key":"houstonfortney@gmail.com","avatar":null},"body":"I sometimes forget about something that I stashed. It would be nice if\nthe git status command would just say \"There are x entries in the\nstash.\" It can say nothing if there is nothing stashed so it is\nusually not adding clutter.\n"},{"id":"321894","messageId":"20170610082534.6437ifexzly4oqg6@sigill.intra.peff.net","threadId":"46138","inReplyTo":"CA+B9myHRahTd+FDgzK5AhXW+hq_Y_czMX9X6MXYBcr9WSPeiDw@mail.gmail.com","subject":"Re: Feature Request: Show status of the stash in git status command","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2017-06-10T08:25:34Z","receivedAt":"2017-06-10T08:25:43Z","isPatch":false,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Wed, Jun 07, 2017 at 06:46:18PM -0400, Houston Fortney wrote:\n\n> I sometimes forget about something that I stashed. It would be nice if\n> the git status command would just say \"There are x entries in the\n> stash.\" It can say nothing if there is nothing stashed so it is\n> usually not adding clutter.\n\nI think the clutter issue would depend on your workflow around stash.\n\nSome people carry tidbits in their stash for days or weeks. E.g., I\nsometimes start on an idea and decide it's not worth pursuing (or more\nlikely, I post a snippet of a patch as a \"how about this\" to the mailing\nlist but don't plan on taking it further). Rather than run \"git reset\n--hard\", I usually \"git stash\" the result. That means if I really do\ndecide I want it back, I can prowl through the stash list and find it.\n\nAll of which is to say that if we had such a feature, it should probably\nbe optional. For some people it would be very useful, and for others it\nwould be a nuisance.\n\nDo you want to try a patch? I think you'd need to find the right spot in\nwt-status.c to show the output, and then call for_each_reflog_ent() on\n\"refs/stash\" and count the number of entries you see.\n\n-Peff\n"},{"id":"321906","messageId":"CAJZjrdXCHVKQOxR=+z5cOkieKzE-iSMta--kHVjSYXuansb34Q@mail.gmail.com","threadId":"46138","inReplyTo":"20170610082534.6437ifexzly4oqg6@sigill.intra.peff.net","subject":"Re: Feature Request: Show status of the stash in git status command","fromName":"Samuel Lijin","fromEmail":"sxlijin@gmail.com","sentAt":"2017-06-10T10:12:28Z","receivedAt":"2017-06-10T10:13:14Z","isPatch":false,"sender":{"key":"sxlijin@gmail.com","avatar":"https://gravatar.com/avatar/01777bf1eae64e2b4dca97dcac182a6abbcf6fd8cb4d5b8fa33edf9f8cc21746?d=mp&s=160"},"body":"On Sat, Jun 10, 2017 at 4:25 AM, Jeff King <peff@peff.net> wrote:\n> On Wed, Jun 07, 2017 at 06:46:18PM -0400, Houston Fortney wrote:\n>\n>> I sometimes forget about something that I stashed. It would be nice if\n>> the git status command would just say \"There are x entries in the\n>> stash.\" It can say nothing if there is nothing stashed so it is\n>> usually not adding clutter.\n>\n> I think the clutter issue would depend on your workflow around stash.\n>\n> Some people carry tidbits in their stash for days or weeks. E.g., I\n> sometimes start on an idea and decide it's not worth pursuing (or more\n> likely, I post a snippet of a patch as a \"how about this\" to the mailing\n> list but don't plan on taking it further). Rather than run \"git reset\n> --hard\", I usually \"git stash\" the result. That means if I really do\n> decide I want it back, I can prowl through the stash list and find it.\n>\n> All of which is to say that if we had such a feature, it should probably\n> be optional. For some people it would be very useful, and for others it\n> would be a nuisance.\n\nPerhaps there should be a flag for this if it is implemented, say\nstatus.showStash?\n\n> Do you want to try a patch? I think you'd need to find the right spot in\n> wt-status.c to show the output, and then call for_each_reflog_ent() on\n> \"refs/stash\" and count the number of entries you see.\n>\n> -Peff\n"},{"id":"321909","messageId":"20170610102217.vxf6tsrdfp6srupr@sigill.intra.peff.net","threadId":"46138","inReplyTo":"CAJZjrdXCHVKQOxR=+z5cOkieKzE-iSMta--kHVjSYXuansb34Q@mail.gmail.com","subject":"Re: Feature Request: Show status of the stash in git status command","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2017-06-10T10:22:17Z","receivedAt":"2017-06-10T10:22:23Z","isPatch":false,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Sat, Jun 10, 2017 at 06:12:28AM -0400, Samuel Lijin wrote:\n\n> On Sat, Jun 10, 2017 at 4:25 AM, Jeff King <peff@peff.net> wrote:\n> > On Wed, Jun 07, 2017 at 06:46:18PM -0400, Houston Fortney wrote:\n> >\n> >> I sometimes forget about something that I stashed. It would be nice if\n> >> the git status command would just say \"There are x entries in the\n> >> stash.\" It can say nothing if there is nothing stashed so it is\n> >> usually not adding clutter.\n> >\n> > I think the clutter issue would depend on your workflow around stash.\n> >\n> > Some people carry tidbits in their stash for days or weeks. E.g., I\n> > sometimes start on an idea and decide it's not worth pursuing (or more\n> > likely, I post a snippet of a patch as a \"how about this\" to the mailing\n> > list but don't plan on taking it further). Rather than run \"git reset\n> > --hard\", I usually \"git stash\" the result. That means if I really do\n> > decide I want it back, I can prowl through the stash list and find it.\n> >\n> > All of which is to say that if we had such a feature, it should probably\n> > be optional. For some people it would be very useful, and for others it\n> > would be a nuisance.\n> \n> Perhaps there should be a flag for this if it is implemented, say\n> status.showStash?\n\nYes, that was what I was thinking.\n\n-Peff\n"},{"id":"321936","messageId":"1c04d689-6796-17d1-e058-18874768c22a@gmail.com","threadId":"46138","inReplyTo":"20170610102217.vxf6tsrdfp6srupr@sigill.intra.peff.net","subject":"Re: Feature Request: Show status of the stash in git status command","fromName":"liam Beguin","fromEmail":"liambeguin@gmail.com","sentAt":"2017-06-11T17:07:03Z","receivedAt":"2017-06-11T17:07:11Z","isPatch":false,"sender":{"key":"liambeguin@gmail.com","avatar":"https://avatars.githubusercontent.com/u/3811160?v=4"},"body":"Hi,\n\nAs it looks like something easy enough for a beginner, I though I could\ngive it a try. Here is what it looks like. If it's good enough, I'll \nadd a few lines to document 'status.showStash' and send a patch.\n\nThere is one thing I've noticed though. When using 'git stash pop', it\nshows the the number of stashes before dropping the commit and I'm not\nquite sure how to address this.\n\n--\n\ndiff --git a/wt-status.c b/wt-status.c\nindex 25aafc35c833..fab66d4cd72e 100644\n--- a/wt-status.c\n+++ b/wt-status.c\n@@ -801,6 +801,27 @@ static void wt_longstatus_print_changed(struct wt_status *s)\n \twt_longstatus_print_trailer(s);\n }\n \n+static int stash_count_refs(struct object_id *ooid, struct object_id *noid,\n+\t\t\t    const char *email, timestamp_t timestamp, int tz,\n+\t\t\t    const char *message, void *cb_data)\n+{\n+\tint *c = cb_data;\n+\t(*c)++;\n+\treturn 0;\n+}\n+\n+static void wt_longstatus_print_stash_summary(struct wt_status *s)\n+{\n+\tint stash_count = 0;\n+\n+\tfor_each_reflog_ent(\"refs/stash\", stash_count_refs, &stash_count);\n+\tif (stash_count > 0)\n+\t\tstatus_printf_ln(s, GIT_COLOR_NORMAL,\n+\t\t\t\t Q_(\"Your stash currently has %d commit\",\n+\t\t\t\t    \"Your stash currently has %d commits\", stash_count),\n+\t\t\t\t stash_count);\n+}\n+\n static void wt_longstatus_print_submodule_summary(struct wt_status *s, int uncommitted)\n {\n \tstruct child_process sm_summary = CHILD_PROCESS_INIT;\n@@ -1536,6 +1557,7 @@ static void wt_longstatus_print(struct wt_status *s)\n \tconst char *branch_color = color(WT_STATUS_ONBRANCH, s);\n \tconst char *branch_status_color = color(WT_STATUS_HEADER, s);\n \tstruct wt_status_state state;\n+\tint show_stash = 0;\n \n \tmemset(&state, 0, sizeof(state));\n \twt_status_get_state(&state,\n@@ -1641,6 +1663,8 @@ static void wt_longstatus_print(struct wt_status *s)\n \t\t} else\n \t\t\tprintf(_(\"nothing to commit, working tree clean\\n\"));\n \t}\n+\tif (!git_config_get_bool(\"status.showStash\", &show_stash) && show_stash)\n+\t\twt_longstatus_print_stash_summary(s);\n }\n \n static void wt_shortstatus_unmerged(struct string_list_item *it,\n\n\n\n\nOn 10/06/17 06:22 AM, Jeff King wrote:\n> On Sat, Jun 10, 2017 at 06:12:28AM -0400, Samuel Lijin wrote:\n> \n>> On Sat, Jun 10, 2017 at 4:25 AM, Jeff King <peff@peff.net> wrote:\n>>> On Wed, Jun 07, 2017 at 06:46:18PM -0400, Houston Fortney wrote:\n>>>\n>>>> I sometimes forget about something that I stashed. It would be nice if\n>>>> the git status command would just say \"There are x entries in the\n>>>> stash.\" It can say nothing if there is nothing stashed so it is\n>>>> usually not adding clutter.\n>>>\n>>> I think the clutter issue would depend on your workflow around stash.\n>>>\n>>> Some people carry tidbits in their stash for days or weeks. E.g., I\n>>> sometimes start on an idea and decide it's not worth pursuing (or more\n>>> likely, I post a snippet of a patch as a \"how about this\" to the mailing\n>>> list but don't plan on taking it further). Rather than run \"git reset\n>>> --hard\", I usually \"git stash\" the result. That means if I really do\n>>> decide I want it back, I can prowl through the stash list and find it.\n>>>\n>>> All of which is to say that if we had such a feature, it should probably\n>>> be optional. For some people it would be very useful, and for others it\n>>> would be a nuisance.\n>>\n>> Perhaps there should be a flag for this if it is implemented, say\n>> status.showStash?\n> \n> Yes, that was what I was thinking.\n> \n> -Peff\n> \n\n - Liam\n"},{"id":"321939","messageId":"000b01d2e2dc$327c11c0$97743540$@nexbridge.com","threadId":"46138","inReplyTo":"1c04d689-6796-17d1-e058-18874768c22a@gmail.com","subject":"RE: Feature Request: Show status of the stash in git status command","fromName":"Randall S. Becker","fromEmail":"rsbecker@nexbridge.com","sentAt":"2017-06-11T17:57:25Z","receivedAt":"2017-06-11T17:57:45Z","isPatch":false,"sender":{"key":"randall.becker@nexbridge.ca","avatar":"https://avatars.githubusercontent.com/u/28956764?v=4"},"body":"On June 11, 2017 1:07 PM liam Beguin wrote:\n>There is one thing I've noticed though. When using 'git stash pop', it shows the the number of stashes before dropping the commit and I'm not quite ?>sure how to address this.\n<snip>\nOn 10/06/17 06:22 AM, Jeff King wrote:\n> On Sat, Jun 10, 2017 at 06:12:28AM -0400, Samuel Lijin wrote:\n>> On Sat, Jun 10, 2017 at 4:25 AM, Jeff King <peff@peff.net> wrote:\n>>> On Wed, Jun 07, 2017 at 06:46:18PM -0400, Houston Fortney wrote:\n>>>\n>>>> I sometimes forget about something that I stashed. It would be nice \n>>>> if the git status command would just say \"There are x entries in \n>>>> the stash.\" It can say nothing if there is nothing stashed so it is \n>>>> usually not adding clutter.\n>>>\n>>> I think the clutter issue would depend on your workflow around stash.\n>>>\n>>> Some people carry tidbits in their stash for days or weeks. E.g., I \n>>> sometimes start on an idea and decide it's not worth pursuing (or \n>>> more likely, I post a snippet of a patch as a \"how about this\" to \n>>> the mailing list but don't plan on taking it further). Rather than \n>>> run \"git reset --hard\", I usually \"git stash\" the result. That means \n>>> if I really do decide I want it back, I can prowl through the stash list and find it.\n>>>\n>>> All of which is to say that if we had such a feature, it should \n>>> probably be optional. For some people it would be very useful, and \n>>> for others it would be a nuisance.\n>>\n>> Perhaps there should be a flag for this if it is implemented, say \n>> status.showStash?\n\nRandom thought: what if a stash id could be used in the same way as any other ref, so diff stash[0] stash[1] would be possible - although I can see this being problematic for a merge or rebase.\n\nCheers,\nRandall\n\n"},{"id":"321940","messageId":"11f1877a-6ec3-02c1-5b06-c1a07a389010@gmail.com","threadId":"46138","inReplyTo":"000b01d2e2dc$327c11c0$97743540$@nexbridge.com","subject":"Re: Feature Request: Show status of the stash in git status command","fromName":"Igor Djordjevic","fromEmail":"igor.d.djordjevic@gmail.com","sentAt":"2017-06-11T18:18:33Z","receivedAt":"2017-06-11T18:18:45Z","isPatch":false,"sender":{"key":"igor.d.djordjevic@gmail.com","avatar":null},"body":"Hi Randall,\n\nOn 11/06/2017 19:57, Randall S. Becker wrote:\n> Random thought: what if a stash id could be used in the same way as \n> any other ref, so diff stash[0] stash[1] would be possible - \n> although I can see this being problematic for a merge or rebase.\n\nNot sure if I`m misunderstanding you, but at least `git diff \nstash@{0} stash@{1}` seems to already work as expected - I remember \nusing it in the past, and I`ve tried it again now[1], and it still \nworks.\n\n[1] git version 2.13.0.windows.1\n\nRegards,\nBuga\n"},{"id":"321941","messageId":"000c01d2e2e0$cda526b0$68ef7410$@nexbridge.com","threadId":"46138","inReplyTo":"11f1877a-6ec3-02c1-5b06-c1a07a389010@gmail.com","subject":"RE: Feature Request: Show status of the stash in git status command","fromName":"Randall S. Becker","fromEmail":"rsbecker@nexbridge.com","sentAt":"2017-06-11T18:30:23Z","receivedAt":"2017-06-11T18:30:44Z","isPatch":false,"sender":{"key":"randall.becker@nexbridge.ca","avatar":"https://avatars.githubusercontent.com/u/28956764?v=4"},"body":"On June 11, 2017 2:19 PM  Igor Djordjevic wrote: \n>On 11/06/2017 19:57, Randall S. Becker wrote:\n>> Random thought: what if a stash id could be used in the same way as \n>> any other ref, so diff stash[0] stash[1] would be possible - although \n>> I can see this being problematic for a merge or rebase.\n>Not sure if I`m misunderstanding you, but at least `git diff stash@{0} stash@{1}` seems to already work as expected - I remember using it in the past, >and I`ve tried it again now[1], and it still works.\n\nI'm sorry for not checking first before posting. Thanks 😊\n\nRandall\n\n"},{"id":"321963","messageId":"xmqqpoe9p6bn.fsf@gitster.mtv.corp.google.com","threadId":"46138","inReplyTo":"1c04d689-6796-17d1-e058-18874768c22a@gmail.com","subject":"Re: Feature Request: Show status of the stash in git status command","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2017-06-12T15:35:24Z","receivedAt":"2017-06-12T16:45:36Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"liam Beguin <liambeguin@gmail.com> writes:\n\n> +static int stash_count_refs(struct object_id *ooid, struct object_id *noid,\n> +\t\t\t    const char *email, timestamp_t timestamp, int tz,\n> +\t\t\t    const char *message, void *cb_data)\n> +{\n> +\tint *c = cb_data;\n> +\t(*c)++;\n> +\treturn 0;\n> +}\n\nCount up, and tell the caller to keep going by returning 0.  That\nsounds sane.\n\n> +static void wt_longstatus_print_stash_summary(struct wt_status *s)\n> +{\n> +\tint stash_count = 0;\n> +\n> +\tfor_each_reflog_ent(\"refs/stash\", stash_count_refs, &stash_count);\n\nAnd do so with a counter initialized to 0.  Also sane.\n\n> +\tif (stash_count > 0)\n> +\t\tstatus_printf_ln(s, GIT_COLOR_NORMAL,\n> +\t\t\t\t Q_(\"Your stash currently has %d commit\",\n> +\t\t\t\t    \"Your stash currently has %d commits\", stash_count),\n> +\t\t\t\t stash_count);\n\nConceptually, the contents of the stash are *not* commits, even\nthough the implementation happens to use a commit to represent each\nstash entry.  Perhaps \"has %d entry/entries\" is an improvement, but\na quick scanning of an early part of \"git stash --help\" tells me\nthat\n\n\tYou have 1 stash / You have 4 stashes\n\nwould be the best, as the documentation calls each entry \"a stash\".\nE.g. \"list\" is explained to list \"the stashes\", and \"show <stash>\"\nis explained to show the changes recorded in \"the stash\".\n\n> +}\n> +\n>  static void wt_longstatus_print_submodule_summary(struct wt_status *s, int uncommitted)\n>  {\n>  \tstruct child_process sm_summary = CHILD_PROCESS_INIT;\n> @@ -1536,6 +1557,7 @@ static void wt_longstatus_print(struct wt_status *s)\n>  \tconst char *branch_color = color(WT_STATUS_ONBRANCH, s);\n>  \tconst char *branch_status_color = color(WT_STATUS_HEADER, s);\n>  \tstruct wt_status_state state;\n> +\tint show_stash = 0;\n>  \n>  \tmemset(&state, 0, sizeof(state));\n>  \twt_status_get_state(&state,\n> @@ -1641,6 +1663,8 @@ static void wt_longstatus_print(struct wt_status *s)\n>  \t\t} else\n>  \t\t\tprintf(_(\"nothing to commit, working tree clean\\n\"));\n>  \t}\n> +\tif (!git_config_get_bool(\"status.showStash\", &show_stash) && show_stash)\n> +\t\twt_longstatus_print_stash_summary(s);\n>  }\n\nTry to get \"status.showstash\" as a boolean, and only when it\nsucceeds and the value is true, give this extra info (i.e. when the\nvariable does not exist, do not complain and do not show).  Sounds\nsensible.\n\nOverall the logic looks good to me; just the phrasing is\nquestionable, relative to the existing documentation.\n\nThanks.\n"},{"id":"322044","messageId":"2217b9a1-dc8c-635a-649e-eae2dec5aaa5@gmail.com","threadId":"46138","inReplyTo":"xmqqpoe9p6bn.fsf@gitster.mtv.corp.google.com","subject":"Re: Feature Request: Show status of the stash in git status command","fromName":"liam Beguin","fromEmail":"liambeguin@gmail.com","sentAt":"2017-06-13T03:42:44Z","receivedAt":"2017-06-13T03:42:53Z","isPatch":false,"sender":{"key":"liambeguin@gmail.com","avatar":"https://avatars.githubusercontent.com/u/3811160?v=4"},"body":"Hi, \n\nThanks for the feedback. I'll be sending a patch with the updates shortly!\n\nOn 12/06/17 11:35 AM, Junio C Hamano wrote:\n> liam Beguin <liambeguin@gmail.com> writes:\n> \n>> +static int stash_count_refs(struct object_id *ooid, struct object_id *noid,\n>> +\t\t\t    const char *email, timestamp_t timestamp, int tz,\n>> +\t\t\t    const char *message, void *cb_data)\n>> +{\n>> +\tint *c = cb_data;\n>> +\t(*c)++;\n>> +\treturn 0;\n>> +}\n> \n> Count up, and tell the caller to keep going by returning 0.  That\n> sounds sane.\n> \n>> +static void wt_longstatus_print_stash_summary(struct wt_status *s)\n>> +{\n>> +\tint stash_count = 0;\n>> +\n>> +\tfor_each_reflog_ent(\"refs/stash\", stash_count_refs, &stash_count);\n> \n> And do so with a counter initialized to 0.  Also sane.\n> \n>> +\tif (stash_count > 0)\n>> +\t\tstatus_printf_ln(s, GIT_COLOR_NORMAL,\n>> +\t\t\t\t Q_(\"Your stash currently has %d commit\",\n>> +\t\t\t\t    \"Your stash currently has %d commits\", stash_count),\n>> +\t\t\t\t stash_count);\n> \n> Conceptually, the contents of the stash are *not* commits, even\n> though the implementation happens to use a commit to represent each\n> stash entry.  Perhaps \"has %d entry/entries\" is an improvement, but\n> a quick scanning of an early part of \"git stash --help\" tells me\n> that\n\nwhat's different between a stash and a commit? \n\n> \n> \tYou have 1 stash / You have 4 stashes\n> \n> would be the best, as the documentation calls each entry \"a stash\".\n> E.g. \"list\" is explained to list \"the stashes\", and \"show <stash>\"\n> is explained to show the changes recorded in \"the stash\".\n> \n>> +}\n>> +\n>>  static void wt_longstatus_print_submodule_summary(struct wt_status *s, int uncommitted)\n>>  {\n>>  \tstruct child_process sm_summary = CHILD_PROCESS_INIT;\n>> @@ -1536,6 +1557,7 @@ static void wt_longstatus_print(struct wt_status *s)\n>>  \tconst char *branch_color = color(WT_STATUS_ONBRANCH, s);\n>>  \tconst char *branch_status_color = color(WT_STATUS_HEADER, s);\n>>  \tstruct wt_status_state state;\n>> +\tint show_stash = 0;\n>>  \n>>  \tmemset(&state, 0, sizeof(state));\n>>  \twt_status_get_state(&state,\n>> @@ -1641,6 +1663,8 @@ static void wt_longstatus_print(struct wt_status *s)\n>>  \t\t} else\n>>  \t\t\tprintf(_(\"nothing to commit, working tree clean\\n\"));\n>>  \t}\n>> +\tif (!git_config_get_bool(\"status.showStash\", &show_stash) && show_stash)\n>> +\t\twt_longstatus_print_stash_summary(s);\n>>  }\n> \n> Try to get \"status.showstash\" as a boolean, and only when it\n> succeeds and the value is true, give this extra info (i.e. when the\n> variable does not exist, do not complain and do not show).  Sounds\n> sensible.\n> \n> Overall the logic looks good to me; just the phrasing is\n> questionable, relative to the existing documentation.\n> \n> Thanks.\n> \n\nThanks,\n\n - Liam \n"},{"id":"322051","messageId":"20170613064142.aww23a75pu3ytym6@tigra","threadId":"46138","inReplyTo":"2217b9a1-dc8c-635a-649e-eae2dec5aaa5@gmail.com","subject":"Re: Feature Request: Show status of the stash in git status command","fromName":"Konstantin Khomoutov","fromEmail":"kostix+git@007spb.ru","sentAt":"2017-06-13T06:42:02Z","receivedAt":"2017-06-13T06:42:15Z","isPatch":false,"sender":{"key":"kostix+git@007spb.ru","avatar":null},"body":"On Mon, Jun 12, 2017 at 11:42:44PM -0400, liam Beguin wrote:\n\n[...]\n>> Conceptually, the contents of the stash are *not* commits, even\n>> though the implementation happens to use a commit to represent each\n>> stash entry.  Perhaps \"has %d entry/entries\" is an improvement, but\n>> a quick scanning of an early part of \"git stash --help\" tells me\n>> that\n> \n> what's different between a stash and a commit? \n\nThe same that exists between an interface and a concrete implementation\nin a programming language.\n\n\"A stash entry\" is a concept which is defined to keep explicitly\nrecorded untracked files and which can be applied, shown and deleted\nfrom the stash bag (well, you can create a branch off it as well).\n\nThe fact a stash entry is a merge commit of two synthetic commits is an\nimplementation detail.  It can be very useful at times for power users,\nbut regular Git users need not be concerned with this.\n\nAnother fact worth reiterating that what the UI displays to the user is\nbetter to match what the user reads in the docs. ;-)\n\n"},{"id":"322084","messageId":"be7311a1-1dfa-2cb6-4426-6771db545892@gmail.com","threadId":"46138","inReplyTo":"20170613064142.aww23a75pu3ytym6@tigra","subject":"Re: Feature Request: Show status of the stash in git status command","fromName":"liam Beguin","fromEmail":"liambeguin@gmail.com","sentAt":"2017-06-13T12:34:17Z","receivedAt":"2017-06-13T12:34:25Z","isPatch":false,"sender":{"key":"liambeguin@gmail.com","avatar":"https://avatars.githubusercontent.com/u/3811160?v=4"},"body":"Hi, \n\nOn 13/06/17 02:42 AM, Konstantin Khomoutov wrote:\n> On Mon, Jun 12, 2017 at 11:42:44PM -0400, liam Beguin wrote:\n> \n> [...]\n>>> Conceptually, the contents of the stash are *not* commits, even\n>>> though the implementation happens to use a commit to represent each\n>>> stash entry.  Perhaps \"has %d entry/entries\" is an improvement, but\n>>> a quick scanning of an early part of \"git stash --help\" tells me\n>>> that\n>>\n>> what's different between a stash and a commit? \n> \n> The same that exists between an interface and a concrete implementation\n> in a programming language.\n\nMakes sense, I thought there was a more fundamental difference.\n\n> \n> \"A stash entry\" is a concept which is defined to keep explicitly\n> recorded untracked files and which can be applied, shown and deleted\n> from the stash bag (well, you can create a branch off it as well).\n\nI've noticed this but I don't understand when it can be used.\nI'll try to find out more on this.\n\n> \n> The fact a stash entry is a merge commit of two synthetic commits is an\n> implementation detail.  It can be very useful at times for power users,\n> but regular Git users need not be concerned with this.\n> \n> Another fact worth reiterating that what the UI displays to the user is\n> better to match what the user reads in the docs. ;-)\n> \n\nI'll make changes as suggested by Junio. I slightly prefer\n\"Your stash has %d entry/entries\" over \"You have %d stash/stashes\" \nbut I'll go with what's used elsewhere in the documentation. \n\nThanks,\n\n - Liam\n"},{"id":"322086","messageId":"xmqq4lvk9gvf.fsf@gitster.mtv.corp.google.com","threadId":"46138","inReplyTo":"be7311a1-1dfa-2cb6-4426-6771db545892@gmail.com","subject":"Re: Feature Request: Show status of the stash in git status command","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2017-06-13T13:06:28Z","receivedAt":"2017-06-13T13:06:35Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"liam Beguin <liambeguin@gmail.com> writes:\n\n>> The fact a stash entry is a merge commit of two synthetic commits is an\n>> implementation detail.  It can be very useful at times for power users,\n>> but regular Git users need not be concerned with this.\n>> \n>> Another fact worth reiterating that what the UI displays to the user is\n>> better to match what the user reads in the docs. ;-)\n>\n> I'll make changes as suggested by Junio. I slightly prefer\n> \"Your stash has %d entry/entries\" over \"You have %d stash/stashes\" \n> but I'll go with what's used elsewhere in the documentation. \n\nYup, I agree that I would definitely call them \"stash entries\" if I\nwere writing the documentation today, but lets match the new message\nto the existing lingo first and think about renaming \"a stash\" to \"a\nstash entry\" as a separate step.  The latter would become a larger\nchange (we'd also need to add an entry to glossary-contents.txt).\n\nThanks.\n"}]}