Summary: | newvers falsely appends "-dirty" to hash when building in a git tree with no content changes | ||
---|---|---|---|
Product: | Base System | Reporter: | Ed Maste <emaste> |
Component: | misc | Assignee: | freebsd-bugs (Nobody) <bugs> |
Status: | Closed FIXED | ||
Severity: | Affects Only Me | ||
Priority: | --- | ||
Version: | CURRENT | ||
Hardware: | Any | ||
OS: | Any |
Description
Ed Maste
![]() ![]() 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. A commit references this bug: Author: emaste Date: Fri Nov 2 21:20:46 UTC 2018 New revision: 340083 URL: https://svnweb.freebsd.org/changeset/base/340083 Log: newvers.sh: fix git false positive -dirty tag Assuming that any output from `git diff-index --name-only` implies changes in the working tree results in false positives: files with metadata, but not content, changes are also listed. Check that content differences exist before adding the -dirty tag to the git hash. PR: 229230 Reviewed by: markj Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D15968 Changes: head/sys/conf/newvers.sh A commit in branch stable/12 references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=b67bd2859d7d757ee9ceb8269a5790f4f1091be5 commit b67bd2859d7d757ee9ceb8269a5790f4f1091be5 Author: Ed Maste <emaste@FreeBSD.org> AuthorDate: 2018-11-02 21:20:46 +0000 Commit: Ed Maste <emaste@FreeBSD.org> CommitDate: 2022-09-06 17:15:05 +0000 newvers.sh: fix git false positive -dirty tag Assuming that any output from `git diff-index --name-only` implies changes in the working tree results in false positives: files with metadata, but not content, changes are also listed. Check that content differences exist before adding the -dirty tag to the git hash. PR: 229230 Reviewed by: markj Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D15968 (cherry picked from commit 50b53a8dc35f38ab6920dd83409541e875d01551) (cherry picked from commit 5186028dc4a2a74d007fa65857667efb2742eaea) sys/conf/newvers.sh | 31 +++++++++++++++++++++++++++++-- 1 file changed, 29 insertions(+), 2 deletions(-) |