git-annex/doc/todo/direct_mode_guard.mdwn

23 lines
987 B
Text
Raw Normal View History

2013-02-19 03:03:03 +00:00
Currently [[/direct_mode]] allows the user to point many normally safe
git commands at his foot and pull the trigger. At LCA2013, a git-annex
user suggested modifying direct mode to make this impossible.
One way to do it would be to move the .git directory. Instead, make there
be a .git-annex directory in direct mode repositories. git-annex would know
how to use it, and would be extended to support all known safe git
commands, passing parameters through, and in some cases verifying them.
So, for example, `git annex commit` would run `git commit --git-dir=.git-annex`
However, `git annex commit -a` would refuse to run, or even do something
intelligent that does not involve staging every direct mode file.
2013-02-19 03:07:07 +00:00
----
One source of problems here is that there is some overlap between git-annex
and git commands. Ie, `git annex add` cannot be a passthrough for `git
add`. The git wrapper could instead be another program, or it could be
something like `git annex git add`
2013-02-19 03:03:03 +00:00
--[[Joey]]