From: Pratyush Yadav <me@yadavpratyush.com>
To: Jonathan Gilbert via GitGitGadget <gitgitgadget@gmail.com>
Cc: "Bert Wesarg bert.wesarg-at-googlemail.com |GitHub
Public/Example Allow|" <xlwsizdz58ciy7t@sneakemail.com>,
Git Mailing List <git@vger.kernel.org>,
Jonathan Gilbert <rcq8n2xf3v@liamekaens.com>
Subject: Re: [PATCH 0/2] git-gui: revert untracked files by deleting them
Date: Sun, 3 Nov 2019 13:24:58 +0530 [thread overview]
Message-ID: <20191103074801.7fsqqi3hsefvcmby@yadavpratyush.com> (raw)
In-Reply-To: <CAPSOpYsBRf4tCXP-wod2h+g_=NZ-Qr0KOSZw3M=96d5FUFpFzw@mail.gmail.com>
[Dropping "Jonathan Gilbert <logic@deltaq.org>" from the To: list because
my mail server says "Domain not found". Putting the GGG address in To:
instead.]
On 02/11/19 11:41PM, Jonathan Gilbert wrote:
> On Sat, Nov 2, 2019, 8:12 PM Pratyush Yadav, <me@yadavpratyush.com> wrote:
> > On 30/10/19 12:16PM, Jonathan Gilbert wrote:
> > > It's less about overloading the 'revert' operation as overloading the
> > > UI action which is currently called "Revert". I think it would be a
> > > worse experience to have to activate a different option to remove
> > > unwanted files as to remove unwanted changes. Maybe the UI option
> > > could be renamed "Revert & Clean" or something?
> >
> > I disagree. There are valid workflows where you want to remove all
> > changes to tracked files, but leave untracked ones alone. As an example,
> > say you wrote a small script to fix some textual things, like your
> > variable re-name patch. Now you run a diff before you commit those
> > changes just to be sure, and notice that your script was overzealous and
> > made some changes it shouldn't have. So, you clean up all tracked files,
> > and give your script a fresh start. Here, you don't want to delete your
> > script.
> >
> > And in the other direction, say you want to delete all untracked files
> > but have unstaged changes in your tracked files. Combining "Revert" and
> > "Clean" does not give you an option to only delete untracked files. So
> > you now either have to stash your changes, or run `git clean` from the
> > command line.
>
> But, since this is in this GUI interface, you can clearly see which
> are which and select only the files you want to affect. If you have so
> many files that you have to select indiscriminately, then the
> command-line is probably a better choice anyway. In any case, my
> proposed change prompts for each part of the change, so you _can_ just
> select everything, press ^J, and then say "Yes" to only one of the
> prompts.
Ah yes! Makes sense. I got too tunnel-visioned when thinking about this,
and lost context. Sorry.
> > > As a side note, `git clean untracked-file` won't do anything with a
> > > default configuration, you have to explicitly `-f` it. Not sure if
> > > that's relevant, but it does feel like a higher barrier to entry than
> > > `git revert`.
> >
> > `git revert` is different from our "Revert", though I admit the naming
> > is quite confusing.
> [..]
> > So I don't think you should, or _can_, use `git revert` for what you
> > want to do. And so, I don't see why it is being factored in with this
> > discussion. Am I missing something?
>
> You are entirely correct, this was just a massive brain fart. Every
> time I wrote `git revert` in my head I was actually thinking of
> exactly what Git Gui does, reverting working copy changes by checking
> out the file. I should have written "reverting using `git checkout`".
> My apologies!
>
> In my defence, I have over the past few days found myself digging into
> code hosted in SVN repositories, and `svn revert` does exactly what
> `git checkout` does to an unstaged modified file. :-)
I have never used svn, but I can imagine now confusing that might be ;)
--
Regards,
Pratyush Yadav
next prev parent reply other threads:[~2019-11-03 7:55 UTC|newest]
Thread overview: 57+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-30 6:48 [PATCH 0/2] git-gui: revert untracked files by deleting them Jonathan Gilbert via GitGitGadget
2019-10-30 6:48 ` [PATCH 1/2] git-gui: consolidate naming conventions Jonathan Gilbert via GitGitGadget
2019-11-03 0:27 ` Pratyush Yadav
2019-10-30 6:48 ` [PATCH 2/2] git-gui: revert untracked files by deleting them Jonathan Gilbert via GitGitGadget
2019-11-03 7:44 ` Pratyush Yadav
2019-11-04 16:04 ` Jonathan Gilbert
2019-11-04 17:36 ` Jonathan Gilbert
2019-10-30 9:06 ` [PATCH 0/2] " Bert Wesarg
2019-10-30 17:16 ` Jonathan Gilbert
2019-11-03 1:12 ` Pratyush Yadav
2019-11-03 4:41 ` Jonathan Gilbert
2019-11-03 7:54 ` Pratyush Yadav [this message]
2019-11-07 7:05 ` [PATCH v2 " Jonathan Gilbert via GitGitGadget
2019-11-07 7:05 ` [PATCH v2 1/2] git-gui: consolidate naming conventions Jonathan Gilbert via GitGitGadget
2019-11-07 7:05 ` [PATCH v2 2/2] git-gui: revert untracked files by deleting them Jonathan Gilbert via GitGitGadget
2019-11-11 19:25 ` Pratyush Yadav
2019-11-11 21:55 ` Jonathan Gilbert
2019-11-11 22:59 ` Philip Oakley
2019-11-12 4:49 ` Jonathan Gilbert
2019-11-12 10:45 ` Philip Oakley
2019-11-12 16:29 ` Jonathan Gilbert
2019-11-26 11:22 ` Philip Oakley
2019-11-12 19:35 ` Pratyush Yadav
2019-11-11 19:35 ` [PATCH v2 0/2] " Pratyush Yadav
2019-11-13 9:56 ` [PATCH v3 " Jonathan Gilbert via GitGitGadget
2019-11-13 9:56 ` [PATCH v3 1/2] git-gui: consolidate naming conventions Jonathan Gilbert via GitGitGadget
2019-11-13 9:56 ` [PATCH v3 2/2] git-gui: revert untracked files by deleting them Jonathan Gilbert via GitGitGadget
2019-11-16 15:11 ` Pratyush Yadav
2019-11-16 21:42 ` Jonathan Gilbert
2019-11-17 6:56 ` [PATCH v4 0/2] " Jonathan Gilbert via GitGitGadget
2019-11-17 6:56 ` [PATCH v4 1/2] git-gui: consolidate naming conventions Jonathan Gilbert via GitGitGadget
2019-11-17 6:56 ` [PATCH v4 2/2] git-gui: revert untracked files by deleting them Jonathan Gilbert via GitGitGadget
2019-11-24 13:09 ` Pratyush Yadav
2019-11-19 15:21 ` [PATCH v4 0/2] " Pratyush Yadav
2019-11-19 16:56 ` Jonathan Gilbert
2019-11-24 20:37 ` [PATCH v5 0/3] " Jonathan Gilbert via GitGitGadget
2019-11-24 20:37 ` [PATCH v5 1/3] git-gui: consolidate naming conventions Jonathan Gilbert via GitGitGadget
2019-11-24 20:37 ` [PATCH v5 2/3] git-gui: update status bar to track operations Jonathan Gilbert via GitGitGadget
2019-11-27 21:55 ` Pratyush Yadav
2019-11-28 7:34 ` Jonathan Gilbert
2019-11-24 20:37 ` [PATCH v5 3/3] git-gui: revert untracked files by deleting them Jonathan Gilbert via GitGitGadget
2019-11-27 22:03 ` Pratyush Yadav
2019-11-28 8:30 ` [PATCH v6 0/3] " Jonathan Gilbert via GitGitGadget
2019-11-28 8:30 ` [PATCH v6 1/3] git-gui: consolidate naming conventions Jonathan Gilbert via GitGitGadget
2019-11-28 8:30 ` [PATCH v6 2/3] git-gui: update status bar to track operations Jonathan Gilbert via GitGitGadget
2019-11-30 23:05 ` Pratyush Yadav
2019-12-01 2:12 ` Jonathan Gilbert
2019-12-01 11:43 ` Philip Oakley
2019-12-01 20:09 ` Jonathan Gilbert
2019-11-28 8:30 ` [PATCH v6 3/3] git-gui: revert untracked files by deleting them Jonathan Gilbert via GitGitGadget
2019-12-01 2:28 ` [PATCH v7 0/3] " Jonathan Gilbert via GitGitGadget
2019-12-01 2:28 ` [PATCH v7 1/3] git-gui: consolidate naming conventions Jonathan Gilbert via GitGitGadget
2019-12-01 2:28 ` [PATCH v7 2/3] git-gui: update status bar to track operations Jonathan Gilbert via GitGitGadget
2020-02-26 8:24 ` Benjamin Poirier
2020-03-02 18:14 ` Pratyush Yadav
2019-12-01 2:28 ` [PATCH v7 3/3] git-gui: revert untracked files by deleting them Jonathan Gilbert via GitGitGadget
2019-12-05 18:54 ` [PATCH v7 0/3] " Pratyush Yadav
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=20191103074801.7fsqqi3hsefvcmby@yadavpratyush.com \
--to=me@yadavpratyush.com \
--cc=git@vger.kernel.org \
--cc=gitgitgadget@gmail.com \
--cc=rcq8n2xf3v@liamekaens.com \
--cc=xlwsizdz58ciy7t@sneakemail.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 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 NNTP newsgroup(s).