{"thread":{"id":"25144","subject":"Can 'git push' reset refs of the 'from' repo?","startedAt":"2010-09-18T15:46:27Z","lastAt":"2010-09-18T15:46:27Z","messageCount":1,"participants":["Peter Weseloh"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"150956","messageId":"AANLkTi=H=1Ako5pbfmxU-s7XvgrzSc37gPJMzxi283de@mail.gmail.com","threadId":"25144","inReplyTo":null,"subject":"Can 'git push' reset refs of the 'from' repo?","fromName":"Peter Weseloh","fromEmail":"peter.weseloh@googlemail.com","sentAt":"2010-09-18T15:46:27Z","receivedAt":"2010-09-18T15:46:27Z","isPatch":false,"sender":{"key":"peter.weseloh@googlemail.com","avatar":null},"body":"Hi,\n\nSince a few days we have a very strange problem with our (bare)\ncentral git repo.\nEvery night some refs in refs/heads get reset to older CSs.\nIt is not clear why that happens. The repo has the config\n'receive.denyNonFastForwards = true' so it cannot be due to a push to\nthe central repo, right?\nI also don't think that someone does a 'git reset' or something\ndirectly on the central repo.\n\nToday it happened again and luckily no new changes were pushed to the\ncentral repo after the event so I inspected the files in refs/heads.\n\nThe modification time and owner of the \"tampered\" refs seam to\nindicate that it was a cron job that changed them.\nThe cron job does a 'git --git-dir=<path_to_central_repo> push foo' to\nupdate a remote repo 'foo' which was added to the central repo with\n'git remote add --mirror foo ssh://<host>/<path_to_foo>'.\nThis setup was working well for quite a while.\n\nIs it possible that the 'git push' changes refs in the central repo,\ni.e. the 'from' repo?\n\nAnother interesting information might be that I now also get an email\nfrom the cron job every night:\nyp_all: clnt_call: RPC: Unable to receive; errno = Connection reset by peer\n\nThat started at the same night I first saw the reset of the refs.\nI now replaced that cron job with another one running on the remote\nhost that does a ''git remote update --prune\" on the remote repo.\nHopefully that resolves the problem.\n\nAny feedback on what might be going on is highly appreciated.\n\nOh, the OS is Linux (RHEL4.8) and the git version is 1.7.0\n\nThanks in advance,\nPeter\n"}]}