Re: [PATCH v5 3/3] git-gui: revert untracked files by deleting them
- From
Pratyush Yadav <me@yadavpratyush.com>
- Date
- Nov 27, 2019, 22:03 UTC
- Message-ID
- <20191127220322.hcmn3kcb2vj7jf7p@yadavpratyush.com>
- In-Reply-To
- <d0d6593b421609445e8f2c794e1d3ca46ebed068.1574627876.git.gitgitgadget@gmail.com>
Hi Jonathan,
On 24/11/19 08:37PM, Jonathan Gilbert via GitGitGadget wrote:
Show 31 quoted lines
> From: Jonathan Gilbert <JonathanG@iQmetrix.com> > > Update the revert_helper proc to check for untracked files as well as > changes, and then handle changes to be reverted and untracked files with > independent blocks of code. Prompt the user 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 remove the directory as well. Migrate unlocking of the index > out of _close_updateindex to a responsibility of the caller, to permit > paths that don't directly unlock the index, and refactor the error > handling added in d4e890e5 so that callers can make flow control > decisions in the event of errors. Update Tcl/Tk dependency from 8.4 to > 8.6 in git-gui.sh. > > A new proc delete_files takes care of actually deleting the files in > batches, using the Tcler's Wiki recommended approach for keeping the UI > responsive. > > Since the checkout_index and delete_files calls are both asynchronous > and could potentially complete in any order, a "chord" is used to > coordinate unlocking the index and returning the UI to a usable state > only after both operations are complete. The `SimpleChord` class, > based on TclOO (Tcl/Tk 8.6), is added in this commit. > > Signed-off-by: Jonathan Gilbert <JonathanG@iQmetrix.com> > --- > git-gui.sh | 4 +- > lib/chord.tcl | 160 +++++++++++++++++++ > lib/index.tcl | 422 ++++++++++++++++++++++++++++++++++++++++---------- > 3 files changed, 502 insertions(+), 84 deletions(-) > create mode 100644 lib/chord.tcl
From what I can tell, this re-roll of the patch only has minor changes all of which look good. Thanks.
-- Regards, Pratyush Yadav