diff options
Diffstat (limited to 'repo-mutate.sh')
-rw-r--r-- | repo-mutate.sh | 22 |
1 files changed, 16 insertions, 6 deletions
diff --git a/repo-mutate.sh b/repo-mutate.sh index d88452e..0f76316 100644 --- a/repo-mutate.sh +++ b/repo-mutate.sh @@ -23,7 +23,7 @@ function systr_repo_create_commit } ## -# systr_repo_finish_commit <commit> <parent> <author> <email> [<merge>] +# systr_repo_finish_commit <commit> <parent> [<merge>] # # Finish writing a commit by adding meta-data to the commit directory. # The commit mesasge is taken from the file <commit>.mesg at the root @@ -33,22 +33,32 @@ function systr_repo_create_commit ## function systr_repo_finish_commit { - if [ $# -lt 4 ]; then + if [ $# -lt 2 ]; then echo "Fatal: too few arguments to systr_repo_finish_commit" exit 1 fi commit="$1" parent="$2" - author="$3" - email="$4" - if [ $# -gt 4 ]; then - merge="$5" + if [ $# -gt 2 ]; then + merge="$3" else merge="" fi + if [ -f ".systr/author" ]; then + read author <.systr/author + else + author="Anonymous" + fi + + if [ -f ".systr/email" ]; then + read email <.systr/email + else + email="<anon>" + fi + if [[ "$remote" == "" ]]; then ( cd "$path" |