git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Derrick Stolee <stolee@gmail.com>
To: Michael Haggerty <mhagger@alum.mit.edu>,
	Junio C Hamano <gitster@pobox.com>
Cc: Jeff King <peff@peff.net>,
	git@vger.kernel.org, ethomson@edwardthomson.com
Subject: Re: [RFC 0/1] Tolerate broken headers in `packed-refs` files
Date: Mon, 26 Mar 2018 09:08:04 -0400	[thread overview]
Message-ID: <f8d0f3b6-69b3-ba42-c39c-551814caf335@gmail.com> (raw)
In-Reply-To: <cover.1522062649.git.mhagger@alum.mit.edu>

On 3/26/2018 8:42 AM, Michael Haggerty wrote:
> [...]
>
> But there might be some tools out in the wild that have been writing
> broken headers. In that case, users who upgrade Git might suddenly
> find that they can't read repositories that they could read before. In
> fact, a tool that we wrote and use internally at GitHub was doing
> exactly that, which is how we discovered this "problem".
>
> This patch shows what it would look like to relax the parsing again,
> albeit *only* for the first line of the file, and *only* for lines
> that start with '#'.
>
> The problem with this patch is that it would make it harder for people
> who implement broken tools in the future to discover their mistakes.
> The only result of the error would be that it is slower to work with
> the `packed-refs` files that they wrote. Such an error could go
> undiscovered for a long time.

My opinion is that we shouldn't maintain back-compat with formats that 
may have been written by another tool because Git wasn't strict about 
it. As long as Git never wrote files with these formats, then they 
shouldn't be supported.

You are absolutely right that staying strict will help discover the 
tools that are writing an incorrect format.

Since most heavily-used tools that didn't spawn Git processes use 
LibGit2 to interact with Git repos, I added Ed Thomson to CC to see if 
libgit2 could ever write these bad header comments.

Thanks for writing this RFC so we can have the discussion and more 
quickly identify this issue if/when users are broken.

Thanks,
-Stolee

  parent reply	other threads:[~2018-03-26 13:08 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-26 12:42 [RFC 0/1] Tolerate broken headers in `packed-refs` files Michael Haggerty
2018-03-26 12:42 ` [RFC 1/1] packed-backend: ignore broken headers Michael Haggerty
2018-03-26 13:08 ` Derrick Stolee [this message]
2018-03-26 14:33   ` [RFC 0/1] Tolerate broken headers in `packed-refs` files Jeff King
2018-03-26 14:33   ` Edward Thomson

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=f8d0f3b6-69b3-ba42-c39c-551814caf335@gmail.com \
    --to=stolee@gmail.com \
    --cc=ethomson@edwardthomson.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=mhagger@alum.mit.edu \
    --cc=peff@peff.net \
    /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).