Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 22 Jun 2018 14:24:07 +0000
From:      bugzilla-noreply@freebsd.org
To:        bugs@FreeBSD.org
Subject:   [Bug 229230] newvers falsely appends "-dirty" to hash when building in a git tree with no content changes
Message-ID:  <bug-229230-227@https.bugs.freebsd.org/bugzilla/>

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

            Bug ID: 229230
           Summary: newvers falsely appends "-dirty" to hash when building
                    in a git tree with no content changes
           Product: Base System
           Version: CURRENT
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: misc
          Assignee: bugs@FreeBSD.org
          Reporter: emaste@freebsd.org

For git trees newvers.sh attempts to report that the sources used to build =
do
not exactly match a commit hash (and append -dirty to the hash) via:

        if $git_cmd --work-tree=3D${VCSDIR}/.. diff-index \
            --name-only HEAD | read dummy; then
                git=3D"${git}-dirty"
                modified=3Dtrue
        fi

However this falsely reports that the tree is modified if metadata on a file
does not match git's expectation - for example, I have no changes in a tree:

% git diff-index --name-only HEAD
% git diff
%=20

Touch a file:

% touch sys/sys/param.h
%

Now diff-index --name-only HEAD returns the touched file:

% git diff-index --name-only HEAD
sys/sys/param.h
%=20

But there are actually no changes:

% git diff
%

And running 'git diff' clears the "metadata changed" status:

% git diff-index --name-only HEAD
%

--=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-229230-227>