git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: git --version

From
PCPaolo Ciarrocchi <paolo.ciarrocchi@gmail.com>
Date
May 31, 2006, 20:08 UTC
Message-ID
<4d8e3fd30605311308j6a784635g91e2721258f53c9f@mail.gmail.com>
In-Reply-To
<4d8e3fd30605311256o67e45d06ve0efeff65fcf4851@mail.gmail.com>
On 5/31/06, Paolo Ciarrocchi <paolo.ciarrocchi@gmail.com> wrote:
Show 25 quoted lines
> On 5/31/06, Paolo Ciarrocchi <paolo.ciarrocchi@gmail.com> 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
Previous: Linus TorvaldsNext: Linus Torvalds
Message 15 of 19 in “git --version”
  1. Paolo CiarrocchiMay 30, 2006
  2. Junio C HamanoMay 30, 2006
  3. Paolo CiarrocchiMay 31, 2006
  4. Junio C HamanoMay 31, 2006
  5. Paolo CiarrocchiMay 31, 2006
  6. Paolo CiarrocchiMay 31, 2006
  7. Linus TorvaldsMay 31, 2006
  8. Paolo CiarrocchiMay 31, 2006
  9. Paolo CiarrocchiMay 31, 2006
  10. Linus TorvaldsMay 31, 2006
  11. Paolo CiarrocchiMay 31, 2006
  12. Paolo CiarrocchiMay 31, 2006
  13. Paolo CiarrocchiMay 31, 2006
  14. Linus TorvaldsMay 31, 2006
  15. Paolo CiarrocchiMay 31, 2006
  16. Linus TorvaldsMay 31, 2006
  17. Paolo CiarrocchiMay 31, 2006
  18. Linus TorvaldsMay 31, 2006
  19. Paolo CiarrocchiMay 31, 2006

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.