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

Jeff King <peff@peff.net> writes:

> 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.

This I think depends on how you view what stash does. If you concentrate
on the "saving" aspect too much, your naming would start from "untracked"
and end up to be that ugly thing. If you start from "what happens to the
working tree", on the other hand, --clean may not be such a bad name for
what it does.

But I think the previous point you raised about untracked-but-not-ignored
vs untracked-and-ignored is much more important. I do not think anybody
would want to put build products in stash and unstash them later, so in
that sense we can say we would only save the untracked-but-not-ignored in
the stash and remove them, but then "git stash --clean" (or whatever we
end up calling it) would still leave non-source material in the working
tree, which probably does not exactly the original motivation of wanting
to get a pristine source tree without having to trust the build procedure
(i.e. "make clean" may leave cruft behind).

  parent reply	other threads:[~2011-06-21 17:16 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
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 [this message]
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=7vboxr9kb8.fsf@alter.siamese.dyndns.org \
    --to=gitster@pobox.com \
    --cc=andrew.w@sohovfx.com \
    --cc=david@porkrind.org \
    --cc=git@vger.kernel.org \
    --cc=j.sixt@viscovery.net \
    --cc=peff@peff.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.