1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2025-10-22 16:20:23 +02:00

31485: vcs_info, git: Avoid error messages for `guilt' users

Guilt uses the same internal directory for keeping state as stgit, but
it doesn't use the same files (not surprisingly). This caused error
messages due to missing files.

This fixes that by making the "stgit-active?" test stricter.

Reported-by: Axel Beckert <abe@debian.org>
This commit is contained in:
Frank Terbeck 2013-06-18 08:39:30 +02:00
parent 657d546452
commit 88599a0508
2 changed files with 8 additions and 1 deletions

View file

@ -136,7 +136,9 @@ gitbase=${PWD%/${$( ${vcs_comm[cmd]} rev-parse --show-prefix )%/##}}
rrn=${gitbase:t}
local patchdir=${gitdir}/patches/${gitbranch}
if [[ -d $patchdir ]] ; then
if [[ -d $patchdir ]] && [[ -f $patchdir/applied ]] \
&& [[ -f $patchdir/unapplied ]]
then
local -a stgit_applied stgit_unapplied stgit_all
stgit_applied=(${(f)"$(< "${patchdir}/applied")"})