git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Felipe Contreras" <felipe.contreras@gmail.com>
To: "Junio C Hamano" <gitster@pobox.com>
Cc: git@vger.kernel.org
Subject: Re: [PATCH 1/1] fast-import: show a warning for non-existent files.
Date: Tue, 2 Sep 2008 00:58:59 +0300	[thread overview]
Message-ID: <94a0d4530809011458r25f73f49web2c3ae601a5544d@mail.gmail.com> (raw)
In-Reply-To: <7vwshvvgap.fsf@gitster.siamese.dyndns.org>

On Mon, Sep 1, 2008 at 10:04 PM, Junio C Hamano <gitster@pobox.com> wrote:
> Felipe Contreras <felipe.contreras@gmail.com> writes:
>
>> This is useful in certain SCMs like monotone, where each 'merge revision' has
>> the changes of all the micro-branches merged. So it appears as duplicated commands.
>
> The patch appears to add warning to when you try to 'D'elete something
> that should not exist in the revision, whose moral equivalents are
> implemented in the codepath to deal with 'R'enaming and 'C'opying an
> non-existent path.
>
> But instead of making it die(), it merely warns, and even worse, you are
> demoting an existing die() in Rename/Copy codepath to mere warning
> unconditionally.  Why?

Right, I tried to do two things at once. I thought adding the code in
'D'elete in a separate branch was too much separation for such a
trivial thing.

> "This" that begins your proposed commit log message needs to be clarified,
> but I am guessing that you are defending your change to demote existing
> error check to die on inconsistent input to a mere warning.  I do not find
> it a particularly good defending argument.  It sounds more like you are
> papering over bugs in _one_ broken converter that produces and feeds an
> incorrect input to fast-import, breaking a safety valve for everybody else.

In monotone you can have something like:

 A
/ \
B D
| |
C E
\ /
 F

If you do a 'delete foo' in B, and a 'delete bar' in F, you will get
this stored in the merge revision (F):

old_revision [C]
delete "foo"
delete "bar"

old_revision [E]
delete "bar"

All the changes of the merged branches are stored again in the merge revision.

I guess ideally my converter should check which changes appear on both
branches, and only apply those. Of course, only on revisions that are
merges.
That complicates the code quite a lot. I tried it and it didn't work
quite well (I did something wrong).

So I tried to workaround this in fast-import, and it's simple, and it works.

<snip/>

-- 
Felipe Contreras

  reply	other threads:[~2008-09-01 22:00 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-09-01 13:20 [PATCH 1/1] fast-import: show a warning for non-existent files Felipe Contreras
2008-09-01 19:04 ` Junio C Hamano
2008-09-01 21:58   ` Felipe Contreras [this message]
2008-09-01 19:25 ` Shawn O. Pearce
2008-09-01 22:01   ` Felipe Contreras
2008-09-01 22:30     ` [PATCH] fast-import: add ignore non-existent files option Felipe Contreras
2008-09-01 22:38       ` Shawn O. Pearce
2008-09-01 22:52         ` Felipe Contreras
2008-09-02  4:39           ` Shawn O. Pearce
2008-09-02  4:53             ` Junio C Hamano
2008-09-02  5:35               ` Shawn O. Pearce
2008-09-02  7:36                 ` Junio C Hamano
2008-09-02  7:48                   ` Felipe Contreras
2008-09-01 23:04       ` Junio C Hamano
2008-09-01 23:25         ` Felipe Contreras
2008-09-02  2:07           ` Junio C Hamano
2008-09-02  7:57             ` Felipe Contreras

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=94a0d4530809011458r25f73f49web2c3ae601a5544d@mail.gmail.com \
    --to=felipe.contreras@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.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).