Re: RCS Keywords in Git done right

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I've finished testing this work in larger repositories.

While the approach is performant and works nicely in small repos, but
in larger repos one of the requirements for the "correctness" of
substitutions slows things down (1 or 2 minutes to perform checkouts
between branches with 10,000+ files).

The operation that is slowing things down is discovering the relative
complement of commits between the common files of two branches (i.e.,
which files are common between two branches but differ in their latest
commit).

My current approach is:
1) find files common between @ & @{-1}, "ls-tree --full-tree
--name-only -r" both branches, take the intersection
2) find current branch's commits for common files, for each file in
intersection "log -1 --format=%H $current_branch -- $file"
3) find common files where latest commits differ, for each file in
intersection keep the file if current branche's latest commit does not
equal prior branch's latest commit
4) overwrite all kept files with the results of git-archive

It is steps 2 & 3 that consume the most time in a large repo with
large intersections of common files between branches.

I've tried to conceive of other ways to arriving at the same
"filename"/"latest current branch commit hash" pairs where filenames
are common between branches and latest current branch commit hash
differs from latest prior branch commit hash. I've thought maybe I
could traverse commits starting from merge-base instead of traversing
files, but that doesn't seem like it would be a huge improvement.

I'm sure internal to git in C there would be a better/faster way (and
it would probably look like writing Btrieve queries). Can anyone think
of a good solution for the intersection of files and complement of
commits using only the git CLI tools?

Thanks,

Derek
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]