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

Re: git svn errors out with git-cat-file "usage" message

From
Michael J Gruber <git@drmicha.warpmail.net>
Date
Apr 30, 2009, 08:46 UTC
Message-ID
<49F9655B.6070302@drmicha.warpmail.net>
In-Reply-To
<49F960A5.5090801@op5.se>
Andreas Ericsson venit, vidit, dixit 30.04.2009 10:26:
Show 30 quoted lines
> Martin Langhoff wrote:
>> On Wed, Apr 29, 2009 at 11:05 PM, Michael J Gruber
>> <git@drmicha.warpmail.net> wrote:
>>> But I just re-read your original report, and there's some inconsistency:
>>>
>>> git-svn triggers cat-file's usage message which says "git-cat-file ...".
>>> The dash indicates that it is a git cat-file before v1.6.0.1-13-g34baebc
>>> (where the dash was removed), so it's definitely not the current maint
>>> you think you are using.
>>>
>>> Do you have older ubuntu git packages installed in $PATH?
>>
>> Bingo! Yes,
>>
>> ~$ which git-cat-file
>> /usr/bin/git-cat-file
>> ~$ /usr/bin/git version
>> git version 1.5.6.3
>>
>> now that's really weird. git from ~/bin is using git-cat-file from
>> /usr/bin instead of ~/libexec/git-core ... how is the libexec path set
>> in the PATH during the execution of the script?
>>
> 
> If you're executing "git-svn", the "git-svn" found first in your $PATH
> will be used. Same with "git" really, so if you have a $PATH like this:
> 
>   PATH=/usr/bin:$(HOME)/bin
> 
> you will always use the git from /usr/bin (naturally).

But he wrote he executed "git svn", and "git --version" showed the more current version. So it can't be a PATH issue. It may be PERL5LIB, though.

Show 13 quoted lines
> 
>> the funny thing is that Ubuntu wants to have git-core in place if
>> you're rebuilding kernel packages. I don't need to rebuild my kernel
>> anymore but I am sure this is an issue for others. What's the trick?
>> Add the libexec/git-core to the PATH before /usr/bin? Should git
>> internally append libexec/git-core earlier in the search path?
>>
> 
> The possibly easiest solution to your particular problem is to just
> remove the files installed by the git-core package and then log out
> and back in (to clear any persistent shell cache). You may need to
> mark git-core as not updateable in your apt config.
> 
Previous: Andreas EricssonNext: Martin Langhoff
Message 9 of 17 in “git svn errors out with git-cat-file "usage" message”
  1. Martin LanghoffApr 29, 2009
  2. Avery PennarunApr 29, 2009
  3. Michael J GruberApr 29, 2009
  4. Martin LanghoffApr 29, 2009
  5. Michael J GruberApr 29, 2009
  6. Martin LanghoffApr 30, 2009
  7. Michael J GruberApr 30, 2009
  8. Andreas EricssonApr 30, 2009
  9. Michael J GruberApr 30, 2009
  10. Martin LanghoffApr 30, 2009
  11. Michael J GruberApr 30, 2009
  12. Martin LanghoffApr 30, 2009
  13. Avery PennarunApr 30, 2009
  14. Martin LanghoffApr 30, 2009
  15. Avery PennarunApr 30, 2009
  16. Martin LanghoffApr 30, 2009
  17. Michael J GruberApr 30, 2009

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.