From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-Status: No, score=-3.9 required=3.0 tests=AWL,BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_PASS,SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by dcvr.yhbt.net (Postfix) with ESMTP id 70E491F66F for ; Mon, 16 Nov 2020 19:05:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727518AbgKPTDn (ORCPT ); Mon, 16 Nov 2020 14:03:43 -0500 Received: from pb-smtp2.pobox.com ([64.147.108.71]:59169 "EHLO pb-smtp2.pobox.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725879AbgKPTDn (ORCPT ); Mon, 16 Nov 2020 14:03:43 -0500 Received: from pb-smtp2.pobox.com (unknown [127.0.0.1]) by pb-smtp2.pobox.com (Postfix) with ESMTP id 091E395A7D; Mon, 16 Nov 2020 14:03:41 -0500 (EST) (envelope-from junio@pobox.com) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=pobox.com; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type; s=sasl; bh=LbRZHFHJAtcc8QA8bFBMzewUcxA=; b=sCBWSR KEa8+n1/PCyRLm1Z3YOOO7m/xijczmpVoNykSOWVsGTo3hfVZGCZwGOGQqPqQJYF DH8TW8tvTGvGewWWTRe+1sq1WGBCuyQCmsS6n7Q/Sn/lpjFTlgX9tfz9TDbOhj/z ptgyTHY7xAR0V4UVwCho2eqmbpRWS2BasT9T0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=pobox.com; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type; q=dns; s=sasl; b=M/woLmOxZ+2fwLgqOe83bmMhgkXmSmNO suFpZ408FvZTeOjb6kSRzs/RcfU02ft+nLX99ZpftBgHXMyhTfEf2NrZooDPCGxw 5pepvx+1fwYFHvFIIQQKFkFi7l6H4UW9k1f5kquSkui9lUc2FdEd0gMTcmAR/Mxk Vl4+9r4rboo= Received: from pb-smtp2.nyi.icgroup.com (unknown [127.0.0.1]) by pb-smtp2.pobox.com (Postfix) with ESMTP id ED33E95A7C; Mon, 16 Nov 2020 14:03:40 -0500 (EST) (envelope-from junio@pobox.com) Received: from pobox.com (unknown [34.74.119.39]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pb-smtp2.pobox.com (Postfix) with ESMTPSA id 52ABE95A7B; Mon, 16 Nov 2020 14:03:40 -0500 (EST) (envelope-from junio@pobox.com) From: Junio C Hamano To: Philippe Blain Cc: Git mailing list Subject: Re: FETCH_HEAD format is undocumented References: <218FCFFA-1F4F-42DE-B32D-D7C731813206@gmail.com> Date: Mon, 16 Nov 2020 11:03:39 -0800 In-Reply-To: <218FCFFA-1F4F-42DE-B32D-D7C731813206@gmail.com> (Philippe Blain's message of "Mon, 16 Nov 2020 12:13:42 -0500") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Pobox-Relay-ID: 7062EB48-283E-11EB-9E34-74DE23BA3BAF-77302942!pb-smtp2.pobox.com Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Philippe Blain 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".