Add --annotate option, and create recognizable file content during tests.
diff --git a/git-subtree.sh b/git-subtree.sh
index aeafada..e54651c 100755
--- a/git-subtree.sh
+++ b/git-subtree.sh
@@ -17,6 +17,7 @@
q quiet
prefix= the name of the subdir to split out
options for 'split'
+annotate= add a prefix to commit message of new commits
onto= try connecting new tree to an existing one
rejoin merge the new branch back into HEAD
ignore-joins ignore prior --rejoin commits
@@ -30,6 +31,7 @@
onto=
rejoin=
ignore_joins=
+annotate=
debug()
{
@@ -55,6 +57,8 @@
shift
case "$opt" in
-q) quiet=1 ;;
+ --annotate) annotate="$1"; shift ;;
+ --no-annotate) annotate= ;;
--prefix) prefix="$1"; shift ;;
--no-prefix) prefix= ;;
--onto) onto="$1"; shift ;;
@@ -178,7 +182,7 @@
GIT_COMMITTER_NAME \
GIT_COMMITTER_EMAIL \
GIT_COMMITTER_DATE
- (echo -n '*'; cat ) | # FIXME
+ (echo -n "$annotate"; cat ) |
git commit-tree "$2" $3 # reads the rest of stdin
) || die "Can't copy commit $1"
}