From: Johannes Sixt Date: Mon, 13 Jul 2020 20:43:49 GMT Subject: Re: FETCH_HEAD files and mirrored repos Message-ID: <234fc5b6-9a64-725c-afd3-e102ea849e97@kdbg.org> In-Reply-To: <20200713202211.GA2355588@coredump.intra.peff.net> Am 13.07.20 um 22:22 schrieb Jeff King: > I occasionally use FETCH_HEAD for such things. If we were to stop > writing it automatically, I think the key thing to notice is whether the > result was actually stored anywhere else. Or more accurately, whether > the user asked for any refspecs on the command line (since we'd still > update tracking refs in some cases). > > If I do: > > git fetch > > or: > > git fetch origin refs/heads/foo:refs/heads/foo > > then I probably don't care about FETCH_HEAD. But if I do: > > git fetch origin refs/heads/foo > > then I'm probably interested in picking the result out of FETCH_HEAD. Very good observation. The latter is exactly the "many cases" I mentioned where I do care about FETCH_HEAD. -- Hannes