[Bug 252028] sys/conf/newvers.sh: git "-dirty" even when clean

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Mon Dec 21 19:27:52 UTC 2020


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=252028

            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 at FreeBSD.org
          Reporter: warlock at phouka.net

Created attachment 220789
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=220789&action=edit
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=minimal -c core.fileMode=off diff --quiet
        if [ $? -eq 0 ]; then
                 return 1;
        else
                 return 0;
        fi
}

export git=foo

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

echo $git

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


More information about the freebsd-bugs mailing list