Commit d335ce8
commit-graph.c: show progress of finding reachable commits
When 'git commit-graph write --reachable' is invoked, the commit-graph
machinery calls 'for_each_ref()' to discover the set of reachable
commits.
Right now the 'add_ref_to_set' callback is not doing anything other than
adding an OID to the set of known-reachable OIDs. In a subsequent
commit, 'add_ref_to_set' will presumptively peel references. This
operation should be fast for repositories with an up-to-date
'$GIT_DIR/packed-refs', but may be slow in the general case.
So that it doesn't appear that 'git commit-graph write' is idling with
'--reachable' in the slow case, add a progress meter to provide some
output in the meantime.
In general, we don't expect a progress meter to appear at all, since
peeling references with a 'packed-refs' file is quick. If it's slow and
we do show a progress meter, the subsequent 'fill_oids_from_commits()'
will be fast, since all of the calls to
'lookup_commit_reference_gently()' will be no-ops.
Both progress meters are delayed, so it is unlikely that more than one
will appear. In either case, this intermediate state will go away in a
handful of patches, at which point there will be at most one progress
meter.
Signed-off-by: Taylor Blau <me@ttaylorr.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>1 parent 1fe1084 commit d335ce8
1 file changed
+9
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1320 | 1320 | | |
1321 | 1321 | | |
1322 | 1322 | | |
| 1323 | + | |
1323 | 1324 | | |
1324 | 1325 | | |
1325 | 1326 | | |
| |||
1329 | 1330 | | |
1330 | 1331 | | |
1331 | 1332 | | |
| 1333 | + | |
| 1334 | + | |
| 1335 | + | |
1332 | 1336 | | |
1333 | 1337 | | |
1334 | 1338 | | |
| |||
1342 | 1346 | | |
1343 | 1347 | | |
1344 | 1348 | | |
| 1349 | + | |
| 1350 | + | |
| 1351 | + | |
1345 | 1352 | | |
1346 | 1353 | | |
1347 | 1354 | | |
1348 | 1355 | | |
1349 | 1356 | | |
1350 | 1357 | | |
| 1358 | + | |
| 1359 | + | |
1351 | 1360 | | |
1352 | 1361 | | |
1353 | 1362 | | |
| |||
0 commit comments