All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jeff King <peff@peff.net>
To: Tanay Abhra <tanayabh@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: [bug] [UX] `stash save --untracked` produces a stash that *looks* empty
Date: Wed, 8 Oct 2014 22:51:12 -0400	[thread overview]
Message-ID: <20141009025112.GA19897@peff.net> (raw)
In-Reply-To: <543501CE.5040705@gmail.com>

On Wed, Oct 08, 2014 at 02:50:14PM +0530, Tanay Abhra wrote:

> I think problem lies with  show_stash() which just shows the
> diff between working tree and the base tree, it ignores the
> untracked files. A quick and dirty fix can be to just show
> the diff between the untracked files and a NULL commit.
> Here's the patch, it works all right but can be implemented
> much better. I will try to find a better approach tomorrow.

You may want to read through another recent attempt at the same thing
here:

  http://thread.gmane.org/gmane.comp.version-control.git/254420

It ended with us just making "git stash list" behave like "git stash
show" (and show only the working tree); that ended up as 288c67c (stash:
default listing to working-tree diff, 2014-08-06).

Which isn't to say there isn't room for more improvement. But you may
find the backstory and pitfalls helpful (and I think Junio explicitly
said he prefers the current behavior in that thread).

-Peff

      reply	other threads:[~2014-10-09  2:52 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-05 17:28 [bug] [UX] `stash save --untracked` produces a stash that *looks* empty Alberto Scotto
2014-10-08  9:20 ` Tanay Abhra
2014-10-09  2:51   ` Jeff King [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20141009025112.GA19897@peff.net \
    --to=peff@peff.net \
    --cc=git@vger.kernel.org \
    --cc=tanayabh@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.