summaryrefslogtreecommitdiff
path: root/lib/remote_add.tcl
diff options
context:
space:
mode:
authorLibravatar Jonathan Gilbert <JonathanG@iQmetrix.com>2019-12-01 02:28:33 +0000
committerLibravatar Pratyush Yadav <me@yadavpratyush.com>2019-12-06 00:12:15 +0530
commitfa38ab68b0ac409f695efcaa23b8bcda84defd41 (patch)
tree6a1ac62bd5b56df6a8c4020c0d0ac19751ff09a4 /lib/remote_add.tcl
parentgit-gui: update status bar to track operations (diff)
downloadtgif-fa38ab68b0ac409f695efcaa23b8bcda84defd41.tar.xz
git-gui: revert untracked files by deleting them
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> Signed-off-by: Pratyush Yadav <me@yadavpratyush.com>
Diffstat (limited to 'lib/remote_add.tcl')
0 files changed, 0 insertions, 0 deletions