diff options
author | Derrick Stolee <dstolee@microsoft.com> | 2018-06-27 09:24:45 -0400 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2018-06-27 10:29:10 -0700 |
commit | 59fb87701ff68eb114e54ce6834e91c4ae8f60a7 (patch) | |
tree | 2046a528befaed1a8896b7ca9e284321ec68b1eb /t | |
parent | commit-graph: use string-list API for input (diff) | |
download | tgif-59fb87701ff68eb114e54ce6834e91c4ae8f60a7.tar.xz |
commit-graph: add '--reachable' option
When writing commit-graph files, it can be convenient to ask for all
reachable commits (starting at the ref set) in the resulting file. This
is particularly helpful when writing to stdin is complicated, such as a
future integration with 'git gc'.
Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't')
-rwxr-xr-x | t/t5318-commit-graph.sh | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/t/t5318-commit-graph.sh b/t/t5318-commit-graph.sh index a9e8c774d5..2208c266b5 100755 --- a/t/t5318-commit-graph.sh +++ b/t/t5318-commit-graph.sh @@ -205,6 +205,16 @@ test_expect_success 'build graph from commits with append' ' graph_git_behavior 'append graph, commit 8 vs merge 1' full commits/8 merge/1 graph_git_behavior 'append graph, commit 8 vs merge 2' full commits/8 merge/2 +test_expect_success 'build graph using --reachable' ' + cd "$TRASH_DIRECTORY/full" && + git commit-graph write --reachable && + test_path_is_file $objdir/info/commit-graph && + graph_read_expect "11" "large_edges" +' + +graph_git_behavior 'append graph, commit 8 vs merge 1' full commits/8 merge/1 +graph_git_behavior 'append graph, commit 8 vs merge 2' full commits/8 merge/2 + test_expect_success 'setup bare repo' ' cd "$TRASH_DIRECTORY" && git clone --bare --no-local full bare && |