git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Jeff King <peff@peff.net>
To: Michael Haggerty <mhagger@alum.mit.edu>
Cc: "Junio C Hamano" <gitster@pobox.com>,
	"Nguyễn Thái Ngọc Duy" <pclouds@gmail.com>,
	"Stefan Beller" <sbeller@google.com>,
	"Ævar Arnfjörð Bjarmason" <avarab@gmail.com>,
	"David Turner" <novalis@novalis.org>,
	"Brandon Williams" <bmwill@google.com>,
	"Johannes Sixt" <j6t@kdbg.org>, "Øyvind Holm" <sunny@sunbase.org>,
	"Linus Torvalds" <torvalds@linux-foundation.org>,
	git@vger.kernel.org
Subject: Re: [PATCH 0/2] Fix a refname trimming problem in `log --bisect`
Date: Wed, 14 Jun 2017 05:24:54 -0400	[thread overview]
Message-ID: <20170614092454.7mtaqnvhiho5yslx@sigill.intra.peff.net> (raw)
In-Reply-To: <cover.1497430232.git.mhagger@alum.mit.edu>

On Wed, Jun 14, 2017 at 11:07:25AM +0200, Michael Haggerty wrote:

> Fix the problem in two orthogonal ways:
> 
> 1. Add a new function, `for_each_fullref_in_submodule()`, that doesn't
>    trim the refnames that it passes to callbacks, and us that instead.
>    I *think* that this is a strict improvement, though I don't know
>    the `git log` code well enough to be sure that it won't have bad
>    side-effects.

I think this is fine, for the reasons I gave elsewhere in the thread.

> 2. Relax the "trimming too many characters" check to allow the full
>    length of the refname to be trimmed away (though not more than
>    that).
> 
> In an ideal world the second patch shouldn't be necessary, because
> this calling pattern is questionable and it might be better that we
> learn about any other offenders. But if we'd rather be conservative
> and not break any other code that might rely on the old behavior,
> patch 2 is my suggestion for how to do it.

My preference would be to hold off on (2) if we can avoid it. It's
cleaner, and I think flushing out these kinds of bugs is useful.

-Peff

  parent reply	other threads:[~2017-06-14  9:25 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-14  0:06 [BUG] b9c8e7f2fb6e breaks git bisect visualize Øyvind A. Holm
2017-06-14  8:36 ` Michael Haggerty
2017-06-14  9:07   ` [PATCH 0/2] Fix a refname trimming problem in `log --bisect` Michael Haggerty
2017-06-14  9:07     ` [PATCH 1/2] for_each_bisect_ref(): don't trim refnames Michael Haggerty
2017-06-14  9:22       ` Jeff King
2017-06-14  9:32         ` Jeff King
2017-06-14 10:05           ` Junio C Hamano
2017-06-15 22:26       ` Junio C Hamano
2017-06-14  9:07     ` [PATCH 2/2] prefix_ref_iterator_advance(): relax the check of trim length Michael Haggerty
2017-06-14  9:24     ` Jeff King [this message]
2017-06-14 10:09     ` [PATCH 0/2] Fix a refname trimming problem in `log --bisect` Junio C Hamano
2017-06-14  9:18   ` [BUG] b9c8e7f2fb6e breaks git bisect visualize Jeff King

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

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170614092454.7mtaqnvhiho5yslx@sigill.intra.peff.net \
    --to=peff@peff.net \
    --cc=avarab@gmail.com \
    --cc=bmwill@google.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=j6t@kdbg.org \
    --cc=mhagger@alum.mit.edu \
    --cc=novalis@novalis.org \
    --cc=pclouds@gmail.com \
    --cc=sbeller@google.com \
    --cc=sunny@sunbase.org \
    --cc=torvalds@linux-foundation.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.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).