<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/git-stash.sh, branch v2.14.2</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.14.2</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.14.2'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2017-09-10T08:02:56Z</updated>
<entry>
<title>Merge branch 'mf/no-dashed-subcommands' into maint</title>
<updated>2017-09-10T08:02:56Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2017-09-10T08:02:56Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=036e1274a2e230462ce7b201de760bb12260a516'/>
<id>urn:sha1:036e1274a2e230462ce7b201de760bb12260a516</id>
<content type='text'>
Code clean-up.

* mf/no-dashed-subcommands:
  scripts: use "git foo" not "git-foo"
</content>
</entry>
<entry>
<title>stash: prevent warning about null bytes in input</title>
<updated>2017-08-14T22:35:48Z</updated>
<author>
<name>Kevin Daudt</name>
<email>me@ikke.info</email>
</author>
<published>2017-08-14T21:43:33Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=5fc92f8828b117d042344e4733e16195b264365b'/>
<id>urn:sha1:5fc92f8828b117d042344e4733e16195b264365b</id>
<content type='text'>
The `no_changes` function calls the `untracked_files` function through
command substitution. `untracked_files` will return null bytes because it
runs ls-files with the '-z' option.

Bash since version 4.4 warns about these null bytes. As they are not
required for the test that is being done, make sure `untracked_files`
does not output null bytes when not required.

This is achieved by adding a parameter to the `untracked_files` function to
specify wither `-z` should be passed to ls-files or not.

This warning is triggered when running git stash save -u resulting in
two warnings:

    git-stash: line 43: warning: command substitution: ignored null byte
    in input

Signed-off-by: Kevin Daudt &lt;me@ikke.info&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>scripts: use "git foo" not "git-foo"</title>
<updated>2017-08-07T19:04:45Z</updated>
<author>
<name>Michael Forney</name>
<email>mforney@mforney.org</email>
</author>
<published>2017-08-05T06:49:05Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=974ce8078c9a91190d798eaa65c9f173dd50c3f8'/>
<id>urn:sha1:974ce8078c9a91190d798eaa65c9f173dd50c3f8</id>
<content type='text'>
We want to make sure that people who copy &amp; paste code would see
fewer instances of "git-foo".  The use of these dashed forms have
been discouraged since v1.6.0 days.

Signed-off-by: Michael Forney &lt;mforney@mforney.org&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'lb/status-stash-count'</title>
<updated>2017-06-26T21:09:29Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2017-06-26T21:09:29Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=849b44cdf193908dfe1cadc731fb23019b53a211'/>
<id>urn:sha1:849b44cdf193908dfe1cadc731fb23019b53a211</id>
<content type='text'>
"git status" learned to optionally give how many stash entries the
user has in its output.

* lb/status-stash-count:
  glossary: define 'stash entry'
  status: add optional stash count information
  stash: update documentation to use 'stash entry'
</content>
</entry>
<entry>
<title>stash: update documentation to use 'stash entry'</title>
<updated>2017-06-19T05:16:36Z</updated>
<author>
<name>Liam Beguin</name>
<email>liambeguin@gmail.com</email>
</author>
<published>2017-06-17T22:30:50Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=e01db917d8e5c66f9f90bf8c44995cf47200273a'/>
<id>urn:sha1:e01db917d8e5c66f9f90bf8c44995cf47200273a</id>
<content type='text'>
Most of the time, a 'stash entry' is called a 'stash'. Lets try to make
this more consistent and use 'stash entry' instead.

Signed-off-by: Liam Beguin &lt;liambeguin@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>git-stash: fix pushing stash with pathspec from subdir</title>
<updated>2017-06-13T15:27:13Z</updated>
<author>
<name>Patrick Steinhardt</name>
<email>ps@pks.im</email>
</author>
<published>2017-06-13T11:38:34Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=22fc703ec949602e9fd4e2ab0bb63dd47c2945b5'/>
<id>urn:sha1:22fc703ec949602e9fd4e2ab0bb63dd47c2945b5</id>
<content type='text'>
The `git stash push` command recently gained the ability to get a
pathspec as its argument to only stash matching files. Calling this
command from a subdirectory does not work, though, as one of the first
things we do is changing to the top level directory without keeping
track of the prefix from which the command is being run.

Fix the shortcoming by storing the prefix previous to the call to
`cd_to_toplevel` and then subsequently using `git rev-parse --prefix` to
correctly resolve the pathspec. Add a test to catch future breakage of
this usecase.

Signed-off-by: Patrick Steinhardt &lt;ps@pks.im&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>stash: keep untracked files intact in stash -k</title>
<updated>2017-03-22T21:55:56Z</updated>
<author>
<name>Thomas Gummerer</name>
<email>t.gummerer@gmail.com</email>
</author>
<published>2017-03-21T22:12:19Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=e0e7f99ea400808cd11af72425c721c8b44193ca'/>
<id>urn:sha1:e0e7f99ea400808cd11af72425c721c8b44193ca</id>
<content type='text'>
Currently when there are untracked changes in a file "one" and in a file
"two" in the repository and the user uses:

    git stash push -k one

all changes in "two" are wiped out completely.  That is clearly not the
intended result.  Make sure that only the files given in the pathspec
are changed when git stash push -k &lt;pathspec&gt; is used.

Reported-by: Jeff King &lt;peff@peff.net&gt;
Signed-off-by: Thomas Gummerer &lt;t.gummerer@gmail.com&gt;
Reviewed-by: Jeff King &lt;peff@peff.net&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>stash: pass the pathspec argument to git reset</title>
<updated>2017-03-22T21:55:55Z</updated>
<author>
<name>Thomas Gummerer</name>
<email>t.gummerer@gmail.com</email>
</author>
<published>2017-03-21T22:12:18Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=869fb8f729a4e3486ea3c37820e97548223fac6a'/>
<id>urn:sha1:869fb8f729a4e3486ea3c37820e97548223fac6a</id>
<content type='text'>
For "git stash -p --no-keep-index", the pathspec argument is currently
not passed to "git reset".  This means that changes that are staged but
that are excluded from the pathspec still get unstaged by git stash -p.

Make sure that doesn't happen by passing the pathspec argument to the
git reset in question, bringing the behaviour in line with "git stash --
&lt;pathspec&gt;".

Signed-off-by: Thomas Gummerer &lt;t.gummerer@gmail.com&gt;
Reviewed-by: Jeff King &lt;peff@peff.net&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>stash: don't show internal implementation details</title>
<updated>2017-03-22T21:55:11Z</updated>
<author>
<name>Thomas Gummerer</name>
<email>t.gummerer@gmail.com</email>
</author>
<published>2017-03-21T22:12:17Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=1790f4fea04c2401feda0c96e35a3b50b1ba4fe3'/>
<id>urn:sha1:1790f4fea04c2401feda0c96e35a3b50b1ba4fe3</id>
<content type='text'>
git stash push uses other git commands internally.  Currently it only
passes the -q flag to those if the -q flag is passed to git stash.  when
using 'git stash push -p -q --no-keep-index', it doesn't even pass the
flag on to the internal reset at all.

It really is enough for the user to know that the stash is created,
without bothering them with the internal details of what's happening.
Always pass the -q flag to the internal git clean and git reset
commands, to avoid unnecessary and potentially confusing output.

Reported-by: Jeff King &lt;peff@peff.net&gt;
Signed-off-by: Thomas Gummerer &lt;t.gummerer@gmail.com&gt;
Reviewed-by: Jeff King &lt;peff@peff.net&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>stash: allow pathspecs in the no verb form</title>
<updated>2017-02-28T22:21:10Z</updated>
<author>
<name>Thomas Gummerer</name>
<email>t.gummerer@gmail.com</email>
</author>
<published>2017-02-28T20:33:40Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=9e140909f611fff720efc914b7186b8e4ab722cd'/>
<id>urn:sha1:9e140909f611fff720efc914b7186b8e4ab722cd</id>
<content type='text'>
Now that stash_push is used in the no verb form of stash, allow
specifying the command line for this form as well.  Always use -- to
disambiguate pathspecs from other non-option arguments.

Also make git stash -p an alias for git stash push -p.  This allows
users to use git stash -p &lt;pathspec&gt;.

Signed-off-by: Thomas Gummerer &lt;t.gummerer@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
</feed>
