git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jonathan Gilbert <logic@deltaq.org>
To: "brian m. carlson sandals-at-crustytoothpaste.net |GitHub
	Public/Example Allow|" <92ue75mvem3o2ht@sneakemail.com>
Cc: Jonathan Gilbert via GitGitGadget <gitgitgadget@gmail.com>,
	git@vger.kernel.org, Jonathan Gilbert <rcq8n2xf3v@liamekaens.com>,
	Junio C Hamano <gitster@pobox.com>
Subject: Re: [PATCH 0/1] Allow the 'revert' option in Git Gui to operate on untracked files, deleting them
Date: Mon, 28 Oct 2019 20:45:08 -0500	[thread overview]
Message-ID: <CAPSOpYu4pHymWpSrph41JsbR00dvpFUVrSPAx3S+RqRUi8t+ig@mail.gmail.com> (raw)
In-Reply-To: <20191029001253.2lxsntgcivs2jhax@camp.crustytoothpaste.net>

> Is there a reason these new files can't be ignored, with one of the.gitignore file, .git/info/exclude, or core.excludesFile?

I guess it's implied in the way I worded the message, but I have
fallen into the habit of using Git-Gui to manage the state of the
working copy (at least in detail). I am primarily doing .NET
development, for which projects can have a file App.config that stores
various settings that apply to the project at runtime. The NuGet
package manager sometimes edits App.config on your behalf as part of
installing a package, and if a project doesn't already have an
App.config file, it adds one. It has also updated a packages.config
file and the main project file. If I decide that I actually don't want
the change after all, Git-Gui permits me to revert the packages.config
change and revert the project file change. If an existing App.config
file was edited, I can revert that too, but if it was newly-generated,
then I want to delete that file, but I don't want to ignore App.config
files going forward, because there's a good chance a future change may
introduce a different need for an App.config file.

With the current Git-Gui version, I need to exit the Git-Gui UI/flow,
navigate to the project in a console window (which probably isn't
already in the correct folder) and manually delete the unwanted file.
This deletion requires me to identify the file explicitly as well.
With the proposed change, the untracked file, which Git-Gui already
lists, can be selected, and then activating the "revert" function
performs a UI flow for deleting the file. Without these changes,
Git-Gui simply does nothing at all when you tell it to revert an
untracked file.

Another example is when I go to review changes and discover a VIM
crash dump or a spurious temporary file from a code analyzer, files
that aren't _expected_ to normally come into existence at all. While
we could try to anticipate every type of spurious file and .gitignore
them all, I prefer to simply delete the files, and for similar reasons
as before, navigating a separate tool to the correct folder to perform
the deletion is a manual, time-consuming and context-switching
process. This is what led me to want this feature directly from the
Git-Gui tool, which is what identifies the rogue file to me in the
first place.

If you can think of a concise way to say that, I'll be happy to add it
to the commit message. My intuition is that that's too wordy
as-written, but if that intuition is wrong, I can copy/paste this text
too. :-)

Thanks,

Jonathan Gilbert


On Mon, Oct 28, 2019 at 7:12 PM brian m. carlson
sandals-at-crustytoothpaste.net |GitHub Public/Example Allow|
<92ue75mvem3o2ht@sneakemail.com> wrote:
>
> On 2019-10-28 at 18:58:06, Jonathan Gilbert via GitGitGadget wrote:
> > My development environment sometimes makes automatic changes that I don't
> > want to keep. In some cases, this involves new files being added that I
> > don't want to commit or keep. I have typically had to explicitly delete
> > those files externally to Git Gui, and I want to be able to just select
> > those newly-created untracked files and "revert" them into oblivion.
>
> Is there a reason these new files can't be ignored, with one of the
> .gitignore file, .git/info/exclude, or core.excludesFile?
>
> If so, it would be helpful to explain that in the commit message so we
> can more fully understand the rationale here.
> --
> brian m. carlson: Houston, Texas, US
> OpenPGP: https://keybase.io/bk2204

  reply	other threads:[~2019-10-29  1:45 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-28 18:58 Jonathan Gilbert via GitGitGadget
2019-10-28 18:58 ` [PATCH 1/1] git-gui: Revert untracked files by " Jonathan Gilbert via GitGitGadget
2019-10-29 21:27   ` Pratyush Yadav
2019-10-29 23:52     ` Jonathan Gilbert
2019-10-29  0:12 ` [PATCH 0/1] Allow the 'revert' option in Git Gui to operate on untracked files, " brian m. carlson
2019-10-29  1:45   ` Jonathan Gilbert [this message]
2019-10-29 14:29 ` Bert Wesarg
2019-10-29 20:25   ` Jonathan Gilbert
2019-10-29 20:33     ` Jonathan Gilbert
2019-10-29 21:43     ` 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=CAPSOpYu4pHymWpSrph41JsbR00dvpFUVrSPAx3S+RqRUi8t+ig@mail.gmail.com \
    --to=logic@deltaq.org \
    --cc=92ue75mvem3o2ht@sneakemail.com \
    --cc=git@vger.kernel.org \
    --cc=gitgitgadget@gmail.com \
    --cc=gitster@pobox.com \
    --cc=rcq8n2xf3v@liamekaens.com \
    --subject='Re: [PATCH 0/1] Allow the '\''revert'\'' option in Git Gui to operate on untracked files, deleting them' \
    /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

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