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

Re: something fishy with Git commit and log from file

From
Pascal Obry <pascal@obry.net>
Date
Aug 6, 2008, 11:01 UTC
Message-ID
<4899848C.6030800@obry.net>
In-Reply-To
<20080806104432.GG7121@bit.office.eurotux.com>
Luciano,
> If the function doesn't exist, try:
> (gdb) p getwd(malloc(2048))
I got:

(gdb) p (char *)getwd(malloc(2048)) $3 = 0x903680 "/home/obry/dev/repositories/git/AWS"

And this is not the directory I was in. It is the Git root. I was under /home/obry/dev/repositories/git/AWS/regtests when running the command.

So definitely a Git bug! Can be reproduced with:
    $ mkdir repo && cd repo
    $ git init
    $ mkdir dir
    $ cd dir
    $ echo file > file
    $ echo log > log
    $ git add file
    $ git commit --file=log
    fatal: could not read log file 'log': No such file or directory
Pascal.
-- 
--|------------------------------------------------------
--| Pascal Obry                           Team-Ada Member
--| 45, rue Gabriel Peri - 78114 Magny Les Hameaux FRANCE
--|------------------------------------------------------
--|              http://www.obry.net
--| "The best way to travel is by means of imagination"
--|
--| gpg --keyserver wwwkeys.pgp.net --recv-key C1082595
Previous: Luciano RochaNext: Junio C Hamano
Message 3 of 15 in “something fishy with Git commit and log from file”
  1. Pascal ObryAug 6, 2008
  2. Luciano RochaAug 6, 2008
  3. Pascal ObryAug 6, 2008
  4. Junio C HamanoAug 6, 2008
  5. Pascal ObryAug 6, 2008
  6. Junio C HamanoAug 6, 2008
  7. Pascal ObryAug 6, 2008
  8. files given on the command line are relative to $cwdJunio C Hamano, Aug 6, 2008
  9. Olivier MarinAug 6, 2008
  10. Junio C HamanoAug 6, 2008
  11. Junio C HamanoAug 6, 2008
  12. Pierre HabouzitAug 6, 2008
  13. Samuel TardieuAug 7, 2008
  14. Luciano RochaAug 7, 2008
  15. Junio C HamanoAug 7, 2008

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.