git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Elijah Newren <newren@gmail.com>
To: Git Mailing List <git@vger.kernel.org>
Cc: "Shawn O. Pearce" <spearce@spearce.org>
Subject: Re: fast-import, merges, and file changes -- lack of clarity in docs,  possible minor bug, or PEBKAC?
Date: Mon, 16 Feb 2009 22:47:09 -0700	[thread overview]
Message-ID: <51419b2c0902162147y588ad4dfk58271f3434dea66c@mail.gmail.com> (raw)
In-Reply-To: <51419b2c0902161628x7a3475e6p2a70310e5b294444@mail.gmail.com>

I think I've at least partially discovered the answer my own
question(s), so I figured I'd document them in case anyone else was
wondering...

On Mon, Feb 16, 2009 at 5:28 PM, Elijah Newren <newren@gmail.com> wrote:
> It appears the documentation for fast-import does not specify the
> basis on which a commit command's file changes (filemodify,
> filedelete, filecopy, or filerename) are relative to.
<snip>
> Is this intentional?  I believe we could change this behavior without
> breaking backward compatibility with older fast-export output streams,
> since such older streams would simply be providing redundant
> information.  But is there a reason for this behavior that I'm
> missing?

It is documented...though implicitly in discussion of other commands.
In particular, "...a `merge` command may be used instead of `from` to
start the commit with an empty tree" and later "If the `from` command
is omitted when creating a new branch, the first `merge` commit will
be the first ancestor of the current commit, and the branch will start
out with no files."  This implies that the files of a `merge` parent
are ignored and any content must from that parent that is contained in
the commit must be explicitly spelled out to be included.

Also, as far as backward compatibility, my suggestion would not be
compatible; deletions involved in such merges would be handled by
current fast-export streams by simply omitting the file in the list of
file changes in the merge commit.  My suggestion would require
explicitly specified file deletion to ensure its removal.

So, it appears this is intentional, any behavior change such as I
suggested would require different/new syntax, and would require
support in fast-export too for my purposes.  That certainly makes my
git-fast-filter script (a script in a pipeline between fast-export and
fast-import designed to act somewhat like filter-branch but with
better performance on my large repositories) much harder.  Oh, well.


Elijah

      reply	other threads:[~2009-02-17  5:48 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-02-17  0:28 fast-import, merges, and file changes -- lack of clarity in docs, possible minor bug, or PEBKAC? Elijah Newren
2009-02-17  5:47 ` Elijah Newren [this message]

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=51419b2c0902162147y588ad4dfk58271f3434dea66c@mail.gmail.com \
    --to=newren@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=spearce@spearce.org \
    /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).