Re: git ls-tree -d doesn't work if the specified path is the repository root?

2017-09-25 Thread Jonathan Nieder
Hi, Roy Wellington wrote: > When I run `git ls-tree -d HEAD -- subdir` from the root of my > repository, where `subdir` is a subdirectory in that root, I get the > treehash of that subdirectory. This is what I expect. > > However, if I merely replace `subdir` with `.` (the root of the >

Re: git ls-tree -d doesn't work if the specified path is the repository root?

2017-09-25 Thread Santiago Torres
> Is there some reason for this? This behavior seems like a bug to me: > it means that prior to calling ls-tree I need to check if the > referenced path happens to be the root, and if so, find some other > means (rev-parse?) of converting it to a treehash. Hmm, interesting. I see these four

git ls-tree -d doesn't work if the specified path is the repository root?

2017-09-25 Thread Roy Wellington
Hi, When I run `git ls-tree -d HEAD -- subdir` from the root of my repository, where `subdir` is a subdirectory in that root, I get the treehash of that subdirectory. This is what I expect. However, if I merely replace `subdir` with `.` (the root of the repository), (i.e., `git ls-tree -d HEAD