<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/git-stash.sh, branch v2.1.2</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.1.2</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.1.2'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2014-06-06T18:38:51Z</updated>
<entry>
<title>Merge branch 'ep/shell-assign-and-export-vars'</title>
<updated>2014-06-06T18:38:51Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2014-06-06T18:38:51Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=3ea8ecc21ec87eb5173a7145db2d3653e5b5fa28'/>
<id>urn:sha1:3ea8ecc21ec87eb5173a7145db2d3653e5b5fa28</id>
<content type='text'>
* ep/shell-assign-and-export-vars:
  scripts: more "export VAR=VALUE" fixes
  scripts: "export VAR=VALUE" construct is not portable
</content>
</entry>
<entry>
<title>scripts: "export VAR=VALUE" construct is not portable</title>
<updated>2014-05-23T22:32:33Z</updated>
<author>
<name>Elia Pinto</name>
<email>gitter.spiros@gmail.com</email>
</author>
<published>2014-05-23T10:15:31Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=bed137d2d55a3b5cbd642b1e80cd7bd9094db8d4'/>
<id>urn:sha1:bed137d2d55a3b5cbd642b1e80cd7bd9094db8d4</id>
<content type='text'>
Found by check-non-portable-shell.pl

Signed-off-by: Elia Pinto &lt;gitter.spiros@gmail.com&gt;
Reviewed-by: Jonathan Nieder &lt;jrnieder@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>git-stash.sh: use the $( ... ) construct for command substitution</title>
<updated>2014-04-23T22:17:02Z</updated>
<author>
<name>Elia Pinto</name>
<email>gitter.spiros@gmail.com</email>
</author>
<published>2014-04-23T13:44:01Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=d0ea45bfc7129304016b24bdb18523b927d0ab17'/>
<id>urn:sha1:d0ea45bfc7129304016b24bdb18523b927d0ab17</id>
<content type='text'>
The Git CodingGuidelines prefer the $(...) construct for command
substitution instead of using the backquotes `...`.

The backquoted form is the traditional method for command
substitution, and is supported by POSIX.  However, all but the
simplest uses become complicated quickly.  In particular, embedded
command substitutions and/or the use of double quotes require
careful escaping with the backslash character.

The patch was generated by:

for _f in $(find . -name "*.sh")
do
   sed -i 's@`\(.*\)`@$(\1)@g' ${_f}
done

and then carefully proof-read.

Signed-off-by: Elia Pinto &lt;gitter.spiros@gmail.com&gt;
Reviewed-by: Matthieu Moy &lt;Matthieu.Moy@imag.fr&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<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>
</feed>
