git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff King <peff@peff.net>
To: Elijah Newren <newren@gmail.com>
Cc: git@vger.kernel.org, Johannes.Schindelin@gmx.de, kusmabite@gmail.com
Subject: Re: [PATCH 1/7] fast-export: Omit tags that tag trees
Date: Sat, 20 Jun 2009 14:52:37 -0400	[thread overview]
Message-ID: <20090620185236.GA8847@coredump.intra.peff.net> (raw)
In-Reply-To: <51419b2c0906201101u2f8e6981q84ab7acc13dc9135@mail.gmail.com>

On Sat, Jun 20, 2009 at 12:01:00PM -0600, Elijah Newren wrote:

> I don't see how we could do something similar for the tree case
> without making some significant change to the output/input of both
> fast-export and fast-import.  Tag objects are part of the output of
> fast-export, thus we can add a mark line to give the object a name and
> thus provide us a valid mark we can make the outer tag point to.
> Trees are not output by fast-export (other than implicitly by
> including files in commits), so we have nothing to point such a tag
> at.  If we were to do something like use the full sha1sum instead of

Ah, right. That falls under the "I didn't look at this too closely" part
of my previous message. :)

It does seem a shame not to be able to say "and now here is a tree" in
the same way we say "and now here is a commit". And since that is not
possible without add-ons that might cause compatibility issues, your fix
seems reasonable to at least avoid generating bogus output.

Another option would be to generate a pseudo-commit with no parentage
that holds the tree, and then point the tag at that. It's obviously not
exactly what the user wanted, but neither is simply omitting. You could
even mark the commit message with a "THIS IS REALLY A TREE" magic
string, and then have fast-import recognize and convert those back to a
tree (by just peeling the commit away).

-Peff

  reply	other threads:[~2009-06-20 18:54 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-06-20  4:36 A few fast-export fixups newren
2009-06-20  4:36 ` [PATCH 1/7] fast-export: Omit tags that tag trees newren
2009-06-20 17:31   ` Jeff King
2009-06-20 18:01     ` Elijah Newren
2009-06-20 18:52       ` Jeff King [this message]
2009-06-20  4:36 ` [PATCH 2/7] Modify fast-export testcase to check that we correctly omit tags of trees newren
2009-06-21  5:53   ` Stephen Boyd
2009-06-21  6:17   ` Johannes Sixt
2009-06-22 13:12     ` Elijah Newren
2009-06-20  4:36 ` [PATCH 3/7] fast-export: Make sure we show actual ref names instead of "(null)" newren
2009-06-20  4:37 ` [PATCH 4/7] fast-export: Do parent rewriting to avoid dropping relevant commits newren
2009-06-20  4:37 ` [PATCH 5/7] fast-export: Add a --tag-of-filtered-object option for newly dangling tags newren
2009-06-20  4:37 ` [PATCH 6/7] Add new fast-export testcases newren
2009-06-20  4:37 ` [PATCH 7/7] fast-export: Document the fact that git-rev-list arguments are accepted newren

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=20090620185236.GA8847@coredump.intra.peff.net \
    --to=peff@peff.net \
    --cc=Johannes.Schindelin@gmx.de \
    --cc=git@vger.kernel.org \
    --cc=kusmabite@gmail.com \
    --cc=newren@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).