{"thread":{"id":"8830","subject":"[PATCH] stash: end commit log with a newline","startedAt":"2007-07-03T08:59:06Z","lastAt":"2007-07-04T23:18:27Z","messageCount":8,"participants":["Uwe Kleine-König","Johannes Schindelin","Jeff King","Junio C Hamano","しらいしななこ"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"46340","messageId":"20070703085906.GA4963@lala","threadId":"8830","inReplyTo":null,"subject":"[PATCH] stash: end commit log with a newline","fromName":"Uwe Kleine-König","fromEmail":"ukleinek@informatik.uni-freiburg.de","sentAt":"2007-07-03T08:59:06Z","receivedAt":"2007-07-03T08:59:06Z","isPatch":true,"sender":{"key":"u.kleine-koenig@pengutronix.de","avatar":"https://gravatar.com/avatar/354b5e3ceb2806a2f1e1e382ac29ddbdad18288654da62b61eb13583a857eee7?d=mp&s=160"},"body":"If I do\n\n\tgit cat-file commit $commitid\n\nfor a commit created by stash, the next prompt starts directly after the\nshortlog of HEAD.\n\nSigned-off-by: Uwe Kleine-König <ukleinek@informatik.uni-freiburg.de>\n---\n git-stash.sh |    2 +-\n 1 files changed, 1 insertions(+), 1 deletions(-)\n\ndiff --git a/git-stash.sh b/git-stash.sh\nindex 16979ab..9deda44 100755\n--- a/git-stash.sh\n+++ b/git-stash.sh\n@@ -67,7 +67,7 @@ save_stash () {\n \t\tdie \"Cannot save the current worktree state\"\n \n \t# create the stash\n-\tw_commit=$(printf 'WIP on %s' \"$msg\" |\n+\tw_commit=$(printf 'WIP on %s\\n' \"$msg\" |\n \t\tgit commit-tree $w_tree -p $b_commit -p $i_commit) ||\n \t\tdie \"Cannot record working tree state\"\n \n-- \n1.5.2.2.1451.gb0e5e\n\n\n-- \nUwe Kleine-König\n\ncal 9 1752 | grep 10\n"},{"id":"46348","messageId":"Pine.LNX.4.64.0707031228460.4071@racer.site","threadId":"8830","inReplyTo":"20070703085906.GA4963@lala","subject":"Re: [PATCH] stash: end commit log with a newline","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2007-07-03T11:29:42Z","receivedAt":"2007-07-03T11:29:42Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Tue, 3 Jul 2007, Uwe Kleine-K?nig wrote:\n\n> -\tw_commit=$(printf 'WIP on %s' \"$msg\" |\n> +\tw_commit=$(printf 'WIP on %s\\n' \"$msg\" |\n\nWhy not\n\n\tw_commit=$(echo \"WIP on $msg\" |\n\nHmm? It is shorter and more to the point. IMHO it is also more common.\n\nCiao,\nDscho\n"},{"id":"46366","messageId":"20070703140119.GA15711@informatik.uni-freiburg.de","threadId":"8830","inReplyTo":"Pine.LNX.4.64.0707031228460.4071@racer.site","subject":"Re: [PATCH] stash: end commit log with a newline","fromName":"Uwe Kleine-König","fromEmail":"ukleinek@informatik.uni-freiburg.de","sentAt":"2007-07-03T14:01:19Z","receivedAt":"2007-07-03T14:01:19Z","isPatch":true,"sender":{"key":"u.kleine-koenig@pengutronix.de","avatar":"https://gravatar.com/avatar/354b5e3ceb2806a2f1e1e382ac29ddbdad18288654da62b61eb13583a857eee7?d=mp&s=160"},"body":"Hallo Johannes,\n\nJohannes Schindelin wrote:\n> On Tue, 3 Jul 2007, Uwe Kleine-K?nig wrote:\n> \n> > -\tw_commit=$(printf 'WIP on %s' \"$msg\" |\n> > +\tw_commit=$(printf 'WIP on %s\\n' \"$msg\" |\n> \n> Why not\n> \n> \tw_commit=$(echo \"WIP on $msg\" |\nI just continued to use printf to make a minimal change.  I don't have\nanything against echo.\n \nBest regards\nUwe\n\n-- \nUwe Kleine-König\n\nhttp://www.google.com/search?q=5%2B7\n"},{"id":"46371","messageId":"20070703143227.GD18597@coredump.intra.peff.net","threadId":"8830","inReplyTo":"Pine.LNX.4.64.0707031228460.4071@racer.site","subject":"Re: [PATCH] stash: end commit log with a newline","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2007-07-03T14:32:27Z","receivedAt":"2007-07-03T14:32:27Z","isPatch":true,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Tue, Jul 03, 2007 at 12:29:42PM +0100, Johannes Schindelin wrote:\n\n> Why not\n> \n> \tw_commit=$(echo \"WIP on $msg\" |\n> \n> Hmm? It is shorter and more to the point. IMHO it is also more common.\n\nBecause echo cannot reliably reproduce arbitrary strings. See commits:\n\n  a23bfaed..4b7cc26a\n\nYou can add this to your list of reasons to rewrite everything in C.\n\n-Peff\n"},{"id":"46443","messageId":"200707040511.l645BIZE003058@mi1.bluebottle.com","threadId":"8830","inReplyTo":"20070703085906.GA4963@lala","subject":"Re: [PATCH] stash: end commit log with a newline","fromName":"しらいしななこ","fromEmail":"nanako3@bluebottle.com","sentAt":"2007-07-04T05:10:27Z","receivedAt":"2007-07-04T05:10:27Z","isPatch":true,"sender":{"key":"nanako3@lavabit.com","avatar":"https://gravatar.com/avatar/3777b9e201c5883a62b1a6fdf7c53f2d712d1d80989146063ea861e33aad72a8?d=mp&s=160"},"body":"Quoting Uwe Kleine-König  <ukleinek@informatik.uni-freiburg.de>:\n\n> If I do\n>\n> \tgit cat-file commit $commitid\n>\n> for a commit created by stash, the next prompt starts directly after the\n> shortlog of HEAD.\n\nThank you for fixing my bug.\n\n-- \nNanako Shiraishi\nhttp://ivory.ap.teacup.com/nanako3/\n\n----------------------------------------------------------------------\nFree pop3 email with a spam filter.\nhttp://www.bluebottle.com/tag/5\n"},{"id":"46442","messageId":"7vodiskb3d.fsf@assigned-by-dhcp.cox.net","threadId":"8830","inReplyTo":"20070703085906.GA4963@lala","subject":"Re: [PATCH] stash: end commit log with a newline","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2007-07-04T05:10:46Z","receivedAt":"2007-07-04T05:10:46Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Uwe Kleine-König  <ukleinek@informatik.uni-freiburg.de> writes:\n\n> If I do\n>\n> \tgit cat-file commit $commitid\n>\n> for a commit created by stash, the next prompt starts directly after the\n> shortlog of HEAD.\n\nThanks.\n\nI noticed another thing.  The entries shown in \"git stash list\"\nlook like this:\n\nstash@{0}: js/stash: e1d32c1... Teach git-stash to \"apply --index\"\nstash@{1}: master: 5be6007... Rewrite \"git-frotz\" to \"git frotz\"\nstash@{2}: master: 36e5e70... Start deprecating \"git-command\" in favor of \"git command\"\nstash@{3}: master: 3b0d999... Merge branch 'jo/init'\n\nBut each of the stash is _not_ about these commits, but is about\nsome change that happens to be on top of them.\n\nSo risking to make it a tad longer, how about doing this on top?\n\n---\n\n git-stash.sh |    2 +-\n 1 files changed, 1 insertions(+), 1 deletions(-)\n\ndiff --git a/git-stash.sh b/git-stash.sh\nindex 9deda44..dd721d2 100755\n--- a/git-stash.sh\n+++ b/git-stash.sh\n@@ -71,7 +71,7 @@ save_stash () {\n \t\tgit commit-tree $w_tree -p $b_commit -p $i_commit) ||\n \t\tdie \"Cannot record working tree state\"\n \n-\tgit update-ref -m \"$msg\" $ref_stash $w_commit ||\n+\tgit update-ref -m \"WIP on $msg\" $ref_stash $w_commit ||\n \t\tdie \"Cannot save the current status\"\n \tprintf >&2 'Saved WIP on %s\\n' \"$msg\"\n }\n"},{"id":"46448","messageId":"20070704074444.GA5687@informatik.uni-freiburg.de","threadId":"8830","inReplyTo":"7vodiskb3d.fsf@assigned-by-dhcp.cox.net","subject":"Re: [PATCH] stash: end commit log with a newline","fromName":"Uwe Kleine-König","fromEmail":"ukleinek@informatik.uni-freiburg.de","sentAt":"2007-07-04T07:44:44Z","receivedAt":"2007-07-04T07:44:44Z","isPatch":true,"sender":{"key":"u.kleine-koenig@pengutronix.de","avatar":"https://gravatar.com/avatar/354b5e3ceb2806a2f1e1e382ac29ddbdad18288654da62b61eb13583a857eee7?d=mp&s=160"},"body":"Junio C Hamano wrote:\n> I noticed another thing.  The entries shown in \"git stash list\"\n> look like this:\n> \n> stash@{0}: js/stash: e1d32c1... Teach git-stash to \"apply --index\"\n> stash@{1}: master: 5be6007... Rewrite \"git-frotz\" to \"git frotz\"\n> stash@{2}: master: 36e5e70... Start deprecating \"git-command\" in favor of \"git command\"\n> stash@{3}: master: 3b0d999... Merge branch 'jo/init'\n> \n> But each of the stash is _not_ about these commits, but is about\n> some change that happens to be on top of them.\n> \n> So risking to make it a tad longer, how about doing this on top?\n> \n> -\tgit update-ref -m \"$msg\" $ref_stash $w_commit ||\n> +\tgit update-ref -m \"WIP on $msg\" $ref_stash $w_commit ||\n\nI like that.  I already wondered about that, too.  But not as much as\nthinking about an alternative.\n\nSo:\n\nAcked-by: Uwe Kleine-König <ukleinek@informatik.uni-freiburg.de>\n\nBest regards\nUwe\n\n-- \nUwe Kleine-König\n\nhttp://www.google.com/search?q=gravity+on+earth%3D\n"},{"id":"46520","messageId":"200707042324.l64NOp8J019289@mi0.bluebottle.com","threadId":"8830","inReplyTo":"20070704074444.GA5687@informatik.uni-freiburg.de","subject":"Re: [PATCH] stash: end commit log with a newline","fromName":"しらいしななこ","fromEmail":"nanako3@bluebottle.com","sentAt":"2007-07-04T23:18:27Z","receivedAt":"2007-07-04T23:18:27Z","isPatch":true,"sender":{"key":"nanako3@lavabit.com","avatar":"https://gravatar.com/avatar/3777b9e201c5883a62b1a6fdf7c53f2d712d1d80989146063ea861e33aad72a8?d=mp&s=160"},"body":"Quoting Uwe Kleine-König  <ukleinek@informatik.uni-freiburg.de>:\n\n> Junio C Hamano wrote:\n>> I noticed another thing.  The entries shown in \"git stash list\"\n>> look like this:\n>> \n>> stash@{0}: js/stash: e1d32c1... Teach git-stash to \"apply --index\"\n>> stash@{1}: master: 5be6007... Rewrite \"git-frotz\" to \"git frotz\"\n>> stash@{2}: master: 36e5e70... Start deprecating \"git-command\" in favor of \"git command\"\n>> stash@{3}: master: 3b0d999... Merge branch 'jo/init'\n>> \n>> But each of the stash is _not_ about these commits, but is about\n>> some change that happens to be on top of them.\n>> \n>> So risking to make it a tad longer, how about doing this on top?\n>> \n>> -\tgit update-ref -m \"$msg\" $ref_stash $w_commit ||\n>> +\tgit update-ref -m \"WIP on $msg\" $ref_stash $w_commit ||\n>\n> I like that.  I already wondered about that, too.  But not as much as\n> thinking about an alternative.\n>\n> So:\n>\n> Acked-by: Uwe Kleine-König <ukleinek@informatik.uni-freiburg.de>\n\nI am sorry to join the discussion late, but I think it is much better to let\nthe user give a short reminder message from the command line.  For example,\n\n  $ git stash add customized message to stash\n\nWhen I say \"git stash list\", I want to see which branch I was on when I was\nin the middle of doing something, and what that something was.  It is not\ninteresting which commit on that branch I started that change from.  After\ncreating a stash without a message, and then another stash with a message, I\nwant to see:\n\n  $ git stash list\n  stash@{0}: On master: add customized message to stash\n  stash@{1}: WIP on master: 36e5e70... Start deprecating \"git-command\" in favor of \"git command\"\n\n-- \nNanako Shiraishi\nhttp://ivory.ap.teacup.com/nanako3/\n\n----------------------------------------------------------------------\nFree pop3 email with a spam filter.\nhttp://www.bluebottle.com/tag/5\n"}]}