Re: [PATCH v5 04/16] commit-graph: load commit-graph chains

2019-06-10 Thread Derrick Stolee
On 6/10/2019 5:47 PM, Junio C Hamano wrote: > "Derrick Stolee via GitGitGadget" writes: >> +if (get_oid_hex(line.buf, &oids[i])) { >> +warning(_("invalid commit-graph chain: line '%s' not a >> hash"), >> +line.buf); >> +

Re: [PATCH v5 04/16] commit-graph: load commit-graph chains

2019-06-10 Thread Junio C Hamano
"Derrick Stolee via GitGitGadget" writes: > + fp = fopen(chain_name, "r"); > + stat_res = stat(chain_name, &st); > + free(chain_name); > + > + if (!fp || > + stat_res || > + st.st_size <= the_hash_algo->hexsz) > + return NULL; > + > + count = st.st_

[PATCH v5 04/16] commit-graph: load commit-graph chains

2019-06-07 Thread Derrick Stolee via GitGitGadget
From: Derrick Stolee Prepare the logic for reading a chain of commit-graphs. First, look for a file at $OBJDIR/info/commit-graph. If it exists, then use that file and stop. Next, look for the chain file at $OBJDIR/info/commit-graphs/commit-graph-chain. If this file exists, then load the hash va