public inbox for git@vger.kernel.org 
 help / color / mirror / Atom feed
* Why do we need to wait 1s between a git add and commit
@ 2026-05-22 12:28 Fabrice SALVAIRE
  2026-05-22 15:12 ` Kristoffer Haugsbakk
  0 siblings, 1 reply; 3+ messages in thread
From: Fabrice SALVAIRE @ 2026-05-22 12:28 UTC (permalink / raw)
  To: git

Dear all,

I wrote a Python tool to dump a wiki to a git repository, that does 
basically a succession of subprocess calls to git add and commit.

Recently, I discovered this tool doesn't work any longer and that git 
commit (2.54 on Fedora 42 / 43) crashes randomly.

I cannot explain this behavior since my code is trivial.

I had the intuition to add a sleep time of 1s just after a git call, and 
it solves the issue.

I noticed for some cases that another call to git commit were 
successful. For most cases, git fsck and gitk report issues.

It looks like the state of the git repository was not yet completed 
before the end of the git subprocess.

Cheers,


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

end of thread, other threads:[~2026-05-22 17:14 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-22 12:28 Why do we need to wait 1s between a git add and commit Fabrice SALVAIRE
2026-05-22 15:12 ` Kristoffer Haugsbakk
2026-05-22 17:13   ` Fabrice SALVAIRE

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox