Re: git --version

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 5/31/06, Paolo Ciarrocchi <paolo.ciarrocchi@xxxxxxxxx> wrote:
On 5/31/06, Paolo Ciarrocchi <paolo.ciarrocchi@xxxxxxxxx> 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:

<PaoloC> paolo@Italia:~/git$ sudo ./GIT-VERSION-GEN
<PaoloC> GIT_VERSION = 1.3.GIT
<PaoloC> paolo@Italia:~/git$ ./GIT-VERSION-GEN
<PaoloC> 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
-
: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]