<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/git-stash.sh, branch v2.4.4</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.4.4</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.4.4'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2015-06-16T21:33:43Z</updated>
<entry>
<title>Merge branch 'jk/stash-options' into maint</title>
<updated>2015-06-16T21:33:43Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2015-06-16T21:33:43Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=659d4c8fb21902660acd52f9e77170e82774b9ff'/>
<id>urn:sha1:659d4c8fb21902660acd52f9e77170e82774b9ff</id>
<content type='text'>
Make "git stash something --help" error out, so that users can
safely say "git stash drop --help".

* jk/stash-options:
  stash: recognize "--help" for subcommands
  stash: complain about unknown flags
</content>
</entry>
<entry>
<title>stash: recognize "--help" for subcommands</title>
<updated>2015-05-20T20:47:41Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2015-05-20T18:17:46Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=5ba28313f29bcc2e8571c4b325646fecfbe238df'/>
<id>urn:sha1:5ba28313f29bcc2e8571c4b325646fecfbe238df</id>
<content type='text'>
If you run "git stash --help", you get the help for stash
(this magic is done by the git wrapper itself). But if you
run "git stash drop --help", you get an error. We
cannot show help specific to "stash drop", of course, but we
can at least give the user the normal stash manpage.

Signed-off-by: Jeff King &lt;peff@peff.net&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>stash: complain about unknown flags</title>
<updated>2015-05-20T20:47:30Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2015-05-20T18:01:32Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=d6cc2df5c80dc4f52a56679baa5e32539eb028b1'/>
<id>urn:sha1:d6cc2df5c80dc4f52a56679baa5e32539eb028b1</id>
<content type='text'>
The option parser for git-stash stuffs unknown flags into
the $FLAGS variable, where they can be accessed by the
individual commands. However, most commands do not even look
at these extra flags, leading to unexpected results like
this:

  $ git stash drop --help
  Dropped refs/stash@{0} (e6cf6d80faf92bb7828f7b60c47fc61c03bd30a1)

We should notice the extra flags and bail. Rather than
annotate each command to reject a non-empty $FLAGS variable,
we can notice that "stash show" is the only command that
actually _wants_ arbitrary flags. So we switch the default
mode to reject unknown flags, and let stash_show() opt into
the feature.

Reported-by: Vincent Legoll &lt;vincent.legoll@gmail.com&gt;
Signed-off-by: Jeff King &lt;peff@peff.net&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>stash: require a clean index to apply</title>
<updated>2015-04-22T20:38:58Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2015-04-22T19:31:02Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=ed178ef13a26136d86ff4e33bb7b1afb5033f908'/>
<id>urn:sha1:ed178ef13a26136d86ff4e33bb7b1afb5033f908</id>
<content type='text'>
If you have staged contents in your index and run "stash
apply", we may hit a conflict and put new entries into the
index. Recovering to your original state is difficult at
that point, because tools like "git reset --keep" will blow
away anything staged.  We can make this safer by refusing to
apply when there are staged changes.

It's possible we could provide better tooling here, as "git
stash apply" should be writing only conflicts to the index
(so we know that any stage-0 entries are potentially
precious). But it is the odd duck; most "mergy" commands
will update the index for cleanly merged entries, and it is
not worth updating our tooling to support this use case
which is unlikely to be of interest (besides which, we would
still need to block a dirty index for "stash apply --index",
since that case _would_ be ambiguous).

Signed-off-by: Jeff King &lt;peff@peff.net&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'da/rev-parse-verify-quiet'</title>
<updated>2014-09-29T19:36:10Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2014-09-29T19:36:10Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=507fe835ed0753ff266fdb998853cc5dea3758c6'/>
<id>urn:sha1:507fe835ed0753ff266fdb998853cc5dea3758c6</id>
<content type='text'>
"rev-parse --verify --quiet $name" is meant to quietly exit with a
non-zero status when $name is not a valid object name, but still
gave error messages in some cases.

* da/rev-parse-verify-quiet:
  stash: prefer --quiet over shell redirection of the standard error stream
  refs: make rev-parse --quiet actually quiet
  t1503: use test_must_be_empty
  Documentation: a note about stdout for git rev-parse --verify --quiet
</content>
</entry>
<entry>
<title>Merge branch 'ah/grammofix'</title>
<updated>2014-09-19T18:38:35Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2014-09-19T18:38:35Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=296b4c4bbf63c8addb1654a05950843e9984d0eb'/>
<id>urn:sha1:296b4c4bbf63c8addb1654a05950843e9984d0eb</id>
<content type='text'>
* ah/grammofix:
  grammofix in user-facing messages
</content>
</entry>
<entry>
<title>stash: prefer --quiet over shell redirection of the standard error stream</title>
<updated>2014-09-19T17:51:59Z</updated>
<author>
<name>David Aguilar</name>
<email>davvid@gmail.com</email>
</author>
<published>2014-09-16T03:24:10Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=1956dfa818e376c5d62adc16d77f5b5cacf923f8'/>
<id>urn:sha1:1956dfa818e376c5d62adc16d77f5b5cacf923f8</id>
<content type='text'>
Use `git rev-parse --verify --quiet` instead of redirecting
stderr to /dev/null.

Signed-off-by: David Aguilar &lt;davvid@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'jk/stash-list-p'</title>
<updated>2014-09-09T19:54:00Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2014-09-09T19:54:00Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=753aaf3aabe698bbc965fdbb66aceb2e5eda2454'/>
<id>urn:sha1:753aaf3aabe698bbc965fdbb66aceb2e5eda2454</id>
<content type='text'>
Teach "git stash list -p" to show the difference between the base
commit version and the working tree version, which is in line with
what "git show" gives.

* jk/stash-list-p:
  stash: default listing to working-tree diff
</content>
</entry>
<entry>
<title>grammofix in user-facing messages</title>
<updated>2014-09-02T19:00:30Z</updated>
<author>
<name>Alex Henrie</name>
<email>alexhenrie24@gmail.com</email>
</author>
<published>2014-08-30T19:56:01Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=ad5fe3771b50f3862130d150b5cc8bb316ef6f1c'/>
<id>urn:sha1:ad5fe3771b50f3862130d150b5cc8bb316ef6f1c</id>
<content type='text'>
Signed-off-by: Alex Henrie &lt;alexhenrie24@gmail.com&gt;
Acked-by: Johan Herland &lt;johan@herland.net&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>stash: default listing to working-tree diff</title>
<updated>2014-08-07T21:37:28Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2014-08-06T18:35:25Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=288c67caf64af111aeb7c45cb8b6ba586a61c724'/>
<id>urn:sha1:288c67caf64af111aeb7c45cb8b6ba586a61c724</id>
<content type='text'>
When you list stashes, you can provide arbitrary git-log
options to change the display. However, adding just "-p"
does nothing, because each stash is actually a merge commit.

This implementation detail is easy to forget, leading to
confused users who think "-p" is not working. We can make
this easier by defaulting to "--first-parent -m", which will
show the diff against the working tree. This omits the
index portion of the stash entirely, but it's simple and it
matches what "git stash show" provides.

People who are more clueful about stash's true form can use
"--cc" to override the "-m", and the "--first-parent" will
then do nothing. For diffs, it only affects non-combined
diffs, so "--cc" overrides it. And for the traversal, we are
walking the linear reflog anyway, so we do not even care
about the parents.

Signed-off-by: Jeff King &lt;peff@peff.net&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
</feed>
