From: Alex Riesen Date: Mon, 03 Mar 2008 06:57:41 GMT Subject: Re: [PATCH] Make the exit code of add_file_to_index actually useful Message-ID: <20080303065741.GA2916@steel.home> In-Reply-To: <85ablgkcjo.fsf@lupus.strangled.net> Joachim B Haga, Sun, Mar 02, 2008 23:04:43 +0100: > Alex Riesen writes: > > Junio C Hamano, Sun, Mar 02, 2008 17:59:13 +0100: > >> Why is this even needed to begin with? I am aware of Dirk's original > >> issue discussed elsewhere, but we try fairly hard to be A-O-N when we can > >> afford to, and this option deliberately breaks it. What is the real > >> reason why such an unreadable (either for privilege or for I/O error) > >> file should not live in .gitignore? > > > > Another program keeps the file open. There is an exclusive mode for > > opening files, which locks the files for everyone. I believe it is > > even default mode, unless selected otherwise. > > Another minor annoyance in this area, is when a wildcard add fails > because of ignored files: > > potassium ~/svn/Deformation|master 0$ ls EpetraMatrix.* > EpetraMatrix.cpp EpetraMatrix.cpp~ EpetraMatrix.h EpetraMatrix.o > potassium ~/svn/Deformation|master 0$ git add EpetraMatrix.* > The following paths are ignored by one of your .gitignore files: > EpetraMatrix.cpp~ > EpetraMatrix.o > Use -f if you really want to add them. > potassium ~/svn/New-Deformation|master 0$ git status > # On branch master > # Changed but not updated: > # (use "git add ..." to update what will be committed) > # > [...] > > I don't want to add them, I just want to ignore them completely (i.e., > add the un-ignored ones). > > Would this case also be covered by the new switch? No. This is entirely different usability issue