Hi,

git doesn't want to do a git reset hard when for a certain path the index
contains a tree, worktree contains a file and the commit to reset to
contains nothing. Is it a bug or is it intended? I would expect git to
simply delete that path from index and worktree.

> git init
Initialized empty Git repository in /tmp/y/.git/
> touch a
> git add a
> git commit -m addA
[master (root-commit) fa08136] addA
 1 file changed, 0 insertions(+), 0 deletions(-)
 create mode 100644 a
> mkdir d
> touch d/f
> git add d/f
> rm -fr d
> touch d
> git reset --hard HEAD
warning: unable to unlink d/f: Not a directory
HEAD is now at fa08136 addA

Ciao
  Chris
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to