broken repo after power cut

2015-06-20 Thread Richard Weinberger
Hi! Yesterday our git server faced a power cut and a git repository broke. The server is running a ext4 filesystem on top of Linux 3.16 (stable from openSUSE) and git 2.1.4. We had a backup, so no data was lost but I really would like to figure out what happened. This is the output of git fsck:

Re: broken repo after power cut

2015-06-21 Thread Richard Weinberger
Hi Johannes, [CC'ing linux-fsdevel and tytso] Am 21.06.2015 um 14:28 schrieb Johannes Schindelin: > Hi Richard, > > On 2015-06-20 21:40, Richard Weinberger wrote: > >> Yesterday our git server faced a power cut and a git repository broke. >> The server is runnin

Re: broken repo after power cut

2015-06-21 Thread Richard Weinberger
Am 21.06.2015 um 15:59 schrieb Christoph Hellwig: > On Sun, Jun 21, 2015 at 03:07:41PM +0200, Richard Weinberger wrote: >>>> To me it seems like git was creating a new object and got interrupted >>>> before fsync/fdatasync'ing it. >>>> As the object wa

Re: broken repo after power cut

2015-06-22 Thread Richard Weinberger
Am 22.06.2015 um 02:35 schrieb Theodore Ts'o: > On Sun, Jun 21, 2015 at 03:07:41PM +0200, Richard Weinberger wrote: > >>> I was then shocked to learn that ext4 apparently has a default >>> setting that allows it to truncate files upon power failure >>> (so

git ate my home directory :-(

2013-03-25 Thread Richard Weinberger
Hi! Today I've discovered that on the build server my home directory was empty. A post-mortem analysis showed that the git-clean command I've added to my kernel build script is the evil doer. In my scripts I'm setting GIT_DIR to use git-fetch and git-reset without changing the current working d

Re: git ate my home directory :-(

2013-03-25 Thread Richard Weinberger
Am 25.03.2013 23:06, schrieb Junio C Hamano: Jonathan Nieder writes: Richard Weinberger wrote: In my scripts I'm setting GIT_DIR to use git-fetch and git-reset without changing the current working directory all the time. Yeah, for historical reasons GIT_WORK_TREE defaults to $(pwd)

Re: git ate my home directory :-(

2013-03-25 Thread Richard Weinberger
Am 25.03.2013 23:20, schrieb Junio C Hamano: Richard Weinberger writes: Okay, I have to set GIT_DIR _and_ GIT_WORK_TREE to make my scripts safe again? I've always set only GIT_DIR because it just worked (till today...). That means you never run your script inside a subdirectory ;-) If

Re: git ate my home directory :-(

2013-03-26 Thread Richard Weinberger
Am 26.03.2013 09:02, schrieb Philip Oakley: From: "Junio C Hamano" Sent: Monday, March 25, 2013 10:06 PM Jonathan Nieder writes: Richard Weinberger wrote: In my scripts I'm setting GIT_DIR to use git-fetch and git-reset without changing the current working directory all t

Re: git ate my home directory :-(

2013-03-26 Thread Richard Weinberger
Am 26.03.2013 15:56, schrieb Jeff King: On Tue, Mar 26, 2013 at 02:07:44PM +0100, Richard Weinberger wrote: Should this important warning be part of the git(1) documentation on the environment variables (and possibly other places) given the consequences of this case? It wasn't somethin