From: Junio C Hamano Date: Thu, 21 Feb 2008 00:12:16 GMT Subject: Re: [PATCH] git-clean: handle errors if removing files fails Message-ID: <7vodab182n.fsf@gitster.siamese.dyndns.org> In-Reply-To: <20080220234154.GS31441@genesis.frugalware.org> Miklos Vajna writes: > Consider the following case: > > $ sudo mkdir foo > $ sudo touch foo/bar > > This is the old output: > > $ git clean -f -d > Removing foo/ > > No error message. > > This is the new output: > > $ ~/git/git/git clean -f -d > Removing foo/ > fatal: failed to remove 'foo/' That's quite different style from the other commit log messages in the project, isn't it? While I agree reporting an error is definitely an improvement, I do not think dying in the middle is the right thing to do. Shouldn't it note the error, remove other cruft, and then finally signal the error by exiting non-zero?