From: Paolo Ciarrocchi Date: Wed, 31 May 2006 20:08:43 GMT Subject: Re: git --version Message-ID: <4d8e3fd30605311308j6a784635g91e2721258f53c9f@mail.gmail.com> In-Reply-To: <4d8e3fd30605311256o67e45d06ve0efeff65fcf4851@mail.gmail.com> On 5/31/06, Paolo Ciarrocchi wrote: > On 5/31/06, Paolo Ciarrocchi wrote: > [...] > > And even more intersting: > > make clean && make && sudo make install > > git --version > > git version 1.3.GIT > > > > make install > > [...] > > mv git-cherry-pick+ git-cherry-pick > > mv: sovrascrivo `git-cherry-pick' ignorando il modo 0755? > > that in english is something like: > > mv: overwrite `git-cherry-pick' ignoring mod 0755? > > > > Wow...of course, make clean && make install fix everything > > > > Thanks to loops on #git for asking me to do the following test: > > paolo@Italia:~/git$ sudo ./GIT-VERSION-GEN > GIT_VERSION = 1.3.GIT > paolo@Italia:~/git$ ./GIT-VERSION-GEN > GIT_VERSION = 1.3.3.g2186 > > I don't know why it's happening... Ok, thanks to the people living in #git!! the problem is the following, from GIT-VERSION-GEN: #!/bin/sh GVF=GIT-VERSION-FILE DEF_VER=v1.3.GIT # First try git-describe, then see if there is a version file # (included in release tarballs), then default if VN=$(git describe --abbrev=4 HEAD 2>/dev/null); then VN=$(echo "$VN" | sed -e 's/-/./g'); elif test -f version then VN=$(cat version) || VN="$DEF_VER" else VN="$DEF_VER" fi paolo@Italia:~/git$ git describe --abbrev=4 HEAD v1.3.3-g2186 but... paolo@Italia:~/git$ sudo git describe --abbrev=4 HEAD sudo: git: command not found that's because: paolo@Italia:~/git$ echo $PATH /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/bin/X11:/usr/games:/home/paolo/bin but... paolo@Italia:~/git$ sudo sh sh-3.1# echo $PATH /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/X11R6/bin Don't know whay $PATH are different but at least why I know why git has that strange behaviour. Ciao, -- Paolo http://paolociarrocchi.googlepages.com