Thread (16 messages) flat view 16 messages, 3 authors, 2016-06-15

Re: git --version

From: Paolo Ciarrocchi <hidden>
Date: 2016-06-15 22:42:28

On 5/31/06, Paolo Ciarrocchi [off-list ref] wrote:
On 5/31/06, Paolo Ciarrocchi [off-list ref] wrote:
[...]
quoted
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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help