proxy: Fix proxy git commit of non-annexed files in direct mode.

* proxy: Fix proxy git commit of non-annexed files in direct mode.
* proxy: If a non-proxied git command, such as git revert
  would normally fail because of unstaged files in the work tree,
  make the proxied command fail the same way.
This commit is contained in:
Joey Hess 2015-08-04 14:01:59 -04:00
parent dfd6981785
commit 6c15cdfcb8
5 changed files with 82 additions and 6 deletions

View file

@ -31,6 +31,14 @@ stage the changes in the index, and then proxy a commit:
git annex add myfile
git annex proxy -- git commit myfile -m foo
Note that git annex proxy cannot be usefully used with git commands that
look at work tree files. For example, it doesn't make sense to proxy "git
add". This is because the temporary work tree used for proxying doesn't
contain all the files that are in the real work tree. However, any unstaged
work tree files are hard linked (or copied) into the temporary work tree,
so that a command like git revert, that will fail if the change it's
making overwrites work tree files, will behave the same when proxied.
# SEE ALSO
[[git-annex]](1)