git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH 0/1] Allow the 'revert' option in Git Gui to operate on untracked files, deleting them

From
Bert Wesarg <bert.wesarg@googlemail.com>
Date
Oct 29, 2019, 14:29 UTC
Message-ID
<CAKPyHN3WEpVLnxYN5FsovW3G_borc+YrF05Npr0Wyvv6YhbcaQ@mail.gmail.com>
In-Reply-To
<pull.423.git.1572289087.gitgitgadget@gmail.com>

On Mon, Oct 28, 2019 at 7:58 PM Jonathan Gilbert via GitGitGadget <gitgitgadget@gmail.com> wrote:

Show 7 quoted lines
>
> 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.
>
I have an entry in the 'Tools" menu for this called 'Delete':
[guitool "Delete"]
    cmd = rm -f \"$FILENAME\"
    noconsole = yes
    needsfile = yes
    confirm = yes

Best, Bert

Show 18 quoted lines
> This change updates the revert_helper function to check for untracked files
> as well as changes, and then any changes to be reverted and untracked files
> are handled by independent blocks of code. The user is prompted
> independently for untracked files, since the underlying action is
> fundamentally different (rm -f). If after deleting untracked files, the
> directory containing them becomes empty, then the directory is removed as
> well.
>
> This introduces new strings in index.tcl. I have been told that there is a
> separate process whereby the translations get updated.
>
> Jonathan Gilbert (1):
>   git-gui: Revert untracked files by deleting them
>
>  git-gui/lib/index.tcl | 139 +++++++++++++++++++++++++++++++-----------
>  1 file changed, 104 insertions(+), 35 deletions(-)
>
>
Previous: Jonathan GilbertNext: Jonathan Gilbert
Message 7 of 10 in “Allow the 'revert' option in Git Gui to operate on untracked files, deleting them”
  1. 0/1 Allow the 'revert' option in Git Gui to operate on untracked files, deleting themJonathan Gilbert via GitGitGadget, Oct 28, 2019
  2. 1/1 git-gui: Revert untracked files by deleting themJonathan Gilbert via GitGitGadget, Oct 28, 2019
  3. Pratyush YadavOct 29, 2019
  4. Jonathan GilbertOct 29, 2019
  5. brian m. carlsonOct 29, 2019
  6. Jonathan GilbertOct 29, 2019
  7. Bert WesargOct 29, 2019
  8. Jonathan GilbertOct 29, 2019
  9. Jonathan GilbertOct 29, 2019
  10. Pratyush YadavOct 29, 2019

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.