From: Linus Torvalds <torvalds@osdl.org>
To: Petr Baudis <pasky@suse.cz>
Cc: Junio C Hamano <junkio@cox.net>, git@vger.kernel.org
Subject: Re: [PATCH] Fix broken sha1 locking
Date: Tue, 19 Sep 2006 14:16:04 -0700 (PDT) [thread overview]
Message-ID: <Pine.LNX.4.64.0609191411460.4388@g5.osdl.org> (raw)
In-Reply-To: <20060919205823.18579.59604.stgit@machine.or.cz>
On Tue, 19 Sep 2006, Petr Baudis wrote:
>
> Current git#next is totally broken wrt. cloning over HTTP, generating refs
> at random directories. Of course it's caused by the static get_pathname()
> buffer. lock_ref_sha1() stores return value of mkpath()'s get_pathname()
> call, then calls lock_ref_sha1_basic() which calls git_path(ref) which
> calls get_pathname() at that point returning pointer to the same buffer.
Hmm. This was exactly the schenario why I did commit
e7676d2f6454c9c99e600ee2ce3c7205a9fcfb5f - allowing a couple of
overlapping paths
Isn't that in the "next" branch too?
Of course, that still assumes that you strdup() the result at _some_ time,
and can't just save it away, but lock_ref_sha1_basic() should do that.
Linus
next prev parent reply other threads:[~2006-09-19 21:16 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-09-19 20:58 [PATCH] Fix broken sha1 locking Petr Baudis
2006-09-19 21:16 ` Linus Torvalds [this message]
2006-09-19 21:23 ` Petr Baudis
2006-09-19 22:10 ` Linus Torvalds
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=Pine.LNX.4.64.0609191411460.4388@g5.osdl.org \
--to=torvalds@osdl.org \
--cc=git@vger.kernel.org \
--cc=junkio@cox.net \
--cc=pasky@suse.cz \
/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).