Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 21 Dec 2020 19:27:52 +0000
From:      bugzilla-noreply@freebsd.org
To:        bugs@FreeBSD.org
Subject:   [Bug 252028] sys/conf/newvers.sh: git "-dirty" even when clean
Message-ID:  <bug-252028-227@https.bugs.freebsd.org/bugzilla/>

next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D252028

            Bug ID: 252028
           Summary: sys/conf/newvers.sh: git "-dirty" even when clean
           Product: Base System
           Version: CURRENT
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Some People
          Priority: ---
         Component: kern
          Assignee: bugs@FreeBSD.org
          Reporter: warlock@phouka.net

Created attachment 220789
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=3D220789&action=
=3Dedit
git_tree_modiied inversion check patch

I've made a tiny shell script to demonstrate the problem, but it looks like=
 the
dirty/clean logic is inverted.

#!/bin/sh -

git_tree_modified()
{
        git -c core.checkStat=3Dminimal -c core.fileMode=3Doff diff --quiet
        if [ $? -eq 0 ]; then
                 return 1;
        else
                 return 0;
        fi
}

export git=3Dfoo

if git_tree_modified; then
        git=3D"${git}-dirty"
fi

echo $git

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-252028-227>