From: Luciano Rocha <luciano@eurotux.com>
To: Pascal Obry <pascal@obry.net>
Cc: git list <git@vger.kernel.org>
Subject: Re: something fishy with Git commit and log from file
Date: Wed, 6 Aug 2008 11:44:32 +0100 [thread overview]
Message-ID: <20080806104432.GG7121@bit.office.eurotux.com> (raw)
In-Reply-To: <48997D2E.9030708@obry.net>
[-- Attachment #1: Type: text/plain, Size: 1333 bytes --]
On Wed, Aug 06, 2008 at 12:30:06PM +0200, Pascal Obry wrote:
>
> 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 artifact. The breakpoint info shows the correct value.
Could you at that point run the following?
(gdb) p get_current_dir_name()
$1 = ... "..."
If the returned value doesn't match the directory you were in, then
there's a bug in git.
If the function doesn't exist, try:
(gdb) p getwd(malloc(2048))
Regards,
Luciano Rocha
--
Luciano Rocha <luciano@eurotux.com>
Eurotux Informática, S.A. <http://www.eurotux.com/>
[-- Attachment #2: Type: application/pgp-signature, Size: 197 bytes --]
next prev parent reply other threads:[~2008-08-06 10:45 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-08-06 10:30 something fishy with Git commit and log from file Pascal Obry
2008-08-06 10:44 ` Luciano Rocha [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20080806104432.GG7121@bit.office.eurotux.com \
--to=luciano@eurotux.com \
--cc=git@vger.kernel.org \
--cc=pascal@obry.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).