From: "Shawn O. Pearce" <spearce@spearce.org>
To: Junio C Hamano <gitster@pobox.com>
Cc: Felipe Contreras <felipe.contreras@gmail.com>, git@vger.kernel.org
Subject: Re: [PATCH 2/2] fast-import: add special '-' blob reference to use the previous one.
Date: Sun, 21 Dec 2008 14:33:35 -0800 [thread overview]
Message-ID: <20081221223335.GF17355@spearce.org> (raw)
In-Reply-To: <7vlju9kvyg.fsf@gitster.siamese.dyndns.org>
Junio C Hamano <gitster@pobox.com> wrote:
> "Shawn O. Pearce" <spearce@spearce.org> writes:
>
> > Hmph, so if create a new path with a blob of "-" the repository
> > will be corrupt because the zero id was used and error was produced.
> >
> > Actually I think you have the same bug in the prior patch with the
> > mode being inherited. I wonder if we shouldn't put error checking
> > in too to validate that versions[0] describes a file entry.
>
> Why are these patches necessary?
>
> The proposed commit message describes what it does, but does not give hint
> to even guess being able to use this new feature helps in what situation.
> As far as I can see, these changes allow the exporter to say "this aspect
> of the new data is the same as the previous one", but I thought that the
> way in which fast-import works already revolves around "you have this
> tree, and the next tree is different from it in this and that way." Why
> does one need be able to mention "this is the same as the previous one"
> explicitly in the first place?
Hmm. Actually, imagine you were dumping from git-diff output style
stream into a fast-import stream.
If a file changes only content, the mode is shown in the index line.
Yay us. But what if the index line wasn't present in the diff? You
don't know the prior mode of the file, but you do have its content.
If a file changes only mode, we get no content hints in the diff.
How do you send that into fast-import without making the frontend
keep track of every path's current mode?
Though I agree, these details should be described in the commit
messages, not left as an exercise for the maintainer to make up.
--
Shawn.
next prev parent reply other threads:[~2008-12-21 22:34 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-12-21 2:11 [PATCH 1/2] fast-import: add special mode; copy from parent Felipe Contreras
2008-12-21 2:11 ` [PATCH 2/2] fast-import: add special '-' blob reference to use the previous one Felipe Contreras
2008-12-21 22:11 ` Shawn O. Pearce
2008-12-21 22:24 ` Junio C Hamano
2008-12-21 22:33 ` Shawn O. Pearce [this message]
2008-12-22 2:10 ` Felipe Contreras
2008-12-22 2:08 ` Felipe Contreras
2008-12-21 22:07 ` [PATCH 1/2] fast-import: add special mode; copy from parent Shawn O. Pearce
2008-12-22 2:23 ` Felipe Contreras
2008-12-22 2:25 ` 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=20081221223335.GF17355@spearce.org \
--to=spearce@spearce.org \
--cc=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).