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.8 required=3.0 tests=AWL,BAYES_00, 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 9519B1F9FD for ; Mon, 1 Mar 2021 09:07:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233619AbhCAJFb (ORCPT ); Mon, 1 Mar 2021 04:05:31 -0500 Received: from cloud.peff.net ([104.130.231.41]:47818 "EHLO cloud.peff.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233846AbhCAJEa (ORCPT ); Mon, 1 Mar 2021 04:04:30 -0500 Received: (qmail 4414 invoked by uid 109); 1 Mar 2021 09:03:40 -0000 Received: from Unknown (HELO peff.net) (10.0.1.2) by cloud.peff.net (qpsmtpd/0.94) with ESMTP; Mon, 01 Mar 2021 09:03:40 +0000 Authentication-Results: cloud.peff.net; auth=none Received: (qmail 21530 invoked by uid 111); 1 Mar 2021 09:03:39 -0000 Received: from coredump.intra.peff.net (HELO sigill.intra.peff.net) (10.0.0.2) by peff.net (qpsmtpd/0.94) with (TLS_AES_256_GCM_SHA384 encrypted) ESMTPS; Mon, 01 Mar 2021 04:03:39 -0500 Authentication-Results: peff.net; auth=none Date: Mon, 1 Mar 2021 04:03:38 -0500 From: Jeff King To: Yaron Wittenstein Cc: Junio C Hamano , Patrick Steinhardt , git@vger.kernel.org Subject: Re: [QUESTION] Tracking HEAD changes? Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org On Fri, Feb 26, 2021 at 10:58:37PM +0200, Yaron Wittenstein wrote: > I'd like to make sure I understand the way things are right now: > > 1. The reference-transaction hook as it's today doesn't intercept > symbolic-references changes. It means that when HEAD changes due to > branch-switching the hook won't > get called. > > Are there any other cases that today the transaction won't execute? (I > couldn't think of one) No, I don't think so. > 2. The mechanisms that handle the changes to index and working-dir are > isolated from the one that manages the refs updates. > > A side-effect to that is the post-index-change hook running before the > reference-transaction one. > Future code changes to the way git operates could result in the > reference-transaction hook running before the post-index-change one. > > Is that correct? Yes, that matches my understanding. -Peff