Re: [PATCH] rev-list: allow cached objects in existence check

2019-03-05 Thread Jeff King
On Tue, Mar 05, 2019 at 10:33:13PM +0900, Junio C Hamano wrote: > Jeff King writes: > > >> Or teach git-blame to have its own pretend mechanism, and remove the > >> pretend mechanism from sha1-file.c. > > > > I think that would be ideal, but I'm not sure if it's feasible due to > > the layering

Re: [PATCH] rev-list: allow cached objects in existence check

2019-03-05 Thread Junio C Hamano
Jeff King writes: >> Or teach git-blame to have its own pretend mechanism, and remove the >> pretend mechanism from sha1-file.c. > > I think that would be ideal, but I'm not sure if it's feasible due to > the layering of the various modules. Sorry, but I do not get why we want command-line speci

Re: [PATCH] rev-list: allow cached objects in existence check

2019-03-05 Thread Junio C Hamano
Jeff King writes: > This fixes a regression in 7c0fe330d5 (rev-list: handle missing tree > objects properly, 2018-10-05) where rev-list will now complain about the > empty tree when it doesn't physically exist on disk. > > Before that commit, we relied on the traversal code in list-objects.c to >

Re: [PATCH] rev-list: allow cached objects in existence check

2019-03-04 Thread Jeff King
On Mon, Mar 04, 2019 at 11:19:32AM -0800, Jonathan Tan wrote: > > - some callers of has_sha1_file() might care about durability between > > processes. Because it's baked in, the empty tree is safe for that > > (whatever follow-on process runs, it will also be baked in there). > > But

Re: [PATCH] rev-list: allow cached objects in existence check

2019-03-04 Thread Jonathan Tan
> This patch makes the minimal fix, which is to swap out a direct call to > oid_object_info_extended(), minus the SKIP_CACHED flag, instead of > calling has_object_file(). This is all that has_object_file() is doing > under the hood. And there's little danger of unrelated fallout from > other unexp

[PATCH] rev-list: allow cached objects in existence check

2019-03-04 Thread Jeff King
This fixes a regression in 7c0fe330d5 (rev-list: handle missing tree objects properly, 2018-10-05) where rev-list will now complain about the empty tree when it doesn't physically exist on disk. Before that commit, we relied on the traversal code in list-objects.c to walk through the trees. Since