git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Jeff King <peff@peff.net>
To: Okash Khawaja <okash.khawaja@gmail.com>
Cc: stefan.naewe@atlas-elektronik.com, git@vger.kernel.org
Subject: Re: Viewing untracked+stashed files in git stash show
Date: Fri, 17 Mar 2017 09:51:44 -0400	[thread overview]
Message-ID: <20170317135144.scnbtyug2cqbg77p@sigill.intra.peff.net> (raw)
In-Reply-To: <CAOtcWM1jExsj_L4HRm194F57bt9LPuf8fFSpyuGWiPG7U_4v8A@mail.gmail.com>

On Fri, Mar 17, 2017 at 09:50:29AM +0000, Okash Khawaja wrote:

> Hi,
> 
> On Fri, Mar 17, 2017 at 8:20 AM,  <stefan.naewe@atlas-elektronik.com> wrote:
> > Am 16.03.2017 um 17:34 schrieb Okash Khawaja:
> >> Hi,
> >>
> >> If you have some untracked files and your run `git stash -u`. Then
> >> `git stash show` doesn't show the untracked files. Is there a flag
> >> that can be passed to git stash show to report untracked files?
> >
> > Not for 'git stash' but you can use 'git show stash@{0}^3
> 
> Okay that's fine as long as you know. But the first thing that comes
> to your mind is that you've lost those untracked files. Is there a
> reason why git stash show doesn't show those files?

No, I don't think there is a good reason. The "untracked" option was
added to git-stash much later, and nobody considered how it interacted
with "stash show".

Changes from the index have the same problem. Probably "stash show"
should have options "--index" and "--untracked" to show:

  # index
  git diff $stash^1 $stash^2

  # untracked
  git diff $stash^1 $stash^3

Possibly it should even show those by default when they are non-empty.

-Peff

  parent reply	other threads:[~2017-03-17 13:51 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-16 16:34 Viewing untracked+stashed files in git stash show Okash Khawaja
2017-03-17  8:20 ` stefan.naewe
2017-03-17  9:50   ` Okash Khawaja
2017-03-17 12:08     ` Okash Khawaja
2017-03-17 13:51     ` Jeff King [this message]
2017-03-17 14:14       ` Jeff King

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

  List information: http://vger.kernel.org/majordomo-info.html

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

  git send-email \
    --in-reply-to=20170317135144.scnbtyug2cqbg77p@sigill.intra.peff.net \
    --to=peff@peff.net \
    --cc=git@vger.kernel.org \
    --cc=okash.khawaja@gmail.com \
    --cc=stefan.naewe@atlas-elektronik.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.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).