git log internals: performance using the reverse option -
To allow me / others to enter the internal, someone can tell me that display of git log A. .
- When reverse option is given, B is bad?
My understanding is that the list of commitments is related to dual so I did not think so.
However:
If I use the
-nx option,
git log-nx a .. b it happens.
But now if I use the
git log-nx - reverse a.b. , even if X reverse order is b.
?
committed "link" unidirectional 1 but the display will basically be the same For reasons.
Specifically, notation a .. b means " a to b ". It actually means to calculate a set difference: accessible (b) - accessible (a) , where is reachable () Such a set is "accessible" starting with the given reference label. 2 That is, the first GIT name resolves that raw SHA-1, then, for the commitment identified by that SHA-1, it all gets
Although it is a bit more complex (it is done internally and is very customizable), 3 you can think of the git log as if the first git rev-list runs a series of commands if you run:
git rev-list A Command id (s A-1 S) access to get as output A . If you do this to repeat the label B :
git rev-list B , then all of you Accessible from IT ID label B Then you can think of GIT running the git rev-list command, and then 2, before the SAH-1 ID, A ..b means b - no a .
If you use the -n number , then it limits the number of selected SHA-1 to num ; However, as documented in both manuals, it is limited
Before ordering and formatting options, such as - reverse .
You can use git rev-list a..b to create the complete list (in whatever order) and then Head or through the tail, , on systems like Unix, and as a result supply SHA-1 value to git log (but then you can - No Walk to GIT log because otherwise it behaves again with each raw SHA-1 as it stands for "this means Each SHA-1 seems reachable from a "this is not documented very well).
1 Internally, each comment records the ID to their parents. Commitment is irreversible, hence a new, later commitment that refers to an old, current commit can not back to the present commitment: to record the "child committed" id in the parent there's no way . Therefore, the links are essentially reverse-direction.
2 The most obvious case where it is very different, it consists entirely of sub-graphs. Consider a committed graph like:
x0 and lt; -x1 & lt; -x2 & lt; -x3 & lt; - Label A00 < - y1 & lt; - y2 & lt; - Label B Here, the label selects A all x , and the label B We select the B item A to set whether the set of accessible items remains unchanged, even then we reduce the set of the B objects And vice versa. So here, b .. A (aka a - not b ) is similar to a , and a..b Code> (aka b - no a ) is similar to b . With more traditional, more linear graphs found in most repositories, we get less surprising (but sometimes still surprisingly) results, for example, given:
< Code> x (Imagine the diagonals as o even pointing to the node, the arrow, A - no B node x is the result of, and is the result of B - is not node y . Therefore both b .. A and a .. b are absent.
In a large graph, large sets There can be a lot of work to find, so git is full of graphic-theory algorithms.
Comments
Post a Comment