8000 Fix patching.sh to include untracked (new) files in patch by ig3 · Pull Request #7979 · armbian/build · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Fix patching.sh to include untracked (new) files in patch #7979

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 23, 2025

Conversation

ig3
Copy link
@ig3 ig3 commented Mar 20, 2025

Description

In patching.sh, execute git add -N . before executing git diff to present the state of the patch to the user, so that new, untracked files will be included in the diff.

This appears to address the bug raised in Issue #7912.

If adding new files by way of a patch is truly to be discouraged a better solution might be to detect that a new file has been added, produce an error message explaining that new files should not be added via patch and possibly advising what should be done instead. Without this patch, any new files are not included in the patch as presented before the 'Are you happy with this patch?' prompt, but they are included in the produced patch, if the user responds 'yes'. It might be appropriate to prevent this. In any case, this would require a different change to patching.sh.

How Has This Been Tested?

I ran compile.sh with command uboot-patch, added a new configuration file and observed that the new file was presented in the patch displayed before the 'Are you happy with this patch?' prompt.

At the prompt I responded 'stop' and observed no errors.

I repeated the test, creating a different new file and observed that only this second new file appeared in the patch. The file added in the previous execution of compile.sh did not remain.

At the prompt I responded 'yes' and observed that the patch file was produced in output/patch, including diff for the new file.

Checklist:

Please delete options that are not relevant.

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • My changes generate no new warnings

@ig3 ig3 requested a review from a team as a code owner March 20, 2025 06:22
@github-actions github-actions bot added size/small PR with less then 50 lines Needs review Seeking for review Framework Framework components labels Mar 20, 2025
@igorpecovnik igorpecovnik added Ready to merge Reviewed, tested and ready for merge 05 Milestone: Second quarter release and removed Needs review Seeking for review labels Mar 22, 2025
@igorpecovnik igorpecovnik merged commit 86ea59c into armbian:main Mar 23, 2025
igorpecovnik added a commit to armbian/documentation that referenced this pull request Apr 9, 2025
By @ig3
In consideration of comments on armbian/build#7912 that null-patches (i.e. patches adding new files) are undesirable and such being somewhat facilitated by armbian/build#7979, I offer this documentation of the uboot-patch command for your consideration. It would have helped me when I first attempted to patch u-boot.
igorpecovnik added a commit to armbian/documentation that referenced this pull request Apr 9, 2025
By @ig3
In consideration of comments on armbian/build#7912 that null-patches (i.e. patches adding new files) are undesirable and such being somewhat facilitated by armbian/build#7979, I offer this documentation of the uboot-patch command for your consideration. It would have helped me when I first attempted to patch u-boot.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
05 Milestone: Second quarter release Framework Framework components Ready to merge Reviewed, tested and ready for merge size/small PR with less then 50 lines
Development

Successfully merging this pull request may close these issues.

2 participants
0