git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* something fishy with Git commit and log from file
@ 2008-08-06 10:30 Pascal Obry
  2008-08-06 10:44 ` Luciano Rocha
  0 siblings, 1 reply; 15+ messages in thread
From: Pascal Obry @ 2008-08-06 10:30 UTC (permalink / raw)
  To: git list


The following command fails on my repository:

    $ git commit --file=clog
    fatal: could not read log file 'clog': No such file or directory

    $ cat clog
    toto

Using the following command the commit pass without problem:

    $ cat clog | git commit --file=-

With GDB I get:

$ gdb --args git ci --file=clog
This GDB was configured as "i686-pc-cygwin"...
(gdb) break strbuf_read_file
Breakpoint 1 at 0x44e64a: file strbuf.c, line 301.
(gdb) run
Starting program: /usr/local/bin/git.exe ci --file=clog

Breakpoint 1, strbuf_read_file (sb=0x22cac0, path=0x22ccfa "clog", 
hint=0) at strbuf.c:301
301             fd = open(path, O_RDONLY);
(gdb) print path
$1 = 0x0

???? outch, this is strange, or a gdb artifact?

(gdb) n
302             if (fd < 0)
(gdb) print fd
$2 = -1
(gdb) print *0x22ccfa
$3 = 1735355491
(gdb) print (char)*0x22ccfa
$4 = 99 'c'
(gdb) print (char)*0x22ccfb
$5 = 108 'l'
(gdb) print (char)*0x22ccfc
$6 = 111 'o'
(gdb) print (char)*0x22ccfd
$7 = 103 'g'
(gdb) print (char)*0x22ccfe
$8 = 0 '\0'

But looks like path really contains 'clog'!!!

No luck for now to find the problem. Note that the same command pass 
fine on other repositories. At this point this looks really like some 
kind of memory corruption...

I'm on Windows, using Git for Cygwin and the compiler is:

$ gcc --version
gcc (GCC) 3.4.4 (cygming special, gdc 0.12, using dmd 0.125)

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

^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2008-08-07 13:04 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-08-06 10:30 something fishy with Git commit and log from file Pascal Obry
2008-08-06 10:44 ` Luciano Rocha
2008-08-06 11:01   ` Pascal Obry
2008-08-06 15:38     ` Junio C Hamano
2008-08-06 16:28       ` Pascal Obry
2008-08-06 16:50         ` Junio C Hamano
2008-08-06 17:08           ` Pascal Obry
2008-08-06 18:43           ` [PATCH] files given on the command line are relative to $cwd Junio C Hamano
2008-08-06 20:14             ` Olivier Marin
2008-08-06 20:19               ` Junio C Hamano
2008-08-06 20:59                 ` Junio C Hamano
2008-08-06 20:40             ` Pierre Habouzit
2008-08-07  8:45             ` Samuel Tardieu
2008-08-07  9:03               ` Luciano Rocha
2008-08-07  9:47                 ` Junio C Hamano

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).