From: Junio C Hamano Date: Fri, 14 Aug 2015 17:10:20 GMT Subject: Re: [PATCH v3 3/4] refs: make refs/worktree/* per-worktree Message-ID: In-Reply-To: <55CDA445.9090503@alum.mit.edu> Michael Haggerty writes: > I don't see how that can help. The result of a pipeline is taken from > the last command. The exit codes of earlier commands in the pipeline are > lost in the sands of time: > > $ false | true > $ echo $? > 0 > $ false | ( ! false ) > $ echo $? > 0 > > Working around this POSIX shell limitation is surprisingly awkward in a > general-purpose script. But in this case you could use a temporary file: > > git for-each-ref >refs-actual && > ! grep refs/worktree