From: "David A. Greene" <greened@xxxxxxxxxxxxx> Remove --annotate. This obviates the need for an --unannotate command. We really want a more generalized commit message rewrite mechanism. Signed-off-by: David A. Greene <greened@xxxxxxxxxxxxx> --- contrib/subtree/git-subtree.sh | 6 +---- contrib/subtree/t/t7900-subtree.sh | 50 ++++++++++++++++++------------------ 2 files changed, 26 insertions(+), 30 deletions(-) diff --git a/contrib/subtree/git-subtree.sh b/contrib/subtree/git-subtree.sh index 1b3df99..2aceadc 100755 --- a/contrib/subtree/git-subtree.sh +++ b/contrib/subtree/git-subtree.sh @@ -21,7 +21,6 @@ d show debug messages P,prefix= the name of the subdir to split out m,message= use the given message as the commit message for the merge commit options for 'split' -annotate= add a prefix to commit message of new commits b,branch= create a new branch from the split subtree ignore-joins ignore prior --rejoin commits onto= try connecting new tree to an existing one @@ -43,7 +42,6 @@ command= onto= rejoin= ignore_joins= -annotate= squash= message= @@ -79,8 +77,6 @@ while [ $# -gt 0 ]; do case "$opt" in -q) quiet=1 ;; -d) debug=1 ;; - --annotate) annotate="$1"; shift ;; - --no-annotate) annotate= ;; -b) branch="$1"; shift ;; -P) prefix="${1%/}"; shift ;; -m) message="$1"; shift ;; @@ -311,7 +307,7 @@ copy_commit() GIT_COMMITTER_NAME \ GIT_COMMITTER_EMAIL \ GIT_COMMITTER_DATE - (echo -n "$annotate"; cat ) | + (echo -n ""; cat ) | git commit-tree "$2" $3 # reads the rest of stdin ) || die "Can't copy commit $1" } diff --git a/contrib/subtree/t/t7900-subtree.sh b/contrib/subtree/t/t7900-subtree.sh index 5c6c73d..fa2a6c3 100755 --- a/contrib/subtree/t/t7900-subtree.sh +++ b/contrib/subtree/t/t7900-subtree.sh @@ -338,8 +338,8 @@ test_expect_success 'split subdir/ with --rejoin' ' cd "$subtree_test_count" && git fetch ./subproj master && git subtree merge --prefix=subdir FETCH_HEAD && - split_hash=$(git subtree split --prefix=subdir --annotate="*") && - git subtree split --prefix=subdir --annotate="*" --rejoin && + split_hash=$(git subtree split --prefix=subdir) && + git subtree split --prefix=subdir --rejoin && test_equal "$(last_commit_message)" "Split '\''subdir/'\'' into commit '\''$split_hash'\''" ) ' @@ -363,7 +363,7 @@ test_expect_success 'split subdir/ with --rejoin and --message' ' cd "$subtree_test_count" && git fetch ./subproj master && git subtree merge --prefix=subdir FETCH_HEAD && - git subtree split --prefix=subdir --message="Split & rejoin" --annotate="*" --rejoin && + git subtree split --prefix=subdir --message="Split & rejoin" --rejoin && test_equal "$(last_commit_message)" "Split & rejoin" ) ' @@ -387,8 +387,8 @@ test_expect_success 'split subdir/ with --branch' ' cd "$subtree_test_count" && git fetch ./subproj master && git subtree merge --prefix=subdir FETCH_HEAD && - split_hash=$(git subtree split --prefix=subdir --annotate="*") && - git subtree split --prefix=subdir --annotate="*" --branch subproj-br && + split_hash=$(git subtree split --prefix=subdir) && + git subtree split --prefix=subdir --branch subproj-br && test_equal "$(git rev-parse subproj-br)" "$split_hash" ) ' @@ -413,8 +413,8 @@ test_expect_success 'split subdir/ with --branch for an existing branch' ' cd "$subtree_test_count" && git fetch ./subproj master && git subtree merge --prefix=subdir FETCH_HEAD && - split_hash=$(git subtree split --prefix=subdir --annotate="*") && - git subtree split --prefix=subdir --annotate="*" --branch subproj-br && + split_hash=$(git subtree split --prefix=subdir) && + git subtree split --prefix=subdir --branch subproj-br && test_equal "$(git rev-parse subproj-br)" "$split_hash" ) ' @@ -466,7 +466,7 @@ test_expect_success 'make sure exactly the right set of files ends up in the sub cd "$subtree_test_count" && git fetch ./subproj master && git subtree merge --prefix=subdir FETCH_HEAD && - git subtree split --prefix=subdir --annotate="*" --branch subproj-br --rejoin + git subtree split --prefix=subdir --branch subproj-br --rejoin ) && test_create_commit "$subtree_test_count/subproj" sub3 && test_create_commit "$subtree_test_count" subdir/main-sub3 && @@ -477,12 +477,12 @@ test_expect_success 'make sure exactly the right set of files ends up in the sub test_create_commit "$subtree_test_count/subproj" sub4 && ( cd "$subtree_test_count" && - git subtree split --prefix=subdir --annotate="*" --branch subproj-br --rejoin + git subtree split --prefix=subdir --branch subproj-br --rejoin ) && test_create_commit "$subtree_test_count" subdir/main-sub4 && ( cd "$subtree_test_count" && - git subtree split --prefix=subdir --annotate="*" --branch subproj-br --rejoin + git subtree split --prefix=subdir --branch subproj-br --rejoin ) && ( cd "$subtree_test_count/subproj" && @@ -517,7 +517,7 @@ test_expect_success 'make sure the subproj *only* contains commits that affect t cd "$subtree_test_count" && git fetch ./subproj master && git subtree merge --prefix=subdir FETCH_HEAD && - git subtree split --prefix=subdir --annotate="*" --branch subproj-br --rejoin + git subtree split --prefix=subdir --branch subproj-br --rejoin ) && test_create_commit "$subtree_test_count/subproj" sub3 && test_create_commit "$subtree_test_count" subdir/main-sub3 && @@ -528,12 +528,12 @@ test_expect_success 'make sure the subproj *only* contains commits that affect t test_create_commit "$subtree_test_count/subproj" sub4 && ( cd "$subtree_test_count" && - git subtree split --prefix=subdir --annotate="*" --branch subproj-br --rejoin + git subtree split --prefix=subdir --branch subproj-br --rejoin ) && test_create_commit "$subtree_test_count" subdir/main-sub4 && ( cd "$subtree_test_count" && - git subtree split --prefix=subdir --annotate="*" --branch subproj-br --rejoin + git subtree split --prefix=subdir --branch subproj-br --rejoin ) && ( cd "$subtree_test_count/subproj" && @@ -568,7 +568,7 @@ test_expect_success 'make sure exactly the right set of files ends up in the mai cd "$subtree_test_count" && git fetch ./subproj master && git subtree merge --prefix=subdir FETCH_HEAD && - git subtree split --prefix=subdir --annotate="*" --branch subproj-br --rejoin + git subtree split --prefix=subdir --branch subproj-br --rejoin ) && test_create_commit "$subtree_test_count/subproj" sub3 && test_create_commit "$subtree_test_count" subdir/main-sub3 && @@ -579,12 +579,12 @@ test_expect_success 'make sure exactly the right set of files ends up in the mai test_create_commit "$subtree_test_count/subproj" sub4 && ( cd "$subtree_test_count" && - git subtree split --prefix=subdir --annotate="*" --branch subproj-br --rejoin + git subtree split --prefix=subdir --branch subproj-br --rejoin ) && test_create_commit "$subtree_test_count" subdir/main-sub4 && ( cd "$subtree_test_count" && - git subtree split --prefix=subdir --annotate="*" --branch subproj-br --rejoin + git subtree split --prefix=subdir --branch subproj-br --rejoin ) && ( cd "$subtree_test_count/subproj" && @@ -623,7 +623,7 @@ test_expect_success 'make sure each filename changed exactly once in the entire cd "$subtree_test_count" && git fetch ./subproj master && git subtree merge --prefix=subdir FETCH_HEAD && - git subtree split --prefix=subdir --annotate="*" --branch subproj-br --rejoin + git subtree split --prefix=subdir --branch subproj-br --rejoin ) && test_create_commit "$subtree_test_count/subproj" sub3 && test_create_commit "$subtree_test_count" subdir/main-sub3 && @@ -634,12 +634,12 @@ test_expect_success 'make sure each filename changed exactly once in the entire test_create_commit "$subtree_test_count/subproj" sub4 && ( cd "$subtree_test_count" && - git subtree split --prefix=subdir --annotate="*" --branch subproj-br --rejoin + git subtree split --prefix=subdir --branch subproj-br --rejoin ) && test_create_commit "$subtree_test_count" subdir/main-sub4 && ( cd "$subtree_test_count" && - git subtree split --prefix=subdir --annotate="*" --branch subproj-br --rejoin + git subtree split --prefix=subdir --branch subproj-br --rejoin ) && ( cd "$subtree_test_count/subproj" && @@ -682,7 +682,7 @@ test_expect_success 'make sure the --rejoin commits never make it into subproj' cd "$subtree_test_count" && git fetch ./subproj master && git subtree merge --prefix=subdir FETCH_HEAD && - git subtree split --prefix=subdir --annotate="*" --branch subproj-br --rejoin + git subtree split --prefix=subdir --branch subproj-br --rejoin ) && test_create_commit "$subtree_test_count/subproj" sub3 && test_create_commit "$subtree_test_count" subdir/main-sub3 && @@ -693,12 +693,12 @@ test_expect_success 'make sure the --rejoin commits never make it into subproj' test_create_commit "$subtree_test_count/subproj" sub4 && ( cd "$subtree_test_count" && - git subtree split --prefix=subdir --annotate="*" --branch subproj-br --rejoin + git subtree split --prefix=subdir --branch subproj-br --rejoin ) && test_create_commit "$subtree_test_count" subdir/main-sub4 && ( cd "$subtree_test_count" && - git subtree split --prefix=subdir --annotate="*" --branch subproj-br --rejoin + git subtree split --prefix=subdir --branch subproj-br --rejoin ) && ( cd "$subtree_test_count/subproj" && @@ -731,7 +731,7 @@ test_expect_success 'make sure no "git subtree" tagged commits make it into subp cd "$subtree_test_count" && git fetch ./subproj master && git subtree merge --prefix=subdir FETCH_HEAD && - git subtree split --prefix=subdir --annotate="*" --branch subproj-br --rejoin + git subtree split --prefix=subdir --branch subproj-br --rejoin ) && test_create_commit "$subtree_test_count/subproj" sub3 && test_create_commit "$subtree_test_count" subdir/main-sub3 && @@ -742,12 +742,12 @@ test_expect_success 'make sure no "git subtree" tagged commits make it into subp test_create_commit "$subtree_test_count/subproj" sub4 && ( cd "$subtree_test_count" && - git subtree split --prefix=subdir --annotate="*" --branch subproj-br --rejoin + git subtree split --prefix=subdir --branch subproj-br --rejoin ) && test_create_commit "$subtree_test_count" subdir/main-sub4 && ( cd "$subtree_test_count" && - git subtree split --prefix=subdir --annotate="*" --branch subproj-br --rejoin + git subtree split --prefix=subdir --branch subproj-br --rejoin ) && ( cd "$subtree_test_count/subproj" && -- 1.7.10.4 -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html