Re: [PATCH] fast-import: fix ls command with empty path
- From
Jonathan Nieder <jrnieder@gmail.com>
- Date
- Mar 10, 2012, 09:48 UTC
- Message-ID
- <20120310094803.GA1969@burratino>
- In-Reply-To
- <CA+gfSn8bh-tV+uduM7xsuwqXQW2a57yvVmRXjXjp9JaO779bUg@mail.gmail.com>
Jonathan Nieder wrote:
> Dmitry Ivankov wrote:
>> One more quick thought. "force the root mode to S_IFDIR" part doesn't >> look obviously good for me. First, isn't it already ensured that the >> root is a directory?
[...]
> It was just a problematic and incomplete version of what your "be > saner with temporary trees" does properly.
To tie up this loose end: looks like David's patch was ok in this respect and my worries unfounded. What I was missing is that store_tree() does nothing unless its tree argument is dirty, and the temporary tree used to repesent <treeish> in "ls <treeish> <path>" is never dirty.
Of course, the reminder of the "be saner" patch and the tree delta discussion was still very useful.
Thanks for your thoughtfulness. Jonathan