{"thread":{"id":"9068","subject":"[PATCH] Document \"git stash message...\"","startedAt":"2007-07-17T08:15:42Z","lastAt":"2007-08-01T13:38:42Z","messageCount":5,"participants":["しらいしななこ","Junio C Hamano","Johannes Schindelin","Shawn O. Pearce"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"47620","messageId":"20070624192215.6117@nanako3.bluebottle.com","threadId":"9068","inReplyTo":null,"subject":"[PATCH] Document \"git stash message...\"","fromName":"しらいしななこ","fromEmail":"nanako3@bluebottle.com","sentAt":"2007-07-17T08:15:42Z","receivedAt":"2007-07-17T08:15:42Z","isPatch":true,"sender":{"key":"nanako3@lavabit.com","avatar":"https://gravatar.com/avatar/3777b9e201c5883a62b1a6fdf7c53f2d712d1d80989146063ea861e33aad72a8?d=mp&s=160"},"body":"The command was recently updated to take message on the command line, but\nthis feature has not been documented.\n\nSigned-off-by: Nanako Shiraishi <nanako3@bluebottle.com>\n---\n Documentation/git-stash.txt |   11 +++++++----\n 1 files changed, 7 insertions(+), 4 deletions(-)\n\ndiff --git a/Documentation/git-stash.txt b/Documentation/git-stash.txt\nindex ad95ed9..4404361 100644\n--- a/Documentation/git-stash.txt\n+++ b/Documentation/git-stash.txt\n@@ -8,7 +8,8 @@ git-stash - Stash the changes in a dirty working directory away\n SYNOPSIS\n --------\n [verse]\n-'git-stash' (save | list | show [<stash>] | apply [<stash>] | clear)\n+'git-stash' (list | show [<stash>] | apply [<stash>] | clear)\n+'git-stash' [save] [message...]\n \n DESCRIPTION\n -----------\n@@ -22,7 +23,9 @@ The modifications stashed away by this command can be listed with\n `git-stash list`, inspected with `git-stash show`, and restored\n (potentially on top of a different commit) with `git-stash apply`.\n Calling git-stash without any arguments is equivalent to `git-stash\n-save`.\n+save`.  A stash is by default listed as \"WIP on 'branchname' ...\", but\n+you can give more descriptive message on the command line when\n+you create one.\n \n The latest stash you created is stored in `$GIT_DIR/refs/stash`; older\n stashes are found in the reflog of this reference and can be named using\n@@ -48,8 +51,8 @@ list::\n \tbased on.\n +\n ----------------------------------------------------------------\n-stash@{0}: submit: 6ebd0e2... Add git-stash\n-stash@{1}: master: 9cc0589... Merge branch 'master' of gfi\n+stash@{0}: WIP on submit: 6ebd0e2... Update git-stash documentation\n+stash@{1}: On master: 9cc0589... Add git-stash\n ----------------------------------------------------------------\n \n show [<stash>]::\n\n-- \nNanako Shiraishi\nhttp://ivory.ap.teacup.com/nanako3/\n\n----------------------------------------------------------------------\nGet a free email account with anti spam protection.\nhttp://www.bluebottle.com/tag/2\n"},{"id":"47622","messageId":"7vps2r9zx2.fsf@assigned-by-dhcp.cox.net","threadId":"9068","inReplyTo":"20070624192215.6117@nanako3.bluebottle.com","subject":"Re: [PATCH] Document \"git stash message...\"","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2007-07-17T08:50:49Z","receivedAt":"2007-07-17T08:50:49Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"しらいしななこ  <nanako3@bluebottle.com> writes:\n\n> The command was recently updated to take message on the command line, but\n> this feature has not been documented.\n>\n> Signed-off-by: Nanako Shiraishi <nanako3@bluebottle.com>\n\nThanks -- that was my fault.\n\n>  Documentation/git-stash.txt |   11 +++++++----\n>  1 files changed, 7 insertions(+), 4 deletions(-)\n>\n> diff --git a/Documentation/git-stash.txt b/Documentation/git-stash.txt\n> index ad95ed9..4404361 100644\n> --- a/Documentation/git-stash.txt\n> +++ b/Documentation/git-stash.txt\n> @@ -22,7 +23,9 @@ The modifications stashed away by this command can be listed with\n>  `git-stash list`, inspected with `git-stash show`, and restored\n>  (potentially on top of a different commit) with `git-stash apply`.\n>  Calling git-stash without any arguments is equivalent to `git-stash\n> -save`.\n> +save`.  A stash is by default listed as \"WIP on 'branchname' ...\", but\n> +you can give more descriptive message on the command line when\n> +you create one.\n\nPerhaps \"give a more descriptive message\"?\n"},{"id":"48115","messageId":"7vzm1orcty.fsf@assigned-by-dhcp.cox.net","threadId":"9068","inReplyTo":"20070624192215.6117@nanako3.bluebottle.com","subject":"Re: [PATCH] Update Japanese messages","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2007-07-22T09:45:45Z","receivedAt":"2007-07-22T09:45:45Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Thanks.  Me being a Japanese, it would have been very\nembarrasing to keep a very incomplete Japanese message file in\nthe project ;-).\n\nThe translation looks good.  Johannes, if you haven't got around\nit yet, please apply.\n"},{"id":"48122","messageId":"Pine.LNX.4.64.0707221240090.14781@racer.site","threadId":"9068","inReplyTo":"7vzm1orcty.fsf@assigned-by-dhcp.cox.net","subject":"Re: [PATCH] Update Japanese messages","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2007-07-22T11:41:01Z","receivedAt":"2007-07-22T11:41:01Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Sun, 22 Jul 2007, Junio C Hamano wrote:\n\n> Thanks.  Me being a Japanese, it would have been very\n> embarrasing to keep a very incomplete Japanese message file in\n> the project ;-).\n> \n> The translation looks good.  Johannes, if you haven't got around\n> it yet, please apply.\n\nSo done (actually I just merged the mob branch ;-).  Thanks, both of you.\n\nCiao,\nDscho\n"},{"id":"49309","messageId":"20070801133842.GG20052@spearce.org","threadId":"9068","inReplyTo":"7vvebz602q.fsf@assigned-by-dhcp.cox.net","subject":"Re: git-gui: diff/console part does not show UTF-8 Japanese","fromName":"Shawn O. Pearce","fromEmail":"spearce@spearce.org","sentAt":"2007-08-01T13:38:42Z","receivedAt":"2007-08-01T13:38:42Z","isPatch":false,"sender":{"key":"spearce@spearce.org","avatar":"https://avatars.githubusercontent.com/u/34844?v=4"},"body":"Junio C Hamano <gitster@pobox.com> wrote:\n> Nanako Shiraishi <nanako3@bluebottle.com> writes:\n> \n> > \tI was testing git-gui (i18n branch).  I can see the translated \n> > message in the UI buttons and menus, and also commit message part shows \n> > Japanese strings, but I cannot get the diff part at the bottom to show \n> > Japanese.  Because I did set the two fonts to the same font from the \n> > Edit/Option menu, I do not think it is the problem with the font \n> > settings.\n> >\n> > Can anybody help?\n> \n> I can see the same breakage in regular git-gui without i18n.\n> Curious.  The commit message shows Japanese but diff part is\n> bogus.\n> \n> And the breakage is not just Japanese.  I can see this with\n> Kristian's name by resetting a branch to 12ace0b2 and then\n> attempting to amend it.  Interestingly enough, gitk shows the\n> patch as expected.  I do not quite know how it is arranged\n> there, though.\n> \n> Now, I freely admit I do not quite know what I am doing, but\n> this patch that tries to mimick the handling of commit log\n> message seems to help it for git-gui.\n> \n> I do think using i18n.commitencoding for payload is wrong,\n> though.\n\nYea, it is wrong.  The patch is logically fine as-is, there's nothing\nwrong with it except this part.  I think the reason that gitk shows\nthe patch as expected is because it is using i18n.commitencoding\nfor the payload, and that's only happening as a side-effect of how\nit used it for the commit message itself.  Call it dumb luck the\nthing even displays right.\n\nTo really Do The Right Thing(tm) here I think we need to store an\nencoding for each file path so we know what we are looking at when\nwe see the file content.  E.g. a gitattributes enc attribute?\n\nFor some files we might be able to guess.  But I have to admit,\nI'm not up on my encoding guessing algorithms.  ;-)\n\nFor XML files we can probably guess its XML (\"starts with <?xml\")\nand we can guess the encoding from that header line.  But not\neverything that contains Japanese characters is an XML file.\nLike .po files for instance.\n\n\nWhere it gets even more interesting is how do I show a patch\nwhere the encoding changed?  E.g. reencode a file from ISO-8859-1\ninto UTF-8?  A number of lines would probably be identical, except\nfor their encoding.  So the user would want to see that they are\nthe same.  So we really should be able to show the old line using\nits old encoding, and the new line using its new encoding.  Hmmph.\n\nAs a stop-gap I guess I could include a \"Change Encoding\" option\nfor the diff pane and let you set the encoding to a specific name.\nBut I really think git-gui should be able to do better than that.\n\n-- \nShawn.\n"}]}