<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/git-stash.sh, branch v2.0.2</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.0.2</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.0.2'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2014-03-21T19:48:51Z</updated>
<entry>
<title>Merge branch 'jc/stash-pop-not-popped'</title>
<updated>2014-03-21T19:48:51Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2014-03-21T19:48:51Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=10bdb20d6a6841b22a3327e3e0fbdd6b5521eb96'/>
<id>urn:sha1:10bdb20d6a6841b22a3327e3e0fbdd6b5521eb96</id>
<content type='text'>
"stash pop", upon failing to apply the stash, refrains from
discarding the stash to avoid information loss.  Be more explicit
in the error message.

The wording may want to get a bit more bikeshedding.

* jc/stash-pop-not-popped:
  stash pop: mention we did not drop the stash upon failing to apply
</content>
</entry>
<entry>
<title>stash pop: mention we did not drop the stash upon failing to apply</title>
<updated>2014-02-26T22:18:54Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2014-02-26T22:18:54Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=2d4c99339210d43a84841a71a50e88a050d9e21b'/>
<id>urn:sha1:2d4c99339210d43a84841a71a50e88a050d9e21b</id>
<content type='text'>
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>stash: handle specifying stashes with $IFS</title>
<updated>2014-01-07T18:51:04Z</updated>
<author>
<name>Øystein Walle</name>
<email>oystwa@gmail.com</email>
</author>
<published>2014-01-07T08:22:15Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=2a07e4374c0ba6f2e991965c99b448ccb563f2fc'/>
<id>urn:sha1:2a07e4374c0ba6f2e991965c99b448ccb563f2fc</id>
<content type='text'>
When trying to pop/apply a stash specified with an argument
containing IFS whitespace, git-stash will throw an error:

    $ git stash pop 'stash@{two hours ago}'
    Too many revisions specified: stash@{two hours ago}

This happens because word splitting is used to count non-option
arguments. Make use of rev-parse's --sq option to quote the arguments
for us to ensure a correct count. Add quotes where necessary.

Also add a test that verifies correct behaviour.

Helped-by: Thomas Rast &lt;tr@thomasrast.ch&gt;
Signed-off-by: Øystein Walle &lt;oystwa@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Revert "git stash: avoid data loss when "git stash save" kills a directory"</title>
<updated>2013-08-14T16:53:43Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2013-08-14T16:53:43Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=c1ebd90c832e28ff27654c21f9985aebe986352d'/>
<id>urn:sha1:c1ebd90c832e28ff27654c21f9985aebe986352d</id>
<content type='text'>
This reverts commit a73653130edd6a8977106d45a8092c09040f9132, as it
has been reported that "ls-files --killed" is too time-consuming in
a deep directory with too many untracked crufts (e.g. $HOME/.git
tracking only a few files).

We'd need to revisit it later but "ls-files --killed" needs to be
optimized before it happens.
</content>
</entry>
<entry>
<title>git stash: avoid data loss when "git stash save" kills a directory</title>
<updated>2013-07-01T21:23:24Z</updated>
<author>
<name>Petr Baudis</name>
<email>pasky@ucw.cz</email>
</author>
<published>2013-06-28T15:05:32Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=a73653130edd6a8977106d45a8092c09040f9132'/>
<id>urn:sha1:a73653130edd6a8977106d45a8092c09040f9132</id>
<content type='text'>
"stash save" is about saving the local change to the working tree,
but also about restoring the state of the last commit to the working
tree.  When a local change is to turn a non-directory to a directory,
in order to restore the non-directory, everything in the directory
needs to be removed.

Which is fine when running "git stash save --include-untracked",
but without that option, untracked, newly created files in the
directory will have to be discarded, if the state you are restoring
to has a non-directory at the same path as the directory.

Introduce a safety valve to fail the operation in such case, using
the "ls-files --killed" which was designed for this exact purpose.

The "stash save" is stopped when untracked files need to be
discarded because their leading path ceased to be a directory, and
the user is required to pass --force to really have the data
removed.

Signed-off-by: Petr Baudis &lt;pasky@ucw.cz&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>stash: introduce 'git stash store'</title>
<updated>2013-06-17T18:43:13Z</updated>
<author>
<name>Ramkumar Ramachandra</name>
<email>artagnon@gmail.com</email>
</author>
<published>2013-06-15T13:13:25Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=bd514cada4bb1a396a58d408c3ec08526a8be742'/>
<id>urn:sha1:bd514cada4bb1a396a58d408c3ec08526a8be742</id>
<content type='text'>
save_stash() contains the logic for doing two potentially independent
operations; the first is preparing the stash merge commit, and the
second is updating the stash ref/ reflog accordingly.  While the first
operation is abstracted out into a create_stash() for callers to access
via 'git stash create', the second one is not.  Fix this by factoring
out the logic for storing the stash into a store_stash() that callers
can access via 'git stash store'.

Like create, store is not intended for end user interactive use, but for
callers in other scripts.  We can simplify the logic in the
rebase.autostash feature using this new subcommand.

Signed-off-by: Ramkumar Ramachandra &lt;artagnon@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>stash: simplify option parser for create</title>
<updated>2013-06-17T16:22:12Z</updated>
<author>
<name>Ramkumar Ramachandra</name>
<email>artagnon@gmail.com</email>
</author>
<published>2013-06-15T13:13:24Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=0719f300870cb573dcb526c7ab0cdffc5ee54324'/>
<id>urn:sha1:0719f300870cb573dcb526c7ab0cdffc5ee54324</id>
<content type='text'>
The option parser for create unnecessarily checks "$1" inside a case
statement that matches "$1" in the first place.

Signed-off-by: Ramkumar Ramachandra &lt;artagnon@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'ph/stash-rerere'</title>
<updated>2012-09-03T22:54:12Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2012-09-03T22:54:12Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=799beac15391004778186503bf198783960a82a3'/>
<id>urn:sha1:799beac15391004778186503bf198783960a82a3</id>
<content type='text'>
"git stash" internally used "git merge-recursive" backend, which did
not trigger "rerere" upon conflicts unlike other mergy operations.

* ph/stash-rerere:
  stash: invoke rerere in case of conflict
  test: git-stash conflict sets up rerere
</content>
</entry>
<entry>
<title>stash: invoke rerere in case of conflict</title>
<updated>2012-08-17T17:59:17Z</updated>
<author>
<name>Phil Hord</name>
<email>hordp@cisco.com</email>
</author>
<published>2012-07-10T22:52:28Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=743bf6d8b07f0c5717bf5c37b8b50ae9de619c83'/>
<id>urn:sha1:743bf6d8b07f0c5717bf5c37b8b50ae9de619c83</id>
<content type='text'>
"stash apply" directly calls a backend merge function which does not
automatically invoke rerere.  This confuses mergetool when leftover
rerere state is left behind from previous merges.

Invoke rerere explicitly when we encounter a conflict during stash
apply.  This turns the test introduced by the previous commit to
succeed.

Signed-off-by: Phil Hord &lt;hordp@cisco.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>stash: use eval_gettextln correctly</title>
<updated>2012-04-14T23:31:02Z</updated>
<author>
<name>Ross Lagerwall</name>
<email>rosslagerwall@gmail.com</email>
</author>
<published>2012-04-14T12:37:29Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=ed3c400c6aba78fac5e5e502c89c4e8304d5ce5f'/>
<id>urn:sha1:ed3c400c6aba78fac5e5e502c89c4e8304d5ce5f</id>
<content type='text'>
Otherwise, passing an invalid option, git stash -v, gave:

git-stash: line 204: $'error: unknown option for \'stash save\':
$option\n       To provide a message, use git stash save -- \'$option\'':
command not found

Signed-off-by: Ross Lagerwall &lt;rosslagerwall@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
</feed>
