From: Jonathan Nieder <jrnieder@gmail.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: Sverre Rabbelier <srabbelier@gmail.com>,
Git Mailing List <git@vger.kernel.org>,
Ramkumar Ramachandra <artagnon@gmail.com>,
"Shawn O. Pearce" <spearce@spearce.org>,
David Barr <david.barr@cordelta.com>
Subject: Re: [PATCH jn/fast-import-fix v3] fast-import: treat filemodify with empty tree as delete
Date: Wed, 26 Jan 2011 18:26:07 -0600 [thread overview]
Message-ID: <20110127002607.GA30911@burratino> (raw)
In-Reply-To: <7vd3nji54o.fsf@alter.siamese.dyndns.org>
Junio C Hamano wrote:
> Jonathan Nieder <jrnieder@gmail.com> writes:
>> Hmm. I suppose on top of b2124125 (jn/fast-import-fix).
>
> Hmm, why not on top of v1.7.3-rc0~75^2 aka 334fba6 (Teach fast-import to
> import subtrees named by tree id, 2010-06-30) then?
That could work, too. ;-)
I was too lazy to check if the test case happens to work in the
absence of the fixes from the fast-import-fix branch.
>> +++ b/fast-import.c
>> @@ -2194,6 +2194,16 @@ static void file_change_m(struct branch *b)
>> p = uq.buf;
>> }
>>
>> + /*
>> + * Git does not track empty, non-toplevel directories.
>> + */
>> + if (S_ISDIR(mode) &&
>> + !memcmp(sha1, (const unsigned char *) EMPTY_TREE_SHA1_BIN, 20) &&
>
> Do you need this cast?
No, it's not needed.
(EMPTY_TREE_SHA1_BIN is a string constant, originally intended for
use in initializers like
static const unsigned char empty_tree_sha1[20] = EMPTY_TREE_SHA1_BIN;
memcmp does not care about such considerations.)
next prev parent reply other threads:[~2011-01-27 0:32 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-12-02 10:40 [PATCH/RFC] fast-import: add 'ls' command David Barr
2010-12-02 10:40 ` [PATCH] " David Barr
2010-12-02 12:37 ` Sverre Rabbelier
2010-12-02 12:57 ` David Michael Barr
2010-12-02 17:37 ` Jonathan Nieder
2010-12-02 19:20 ` Junio C Hamano
2010-12-02 22:51 ` David Barr
2011-01-03 8:01 ` [PATCH/RFC v2 0/3] " Jonathan Nieder
2011-01-03 8:22 ` [PATCH 1/3] fast-import: clarify handling of cat-blob feature Jonathan Nieder
2011-01-03 8:24 ` [PATCH 2/3] fast-import: treat filemodify with empty tree as delete Jonathan Nieder
2011-01-26 22:41 ` [PATCH v2] " Jonathan Nieder
2011-01-26 22:45 ` Sverre Rabbelier
2011-01-26 23:06 ` [PATCH jn/fast-import-fix v3] " Jonathan Nieder
2011-01-27 0:04 ` Junio C Hamano
2011-01-27 0:26 ` Jonathan Nieder [this message]
2011-01-27 6:07 ` [PATCH v4] " Jonathan Nieder
2011-01-27 19:33 ` Peter Baumann
2011-01-27 19:48 ` Jonathan Nieder
2011-01-27 20:46 ` Peter Baumann
2011-01-27 20:48 ` Peter Baumann
2011-01-28 17:13 ` Jonathan Nieder
2011-01-03 8:37 ` [PATCH 3/3] fast-import: add 'ls' command Jonathan Nieder
2011-01-26 21:39 ` [RFC] fast-import: 'cat-blob' and 'ls' commands Jonathan Nieder
2011-01-26 23:46 ` Sam Vilain
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=20110127002607.GA30911@burratino \
--to=jrnieder@gmail.com \
--cc=artagnon@gmail.com \
--cc=david.barr@cordelta.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=spearce@spearce.org \
--cc=srabbelier@gmail.com \
/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).