git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Can 'git push' reset refs of the 'from' repo?

From
PWPeter Weseloh <peter.weseloh@googlemail.com>
Date
Sep 18, 2010, 15:46 UTC
Message-ID
<AANLkTi=H=1Ako5pbfmxU-s7XvgrzSc37gPJMzxi283de@mail.gmail.com>
Hi,

Since a few days we have a very strange problem with our (bare) central git repo. Every night some refs in refs/heads get reset to older CSs. It is not clear why that happens. The repo has the config 'receive.denyNonFastForwards = true' so it cannot be due to a push to the central repo, right? I also don't think that someone does a 'git reset' or something directly on the central repo.

Today it happened again and luckily no new changes were pushed to the central repo after the event so I inspected the files in refs/heads.

The modification time and owner of the "tampered" refs seam to indicate that it was a cron job that changed them. The cron job does a 'git --git-dir=<path_to_central_repo> push foo' to update a remote repo 'foo' which was added to the central repo with 'git remote add --mirror foo ssh://<host>/<path_to_foo>'. This setup was working well for quite a while.

Is it possible that the 'git push' changes refs in the central repo, i.e. the 'from' repo?

Another interesting information might be that I now also get an email from the cron job every night: yp_all: clnt_call: RPC: Unable to receive; errno = Connection reset by peer

That started at the same night I first saw the reset of the refs. I now replaced that cron job with another one running on the remote host that does a ''git remote update --prune" on the remote repo. Hopefully that resolves the problem.

Any feedback on what might be going on is highly appreciated.
Oh, the OS is Linux (RHEL4.8) and the git version is 1.7.0

Thanks in advance, Peter

Message 1 of 1 in “Can 'git push' reset refs of the 'from' repo?”
  1. Peter WeselohSep 18, 2010

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.