Thread (22 messages) flat view 22 messages, 2 authors, 2017-03-22

Re: [PATCH/RFC 1/3] stash: show less information for stash push -- <pathspec>

From: Jeff King <hidden>
Date: 2017-03-20 18:43:00

On Sun, Mar 19, 2017 at 08:23:49PM +0000, Thomas Gummerer wrote:
When using git stash push -- <pathspec> in the following sequence:

       git init -q repo
       cd repo

       for i in one two; do
               echo content >$i
               git add $i
       done
       git commit -qm base

       for i in one two; do
               echo change >$i
       done
       git stash -- one

it shows:

   Saved working directory and index state WIP on master: 20cfadf base
   Unstaged changes after reset:
    M   one
    M   two

Even though "one" no longer has unstaged changes.

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 git clean and git reset in the pathspec case,
to avoid unnecessary and potentially confusing output.
Yeah, on further reflection, this is definitely the right thing to do.

-Peff
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help