git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [Question] .git folder file updates for changing head commit
@ 2022-03-23 15:19 John Garry
  2022-03-23 20:25 ` Taylor Blau
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: John Garry @ 2022-03-23 15:19 UTC (permalink / raw)
  To: git

Hi guys,

I have a question about which files in the .git folder are updated as we 
change the head commit. I could check the codebase myself but prob will 
make a mistake and maybe some expert would be so kind as to just kindly 
tell me.

For building the linux perf tool we use the git head commit id as part 
of the tool version sting. To save time in re-building, the Makefile 
rule has a dependency on .git/HEAD for rebuilding. An alternative 
approach would be to compare git log output to check current versus 
previous build head commit, but that is seen as inefficient time-wise.

The problem is that actions like git cherry-pick and git reset --hard 
HEAD^ may not update .git/HEAD (so don't trigger a rebuild).

Is there some more suitable file(s) which we could use as a dependency? 
 From my limited experimentation, .git/index seems to always update when 
the changing head commit.

Thanks,
john

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2022-03-30 10:49 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-03-23 15:19 [Question] .git folder file updates for changing head commit John Garry
2022-03-23 20:25 ` Taylor Blau
2022-03-24 12:56   ` John Garry
2022-03-27 15:48   ` Ævar Arnfjörð Bjarmason
2022-03-30 10:48     ` John Garry
2022-03-23 20:50 ` Glen Choo
2022-03-24 12:59   ` John Garry
2022-03-23 21:28 ` Andreas Schwab
2022-03-24 13:00   ` John Garry

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).