diff options
author | Derrick Stolee <dstolee@microsoft.com> | 2018-04-10 08:56:08 -0400 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2018-04-11 10:43:02 +0900 |
commit | 7547b95b4fbb8591726b1d9381c176cc27fc6aea (patch) | |
tree | 0de2b763a40f4c07eee2ddbf40fd50eaf82dc996 /t/t5318-commit-graph.sh | |
parent | commit-graph: build graph from starting commits (diff) | |
download | tgif-7547b95b4fbb8591726b1d9381c176cc27fc6aea.tar.xz |
commit-graph: implement "--append" option
Teach git-commit-graph to add all commits from the existing
commit-graph file to the file about to be written. This should be
used when adding new commits without performing garbage collection.
Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t5318-commit-graph.sh')
-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 c28cfb5d7f..a380419b65 100755 --- a/t/t5318-commit-graph.sh +++ b/t/t5318-commit-graph.sh @@ -190,6 +190,16 @@ test_expect_success 'build graph from commits with closure' ' graph_git_behavior 'graph from commits, commit 8 vs merge 1' full commits/8 merge/1 graph_git_behavior 'graph from commits, commit 8 vs merge 2' full commits/8 merge/2 +test_expect_success 'build graph from commits with append' ' + cd "$TRASH_DIRECTORY/full" && + git rev-parse merge/3 | git commit-graph write --stdin-commits --append && + test_path_is_file $objdir/info/commit-graph && + graph_read_expect "10" "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 && |