summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2019-07-29 19:38:22 (GMT)
committerJunio C Hamano <gitster@pobox.com>2019-07-29 19:38:22 (GMT)
commitdea6737bb76ba231474668a804d3f7178b766c47 (patch)
tree4b021361d48fcd82cfb80124bde0b25aa1c2884d /t
parent689204ca8862a25be7bd7f91a42fbdf46cfb2a56 (diff)
parent2d511cfc0bfe1d2b98ba8b272ddd9ba83e84e5f8 (diff)
downloadgit-dea6737bb76ba231474668a804d3f7178b766c47.zip
git-dea6737bb76ba231474668a804d3f7178b766c47.tar.gz
git-dea6737bb76ba231474668a804d3f7178b766c47.tar.bz2
Merge branch 'ds/close-object-store' into maint
The commit-graph file is now part of the "files that the runtime may keep open file descriptors on, all of which would need to be closed when done with the object store", and the file descriptor to an existing commit-graph file now is closed before "gc" finalizes a new instance to replace it. * ds/close-object-store: packfile: rename close_all_packs to close_object_store packfile: close commit-graph in close_all_packs commit-graph: use raw_object_store when closing commit-graph: extract write_commit_graph_file() commit-graph: extract copy_oids_to_commits() commit-graph: extract count_distinct_commits() commit-graph: extract fill_oids_from_all_packs() commit-graph: extract fill_oids_from_commit_hex() commit-graph: extract fill_oids_from_packs() commit-graph: create write_commit_graph_context commit-graph: remove Future Work section commit-graph: collapse parameters into flags commit-graph: return with errors during write commit-graph: fix the_repository reference
Diffstat (limited to 't')
-rwxr-xr-xt/t5318-commit-graph.sh8
1 files changed, 8 insertions, 0 deletions
diff --git a/t/t5318-commit-graph.sh b/t/t5318-commit-graph.sh
index 840ad4d..5267c4b 100755
--- a/t/t5318-commit-graph.sh
+++ b/t/t5318-commit-graph.sh
@@ -23,6 +23,14 @@ test_expect_success 'write graph with no packs' '
test_path_is_file info/commit-graph
'
+test_expect_success 'close with correct error on bad input' '
+ cd "$TRASH_DIRECTORY/full" &&
+ echo doesnotexist >in &&
+ { git commit-graph write --stdin-packs <in 2>stderr; ret=$?; } &&
+ test "$ret" = 1 &&
+ test_i18ngrep "error adding pack" stderr
+'
+
test_expect_success 'create commits and repack' '
cd "$TRASH_DIRECTORY/full" &&
for i in $(test_seq 3)