@@ -129,6 +129,50 @@ $(linux_repo):
129
129
mkdir -p $@
130
130
cd $@ && git init --bare && git remote add origin https://github.com/torvalds/linux && git fetch
131
131
132
+ test_many_commits_1m_repo = tests/fixtures/repos/test-many-commits-1m.git
133
+ $(test_many_commits_1m_repo ) :
134
+ mkdir -p $@
135
+ cd $@ && git init --bare && git remote add origin https://github.com/cirosantilli/test-many-commits-1m.git && git fetch
136
+
137
+ # # get all non-rc tags up to v5.8, oldest tag first (should have 78 tags)
138
+ # # -> convert to commit ids
139
+ # # -> write a new incremental commit-graph file for each commit id
140
+ tests/fixtures/commit-graphs/linux/long-chain : $(linux_repo )
141
+ mkdir -p $@
142
+ rm -rf $(linux_repo ) /objects/info/* graph*
143
+ set -x && cd $(linux_repo ) && \
144
+ for tag in $$ (git tag --list --merged v5.8 --sort=version:refname | grep -Fv -- -rc); do \
145
+ git show-ref -s " $$ tag" | git commit-graph write --split=no-merge --stdin-commits; \
146
+ done
147
+ mv -f $(linux_repo ) /objects/info/* graphs* $@
148
+ actual=$$(ls -1 $@ /commit-graphs/*.graph | wc -l ) ; \
149
+ if [ $$ actual -ne 78 ]; then echo expected 78 commit-graph files, got $$ actual; exit 1; fi
150
+
151
+ tests/fixtures/commit-graphs/linux/single-file : $(linux_repo )
152
+ mkdir -p $@
153
+ rm -rf $(linux_repo ) /objects/info/* graph*
154
+ cd $(linux_repo ) && git show-ref -s v5.8 | git commit-graph write --stdin-commits
155
+ mv -f $(linux_repo ) /objects/info/* graph* $@
156
+
157
+ tests/fixtures/commit-graphs/rust/single-file : $(rust_repo )
158
+ mkdir -p $@
159
+ rm -rf $(rust_repo ) /objects/info/* graph*
160
+ cd $(rust_repo ) && git show-ref -s 1.47.0 | git commit-graph write --stdin-commits
161
+ mv -f $(rust_repo ) /objects/info/* graph* $@
162
+
163
+ tests/fixtures/commit-graphs/test-many-commits-1m/single-file : $(test_many_commits_1m_repo )
164
+ mkdir -p $@
165
+ rm -rf $(test_many_commits_1m_repo ) /objects/info/* graph*
166
+ cd $(test_many_commits_1m_repo ) \
167
+ && echo f4d21576c13d917e1464d9bc1323a560a5b8595d | git commit-graph write --stdin-commits
168
+ mv -f $(test_many_commits_1m_repo ) /objects/info/* graph* $@
169
+
170
+ commit_graphs = \
171
+ tests/fixtures/commit-graphs/linux/long-chain \
172
+ tests/fixtures/commit-graphs/linux/single-file \
173
+ tests/fixtures/commit-graphs/rust/single-file \
174
+ tests/fixtures/commit-graphs/test-many-commits-1m/single-file
175
+
132
176
# #@ on CI
133
177
134
178
stress : # # Run various algorithms on big repositories
@@ -146,6 +190,14 @@ stress: ## Run various algorithms on big repositories
146
190
147
191
rm -Rf delme; mkdir delme && time ./target/release/gixp --verbose pack-explode .git/objects/pack/*.idx delme/
148
192
193
+ $(MAKE) stress-commitgraph
194
+
195
+ .PHONY : stress-commitgraph
196
+ stress-commitgraph : release-lean $(commit_graphs )
197
+ set -x; for path in $( wordlist 2, 999, $^) ; do \
198
+ time ./target/release/gixp --verbose commit-graph-verify $$ path; \
199
+ done
200
+
149
201
# #@ Maintenance
150
202
151
203
baseline_asset_dir = git-repository/src/assets/baseline-init
0 commit comments