Re: [QUESTION] Tracking HEAD changes?

3 messages, 3 authors, 2021-02-25 · open the first message on its own page

Re: [QUESTION] Tracking HEAD changes?

From: Junio C Hamano <hidden>
Date: 2021-02-25 07:15:16

Patrick Steinhardt [off-list ref] writes:
So what you're observing is simply mirroring "reality": the order in
which git does its things here. There can be arbitrarily many
transactions in a given git command, and the only way this can be
changed is by changing how the command operating the transcations works.
In other words, ref transaction is only about changes to the refs.
There is no such "transaction" that treats a series of operations
like object creation and index manipulation that may happen before a
group of refs are updated as a single unit and make it atomic.

Re: [QUESTION] Tracking HEAD changes?

From: Patrick Steinhardt <hidden>
Date: 2021-02-25 07:28:59

On Wed, Feb 24, 2021 at 11:13:47PM -0800, Junio C Hamano wrote:
Patrick Steinhardt [off-list ref] writes:
quoted
So what you're observing is simply mirroring "reality": the order in
which git does its things here. There can be arbitrarily many
transactions in a given git command, and the only way this can be
changed is by changing how the command operating the transcations works.
In other words, ref transaction is only about changes to the refs.
There is no such "transaction" that treats a series of operations
like object creation and index manipulation that may happen before a
group of refs are updated as a single unit and make it atomic.
Exactly. Thanks for putting it into better words than I did.

Patrick

Re: [QUESTION] Tracking HEAD changes?

From: Yaron Wittenstein <hidden>
Date: 2021-02-25 07:51:29

Thank you all!

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)

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?

  Thank you!
      Yaron

On Thu, Feb 25, 2021 at 9:28 AM Patrick Steinhardt [off-list ref] wrote:
On Wed, Feb 24, 2021 at 11:13:47PM -0800, Junio C Hamano wrote:
quoted
Patrick Steinhardt [off-list ref] writes:
quoted
So what you're observing is simply mirroring "reality": the order in
which git does its things here. There can be arbitrarily many
transactions in a given git command, and the only way this can be
changed is by changing how the command operating the transcations works.
In other words, ref transaction is only about changes to the refs.
There is no such "transaction" that treats a series of operations
like object creation and index manipulation that may happen before a
group of refs are updated as a single unit and make it atomic.
Exactly. Thanks for putting it into better words than I did.

Patrick
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help