diff options
| author | Junio C Hamano <gitster@pobox.com> | 2024-09-12 11:47:23 -0700 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2024-09-12 11:47:23 -0700 |
| commit | 143682ec43d5772ee9327ed84eb0cdc007b1f489 (patch) | |
| tree | f31ec1d5710d11b704afef67f270152226e8b537 /bisect.c | |
| parent | 3bf057a0cd6a75125a5bd239372f9fc4fea6c338 (diff) | |
| parent | c3459ae9ef26ee1b49d4de0af128444967910361 (diff) | |
| download | git-143682ec43d5772ee9327ed84eb0cdc007b1f489.tar.gz | |
Merge branch 'ps/pack-refs-auto-heuristics'
"git pack-refs --auto" for the files backend was too aggressive,
which has been a bit tamed.
* ps/pack-refs-auto-heuristics:
refs/files: use heuristic to decide whether to repack with `--auto`
t0601: merge tests for auto-packing of refs
wrapper: introduce `log2u()`
Diffstat (limited to 'bisect.c')
| -rw-r--r-- | bisect.c | 12 |
1 files changed, 1 insertions, 11 deletions
@@ -1130,16 +1130,6 @@ cleanup: return res; } -static inline int log2i(int n) -{ - int log2 = 0; - - for (; n > 1; n >>= 1) - log2++; - - return log2; -} - static inline int exp2i(int n) { return 1 << n; @@ -1162,7 +1152,7 @@ int estimate_bisect_steps(int all) if (all < 3) return 0; - n = log2i(all); + n = log2u(all); e = exp2i(n); x = all - e; |
