diff options
author | Derrick Stolee <dstolee@microsoft.com> | 2018-04-10 12:56:08 (GMT) |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2018-04-11 01:43:02 (GMT) |
commit | 7547b95b4fbb8591726b1d9381c176cc27fc6aea (patch) | |
tree | 0de2b763a40f4c07eee2ddbf40fd50eaf82dc996 /t/t5318-commit-graph.sh | |
parent | 3d5df01b5e42416a59e857135e932bbdd8cc3ba0 (diff) | |
download | git-7547b95b4fbb8591726b1d9381c176cc27fc6aea.zip git-7547b95b4fbb8591726b1d9381c176cc27fc6aea.tar.gz git-7547b95b4fbb8591726b1d9381c176cc27fc6aea.tar.bz2 |
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 c28cfb5..a380419 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 && |