Hi,
On Fri, Aug 17, 2018 at 12:12:29PM +0100, Iain Lane wrote:
> On Fri, Aug 17, 2018 at 01:04:34PM +0200, Guido Günther wrote:
> > We do that to get the last used compression type. If we do a ls-tree
> > or even `pristine-tar list` we have no ordering.
> 
> Interesting. I was imagining (without checking!) that you'd be
> interested in the compression a particular file had, not the last one.

Not the last one in general but the last on for that version
(guess_comp_type in export_orig). Sometimes people import-orig and then
notice they used the wrong compression type and import again without
cleaning up the pristine-tar branch so we want to pick the last one
used.
> 
> > Patch is mostly good but we must not break other grep_log users so
> > changing the signature to
> > 
> >      def grep_log(self, regex, since=None, merges=True):
> > 
> > and calling it with False in your case would be the right thing. I try
> > to get around to add this before the next release (which is long overdue
> > too).
> 
> I checked both call sites: get_commit() and guess_comp_type(). The
> second one is the direct cause of this bug, but it looks to me like the
> second one would be OK with this fix too. AFAICS it is ultimately used
> to determine if we should pristine-tar commit a file or skip it because
> it already exists. In that case we shouldn't look for the merge commit
> either, or?
> 
> Ah, maybe you're saying this is API and we shouldn't change semantics
> for external users?

Yeah, exactly. There are some external uses and we don't want to break
API for them.

Cheers,
 -- Guido

Reply via email to