Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

[Bug 229230] newvers falsely appends "-dirty" to hash when building

1 view
Skip to first unread message

bugzilla...@freebsd.org

unread,
Jun 22, 2018, 10:25:17 AM6/22/18
to
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=229230

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: bu...@FreeBSD.org
Reporter: ema...@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=${VCSDIR}/.. diff-index \
--name-only HEAD | read dummy; then
git="${git}-dirty"
modified=true
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
%

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
%

But there are actually no changes:

% git diff
%

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

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

--
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
freebs...@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-bugs
To unsubscribe, send any mail to "freebsd-bugs...@freebsd.org"

bugzilla...@freebsd.org

unread,
Jun 22, 2018, 11:46:29 AM6/22/18
to
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=229230

--- Comment #1 from Ed Maste <ema...@freebsd.org> ---
The full git diff-index output (i.e., without --name-only) reports:

:100644 100644 728b9afe3828cfe7916731637677afddd0ad1fb1
0000000000000000000000000000000000000000 M sys/conf/newvers.sh

The all-zeros SHA hash means that the working tree file must be checked.
0 new messages