diff options
author | eschnett <eschnett@83718e91-0e4f-0410-abf4-91180603181f> | 2011-11-26 17:35:29 +0000 |
---|---|---|
committer | eschnett <eschnett@83718e91-0e4f-0410-abf4-91180603181f> | 2011-11-26 17:35:29 +0000 |
commit | 2c1bef08b015e9bc50d2227cc6bef846c4facaa2 (patch) | |
tree | 759840d28e789976c53d2df7fcad39d3257d647b | |
parent | 28981dfe16307f77ce7040f5b93394855610323f (diff) |
Before committing to a git repository, invent a user git if there is none
git-svn-id: http://svn.cactuscode.org/arrangements/CactusUtils/Formaline/trunk@216 83718e91-0e4f-0410-abf4-91180603181f
-rwxr-xr-x | src/util/git-commit-everything.pl | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/util/git-commit-everything.pl b/src/util/git-commit-everything.pl index 5e1d66b..4d90075 100755 --- a/src/util/git-commit-everything.pl +++ b/src/util/git-commit-everything.pl @@ -29,6 +29,11 @@ $ENV{'GIT_DIR'} = "$git_repo/.git"; print "Formaline: Committing source tree to git repository...\n"; +# Invent a user id if there is none, since newer versions of git +# insist on it +system "$git_cmd config user.name || $git_cmd config user.name \"\${USER}\" $silencer"; +system "$git_cmd config user.email || $git_cmd config user.email \"\${USER}\@localhost\" $silencer"; + # Try to use the previous commit as parent, if possible print "Executing: $git_cmd commit -m $build_id\n" unless $silent; system "$git_cmd commit -m $build_id $silencer"; |