All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jeff King <peff@peff.net>
To: Johannes Sixt <j.sixt@viscovery.net>
Cc: Andrew Wong <andrew.w@sohovfx.com>,
	David Caldwell <david@porkrind.org>,
	git@vger.kernel.org, Junio C Hamano <gitster@pobox.com>
Subject: Re: [PATCH] stash: Add --clean option to stash and remove all untracked files
Date: Tue, 21 Jun 2011 10:18:43 -0400	[thread overview]
Message-ID: <20110621141843.GA18700@sigill.intra.peff.net> (raw)
In-Reply-To: <4E003A0F.5080601@viscovery.net>

On Tue, Jun 21, 2011 at 08:28:31AM +0200, Johannes Sixt wrote:

> > I personally think "--untracked" (and -u) is more intuitive too, since it
> > tells you what "git stash" is about to do. i.e. "git stash" is about to do
> > the usual stash operation *and* also stash the "untracked" files.
> 
> Really?
> 
>    $ git stash --untracked
> 
> sound like it stashes *only* untracked files. (That by itself may be a
> feature that some people want; so far, I'm not among them.)

I would be happy with something that indicated "untracked files in
addition to the regular stash". I just think it should be about "add
these other files into the stash", not "end up in this directory state".

Something like "--untracked-too" fits that, but is horribly ugly. I also
think it makes sense to have some way of stashing everything, including
excluded files.  That could just be "-x" in conjunction with whatever
this option is (which matches "git clean"), or it could be a separate
option name (like "--all" or "--ignored").

Things like "git stash --all" or "git stash --thorough" indicate that
you are stashing more, but it's hard to remember what the "more" is.

So I don't have any brilliant suggestions. Doing:

  $ git stash --untracked-too --ignored-too

is fairly clear, but somehow strikes me as unnecessarily ugly and
verbose.

-Peff

  reply	other threads:[~2011-06-21 14:18 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-20 23:36 [PATCH] stash: Add --clean option to stash and remove all untracked files David Caldwell
2011-06-21  0:38 ` Jeff King
2011-06-21  1:36   ` David Caldwell
2011-06-21  5:08     ` Andrew Wong
2011-06-21  6:28       ` Johannes Sixt
2011-06-21 14:18         ` Jeff King [this message]
2011-06-21 16:11           ` Paul Ebermann
2011-06-21 21:23             ` Marc Branchaud
2011-06-22  7:47             ` Miles Bader
2011-06-22 15:00               ` Jeff King
2011-06-21 17:16           ` Junio C Hamano
2011-06-24 20:02 ` [PATCH] stash: Add --include-untracked " David Caldwell
2011-06-24 20:31   ` Matthieu Moy
2011-06-25  0:56     ` David Caldwell
2011-06-26 20:02       ` Junio C Hamano
2011-06-22  5:49 [PATCH] stash: Add --clean " David Caldwell

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=20110621141843.GA18700@sigill.intra.peff.net \
    --to=peff@peff.net \
    --cc=andrew.w@sohovfx.com \
    --cc=david@porkrind.org \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=j.sixt@viscovery.net \
    /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.