From: Jonathan Nieder <jrnieder@gmail.com>
To: Peter Baumann <waste.manager@gmx.de>
Cc: Junio C Hamano <gitster@pobox.com>,
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 v4] fast-import: treat filemodify with empty tree as delete
Date: Thu, 27 Jan 2011 13:48:45 -0600 [thread overview]
Message-ID: <20110127194844.GA20894@burratino> (raw)
In-Reply-To: <20110127193353.GA19378@m62s10.vlinux.de>
Peter Baumann wrote:
> On Thu, Jan 27, 2011 at 12:07:49AM -0600, Jonathan Nieder wrote:
>> +++ b/t/t9300-fast-import.sh
>> @@ -818,6 +818,48 @@ test_expect_success \
>> compare_diff_raw expect actual'
>>
>> +test_expect_success \
>> + 'N: delete directory by copying' \
>> + 'cat >expect <<-\EOF &&
>> + OBJID
>> + :100644 000000 OBJID OBJID D foo/bar/qux
>> + OBJID
>> + :000000 100644 OBJID OBJID A foo/bar/baz
>> + :000000 100644 OBJID OBJID A foo/bar/qux
>> + EOF
>> + empty_tree=$(git mktree </dev/null) &&
>
> [ Feel free to ignore me ... ]
>
> Just a (stupid?) suggestion: Why not put a $EMPTY_TREE definiton in test-lib.sh
> (or any other global file sourced in the tests) so if another caller needs this
> definition it won't waste cpu cycles doing the calculation via mktree < /dev/null
> again?
Might be a good idea. Note, though, that that would mean more cpu
cycles used rather than less, unless we hardcode the object name
(which I prefer not to do).
One possibility would be a lib-object-names.sh defining EMPTY_BLOB and
EMPTY_TREE to be sourced by tests that need it.
next prev parent reply other threads:[~2011-01-27 19:49 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
2011-01-27 6:07 ` [PATCH v4] " Jonathan Nieder
2011-01-27 19:33 ` Peter Baumann
2011-01-27 19:48 ` Jonathan Nieder [this message]
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=20110127194844.GA20894@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 \
--cc=waste.manager@gmx.de \
/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).