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/>

index | next in thread | raw e-mail

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@FreeBSD.org
          Reporter: warlock@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.

home | help

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