Re: [PATCH 1/2] Delete ref $frotz by moving ref file to "deleted-$frotz~ref".

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Junio C Hamano
Date: Monday, October 16, 2006 - 9:41 pm

Christian Couder <chriscool@tuxfamily.org> writes:


I would say that is a very valid way to work with git,
regardless of the size of project.  Now, how often would you
create such a per-bug branch and delete one, compared to the
number of operations that would require ref lookups?  Your
example actually supports what I've said -- optimizing for
deletion at the cost of more expensive lookups is wrong.


Stop and think about what you are saying.  What's a ref cache?
We do not have such a beast today (unless you equate it with
packed-refs file), and you would need to design and implement
it, but think about how you make that operate.  You would need
to invalidate it when you delete a ref using the deleted-ref/
approach; that's not much different from repacking packed-refs
file without the ref you just deleted, no?

Of course you can argue that instead of repacking you always
stat deleted-ref/ hierarchy; in other words, you can argue that
you can make deletion path faster by penalizing the lookup path.

So I do not think using "ref cache" (whatever it is, and however
it operates) does not change the situation a bit.


If the goal is to optimize for deletion path, then that is
true.  My point is that we do not want to optimize for deletion
path at the expense of more costly lookup path.


-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: [PATCH 1/2] Delete ref $frotz by moving ref file to "d ..., Junio C Hamano, (Mon Oct 16, 9:41 pm)