From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=MAILING_LIST_MULTI, RCVD_IN_DNSWL_NONE autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 16326 invoked from network); 12 Jul 2020 20:54:23 -0000 Received: from ns1.primenet.com.au (HELO primenet.com.au) (203.24.36.2) by inbox.vuxu.org with ESMTPUTF8; 12 Jul 2020 20:54:23 -0000 Received: (qmail 10170 invoked by alias); 12 Jul 2020 20:54:14 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: List-Unsubscribe: Sender: zsh-workers@zsh.org X-Seq: 46241 Received: (qmail 20689 invoked by uid 1010); 12 Jul 2020 20:54:14 -0000 X-Qmail-Scanner-Diagnostics: from smtprelay06.ispgateway.de by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.102.3/25870. spamassassin: 3.4.4. Clear:RC:0(80.67.18.29):SA:0(-1.9/5.0):. Processed in 1.87769 secs); 12 Jul 2020 20:54:14 -0000 X-Envelope-From: ft@bewatermyfriend.org X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | Received-SPF: none (ns1.primenet.com.au: domain at bewatermyfriend.org does not designate permitted sender hosts) From: Frank Terbeck To: zsh-workers@zsh.org Subject: Re: [PATCH] vcs-info: Avoid error messages in bare git repositories In-Reply-To: <20200712141239.14585-1-ft@bewatermyfriend.org> (Frank Terbeck's message of "Sun, 12 Jul 2020 16:12:39 +0200") References: <20200712141239.14585-1-ft@bewatermyfriend.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Date: Sun, 12 Jul 2020 22:53:29 +0200 Message-ID: <871rlgihfa.fsf@ft.bewatermyfriend.org> MIME-Version: 1.0 Content-Type: text/plain X-Df-Sender: NDMwNDQ0 I wrote: > A user reported error messages in bare repositories. I tracked this down to: > > gitbase=$( ${vcs_comm[cmd]} rev-parse --show-toplevel 2> /dev/null ) > fatal: this operation must be run in a work tree [...] > I do wonder though, why this happens. Git didn't stop printing the error > to stderr. Shouldn't the redirection to /dev/null inside the command > substitution take care of this? I talked to Daniel about this off-list. As it turns out, I was using a vendor package, and didn't bother to check the current code. So much for being thorough. Thanks to Daniel for the nudge in the right direction! Disregard the patch. Regards, Frank