git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Philippe Blain <levraiphilippeblain@gmail.com>
Cc: Git mailing list <git@vger.kernel.org>
Subject: Re: FETCH_HEAD format is undocumented
Date: Mon, 16 Nov 2020 11:03:39 -0800	[thread overview]
Message-ID: <xmqq7dql9l9w.fsf@gitster.c.googlers.com> (raw)
In-Reply-To: <218FCFFA-1F4F-42DE-B32D-D7C731813206@gmail.com> (Philippe Blain's message of "Mon, 16 Nov 2020 12:13:42 -0500")

Philippe Blain <levraiphilippeblain@gmail.com> writes:

> While trying to use `git fmt-merge-msg`, I figured it only accepts
> inputs in the format used in the 'FETCH_HEAD' file.
>
> I then tried to find a description of the format of this file in the documentation, 
> but could not find any. For example, 'git grep not-for-merge' in /Documentation
> returns a single hit, in the release notes for Git 2.5.0.
>
> I think it could be good if we documented the FETCH_HEAD format.

Not just the format of FETCH_HEAD file, but the whole usage of
fmt-merge-msg is meant as a mere implementation detail of the
one-way communication from "git fetch" to "git merge".  I'd rather
leave it opaque so that we can update the format as needed.  For one
thing it is impossible to do i18n with the current format, I think,
which some folks may eventually want to change.

I am OK with documenting it somewhere in Documentation/technical/
with a warning written in big red letters that it is subject to
change, to clearly mark that the format of the file should not be
relied upon and the only useful thing you could do is to rely on the
fact that its first 40-byte gives one object name (so you could say
"git log ...FETCH_HEAD" for example) and to feed it to "git merge".



      reply	other threads:[~2020-11-16 19:05 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-16 17:13 FETCH_HEAD format is undocumented Philippe Blain
2020-11-16 19:03 ` Junio C Hamano [this message]

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=xmqq7dql9l9w.fsf@gitster.c.googlers.com \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=levraiphilippeblain@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.
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).