swh:1:snp:bb8853bfef8fcf2b1d37fd6404912c7606c98e48
Revision 6f2a3fc812623bc82fb4997adb5a9a547b5dae1a authored by Shawn O. Pearce on 04 July 2007, 04:15:41 UTC, committed by Shawn O. Pearce on 09 July 2007, 01:12:48 UTC
Most people using Git 1.5.x and later are using the newer style
of remotes layout where all of their tracking branches are in
refs/remotes and refs/heads contains only the user's own local
branches.

In such a situation we can avoid calling is_tracking_branch
for each head we are considering because we know that all of
the heads must be local branches if no fetch option or Pull:
line maps a branch into that namespace.

If however any remote maps a remote branch into a local
tracking branch that resides in refs/heads we do exactly
what we did before, which requires scanning through all
fetch lines in case any patterns are matched.

I also switched some regexp/regsub calls to string match
as this can be a faster operation for prefix matching.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
1 parent 3206c63
History
Tip revision: 19981daefd7c147444462739375462b49412ce33 authored by Junio C Hamano on 05 April 2024, 17:49:37 UTC
The fifteenth batch
Tip revision: 19981da
File Mode Size
lib
.gitignore -rw-r--r-- 62 bytes
GIT-VERSION-GEN -rwxr-xr-x 1.8 KB
Makefile -rw-r--r-- 4.6 KB
git-gui.sh -rwxr-xr-x 58.1 KB

back to top