This script fails on some systems (e.g., autobuilders) that doesn't have
a normal ~/.gitconfig:

*** Your name cannot be determined from your system services (gecos).

Run

  git config --global user.email "[email protected]"
  git config --global user.name "Your Name"

to set your account's default identity.
Omit --global to set the identity only in this repository.

fatal: empty ident  <[email protected]
> not allowed
FAIL: test-vc-list-files-git.sh

How about this patch?

/Simon

2009-05-08  Simon Josefsson  <[email protected]>

        * tests/test-vc-list-files-git.sh: Do git config of user.email and
        user.name to prevent git commit from complaining.

diff --git a/tests/test-vc-list-files-git.sh b/tests/test-vc-list-files-git.sh
index a42aec1..f1627e7 100755
--- a/tests/test-vc-list-files-git.sh
+++ b/tests/test-vc-list-files-git.sh
@@ -1,6 +1,6 @@
 #!/bin/sh
 # Unit tests for vc-list-files
-# Copyright (C) 2008 Free Software Foundation, Inc.
+# Copyright (C) 2008, 2009 Free Software Foundation, Inc.
 # This file is part of the GNUlib Library.
 #
 # This program is free software: you can redistribute it and/or modify
@@ -36,6 +36,8 @@ mkdir $tmpdir && cd $tmpdir &&
     || { echo "Skipping test: git not found in PATH"; (exit 77); exit 77; }; } 
&&
   mkdir d &&
   touch d/a b c &&
+  git config user.email "[email protected]"
+  git config user.name "Your Name"
   git add . > /dev/null &&
   git commit -q -a -m log &&
   printf '%s\n' b c d/a > expected &&


Reply via email to