summaryrefslogtreecommitdiff
path: root/doc/todo
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2014-11-12 13:57:20 -0400
committerGravatar Joey Hess <joey@kitenet.net>2014-11-12 13:57:20 -0400
commit2cd2969224090aafee63c9ca2a879476287fa1f6 (patch)
treeaebfb0fdbc074793a055bb6b7f314719ca470f9f /doc/todo
parent21e3f3b4e62a3a5f9db1cd5ebfef92e751d7c771 (diff)
more design work
Diffstat (limited to 'doc/todo')
-rw-r--r--doc/todo/direct_mode_undo.mdwn14
1 files changed, 4 insertions, 10 deletions
diff --git a/doc/todo/direct_mode_undo.mdwn b/doc/todo/direct_mode_undo.mdwn
index 969678d23..505c753a3 100644
--- a/doc/todo/direct_mode_undo.mdwn
+++ b/doc/todo/direct_mode_undo.mdwn
@@ -61,16 +61,10 @@ it gets committed, and then that commit is reverted, resulting in another
commit. Which a later run of undo can in turn revert. If it didn't commit,
the history about the staged change that was reverted would be lost.
-What about undoing changes to a whole directory? It first would
-need to look through the git history to find every file under that
-directory. And then it would behave as if it were passed all those
-files. This would be useful for reverting `rm -rf`. But it could be very
-expensive. And it could lead to surprising results, like undoing a lot
-of unrelated changes when running on a bunch of files in a directory
-that were changed at different times.
-
-Maybe instead of letting a directory be passed, make undo with no
-parameters revert all changes made in the most recent commit.
+What about undoing changes to a whole directory? Recursively undoing
+the last change to each file would be expensive, and likely confusing.
+Instead, when a directory is passed, it could find the most recent commit
+that touched files in that directory, and undo the changes to those files.
Also, --depth could make undo look for an older commit than the most
recent one to affect the specified file.