{"thread":{"id":"54653","subject":"FETCH_HEAD format is undocumented","startedAt":"2020-11-16T17:14:12Z","lastAt":"2020-11-16T19:03:44Z","messageCount":2,"participants":["Philippe Blain","Junio C Hamano"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"410027","messageId":"218FCFFA-1F4F-42DE-B32D-D7C731813206@gmail.com","threadId":"54653","inReplyTo":null,"subject":"FETCH_HEAD format is undocumented","fromName":"Philippe Blain","fromEmail":"levraiphilippeblain@gmail.com","sentAt":"2020-11-16T17:13:42Z","receivedAt":"2020-11-16T17:14:12Z","isPatch":false,"sender":{"key":"levraiphilippeblain@gmail.com","avatar":"https://avatars.githubusercontent.com/u/44212482?v=4"},"body":"Hi,\n\nWhile trying to use `git fmt-merge-msg`, I figured it only accepts\ninputs in the format used in the 'FETCH_HEAD' file.\n\nI then tried to find a description of the format of this file in the documentation, \nbut could not find any. For example, 'git grep not-for-merge' in /Documentation\nreturns a single hit, in the release notes for Git 2.5.0.\n\nI think it could be good if we documented the FETCH_HEAD format.\n\nCheers,\n\nPhilippe."},{"id":"410035","messageId":"xmqq7dql9l9w.fsf@gitster.c.googlers.com","threadId":"54653","inReplyTo":"218FCFFA-1F4F-42DE-B32D-D7C731813206@gmail.com","subject":"Re: FETCH_HEAD format is undocumented","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2020-11-16T19:03:39Z","receivedAt":"2020-11-16T19:03:44Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Philippe Blain <levraiphilippeblain@gmail.com> writes:\n\n> While trying to use `git fmt-merge-msg`, I figured it only accepts\n> inputs in the format used in the 'FETCH_HEAD' file.\n>\n> I then tried to find a description of the format of this file in the documentation, \n> but could not find any. For example, 'git grep not-for-merge' in /Documentation\n> returns a single hit, in the release notes for Git 2.5.0.\n>\n> I think it could be good if we documented the FETCH_HEAD format.\n\nNot just the format of FETCH_HEAD file, but the whole usage of\nfmt-merge-msg is meant as a mere implementation detail of the\none-way communication from \"git fetch\" to \"git merge\".  I'd rather\nleave it opaque so that we can update the format as needed.  For one\nthing it is impossible to do i18n with the current format, I think,\nwhich some folks may eventually want to change.\n\nI am OK with documenting it somewhere in Documentation/technical/\nwith a warning written in big red letters that it is subject to\nchange, to clearly mark that the format of the file should not be\nrelied upon and the only useful thing you could do is to rely on the\nfact that its first 40-byte gives one object name (so you could say\n\"git log ...FETCH_HEAD\" for example) and to feed it to \"git merge\".\n\n\n"}]}