From 2c1bef08b015e9bc50d2227cc6bef846c4facaa2 Mon Sep 17 00:00:00 2001 From: eschnett Date: Sat, 26 Nov 2011 17:35:29 +0000 Subject: 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 --- src/util/git-commit-everything.pl | 5 +++++ 1 file changed, 5 insertions(+) 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"; -- cgit v1.2.3