Browse Source

HADOOP-7390. VersionInfo not generated properly in git after unsplit. Contributed by Todd Lipcon.
(todd

git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/branch-0.22@1160420 13f79535-47bb-0310-9956-ffa450edef68

Konstantin Shvachko 14 years ago
parent
commit
9df6de4ef1
2 changed files with 4 additions and 1 deletions
  1. 3 0
      common/CHANGES.txt
  2. 1 1
      common/src/saveVersion.sh

+ 3 - 0
common/CHANGES.txt

@@ -530,6 +530,9 @@ Release 0.22.0 - Unreleased
     HADOOP-7514. Build fails with ClassCastException when running both
     mvn-install and mvn-deploy targets (Joep Rottinghuis via cos)
 
+    HADOOP-7390. VersionInfo not generated properly in git after unsplit.
+    (todd via shv)
+
 Release 0.21.1 - Unreleased
 
   IMPROVEMENTS

+ 1 - 1
common/src/saveVersion.sh

@@ -26,7 +26,7 @@ build_dir=$2
 user=`whoami | tr '\n\r' '\n'`
 date=`date`
 cwd=`pwd`
-if [ -d .git ]; then
+if git rev-parse HEAD 2>/dev/null > /dev/null ; then
   revision=`git log -1 --pretty=format:"%H"`
   hostname=`hostname`
   branch=`git branch | sed -n -e 's/^* //p'`