{"thread":{"id":"27730","subject":"Re: [PATCH] stash: Add --include-untracked option to stash and remove all untracked files","startedAt":"2011-06-29T17:11:59Z","lastAt":"2011-06-29T17:11:59Z","messageCount":1,"participants":["David Caldwell"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"170673","messageId":"BE416D9D73FF59D8584480F7@black.porkrind.org","threadId":"27730","inReplyTo":null,"subject":"Re: [PATCH] stash: Add --include-untracked option to stash and remove all untracked files","fromName":"David Caldwell","fromEmail":"david@porkrind.org","sentAt":"2011-06-29T17:11:59Z","receivedAt":"2011-06-29T17:11:59Z","isPatch":true,"sender":{"key":"david@porkrind.org","avatar":"https://avatars.githubusercontent.com/u/45445?v=4"},"body":"On 6/26/11 1:02 PM -0700 Junio C Hamano wrote:\n\n> David Caldwell <david@porkrind.org> writes:\n>\n>>  create_stash () {\n>>  \tstash_msg=\"$1\"\n>> +\tuntracked=\"$2\"\n...\n>> -\tcreate_stash \"$stash_msg\"\n>> +\tcreate_stash \"$stash_msg\" $untracked\n>\n> Just a minor nit from internal API point of view, I would prefer to see\n> something like\n>\n> \tcreate_stash --untracked=all \"message\"\n>\n> or even\n>\n> \tcreate_stash --untracked=all --message=\"message\"\n>\n> once you start enriching these functions with optional behaviour.\n\nI could do that, but doesn't that mean create_stash() would have to have a \nwhole while loop and case statement just to parse the two options? Because \nthat seems a little overkill for something that is only called from 2 \nplaces. Is there some nice compact way of doing the parsing I'm missing?\n\nI could also remove parameter passing part and just leave it as a global \nlike the --patch option does. ;-)\n\n-David\n"}]}