Thread (9 messages) flat view 9 messages, 7 authors, 2016-06-15

Re: 'git branch' when origin branch with same name exists

From: Andreas Ericsson <hidden>
Date: 2016-06-15 22:54:08

On 06/19/2012 07:06 PM, Ryan Lortie wrote:
quoted
Anyway, this will make each call to git-branch to perform a crawl
over the refs/heads hierarchy which, I think, is not worth the
result.
I know branching is lightweight with git, but I don't understand that
the operation is so performance-critical that a enumerating a
directory and doing a few stats would be a huge issue...

If it is decided to only check the 'origin' remote then we're talking
about one single stat() syscall.
Not really. I don't remember which repository it was, but the "packed-refs"
feature came about as a result of one repository having in excess of 120k
refs. So your "a few stat() calls" could well end up nuking performance
totally for someone else, and "one stat call for origin" is only true if
origin only has one ref, which is obviously not the case for some of the
larger projects.

In general, assuming everyone else uses a piece of software the same way
you do is a recipe for creating poorly performing programs.

-- 
Andreas Ericsson                   andreas.ericsson@op5.se
OP5 AB                             www.op5.se
Tel: +46 8-230225                  Fax: +46 8-230231

Considering the successes of the wars on alcohol, poverty, drugs and
terror, I think we should give some serious thought to declaring war
on peace.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help