lhmouse / MINGW-packages

Package scripts for GCC with the MCF thread model
https://gcc-mcf.lhmouse.com/
BSD 3-Clause "New" or "Revised" License
12 stars 1 forks source link

gcc prepare git clean possible issue #14

Closed stahta01 closed 10 months ago

stahta01 commented 10 months ago

The git call in prepare() git clean -fdx likely should be git clean -fdX

Tim S.

lhmouse commented 10 months ago

There are occasional patches in plain diff format instead of mbox format, which are applied with git apply -3 or patch --merge, which does not commit the changes and may leave untracked files behind. The x in lowercase ensures a clean work tree is prepared for the other patches.

stahta01 commented 10 months ago

There are occasional patches in plain diff format instead of mbox format, which are applied with git apply -3 or patch --merge, which does not commit the changes and may leave untracked files behind. The x in lowercase ensures a clean work tree is prepared for the other patches.

Per git docs the lower x requires the e option; the directions implies it does nothing if no e option is used. Note: I have not confirmed the directions is correct.

Tim S.

lhmouse commented 10 months ago

Per git docs the lower x requires the e option; the directions implies it does nothing if no e option is used. Note: I have not confirmed the directions is correct.

Actually I have been using git clean -fdx for many years and have not been aware of -e. The Git manual says

-e , --exclude= Use the given exclude pattern in addition to the standard ignore rules (see gitignore(5)).

Since we are not adding ignore rules, it doesn't seem to be necessary.

stahta01 commented 10 months ago

Per git docs the lower x requires the e option; the directions implies it does nothing if no e option is used. Note: I have not confirmed the directions is correct.

Actually I have been using git clean -fdx for many years and have not been aware of -e. The Git manual says

-e , --exclude= Use the given exclude pattern in addition to the standard ignore rules (see gitignore(5)).

Since we are not adding ignore rules, it doesn't seem to be necessary.

-x Don’t use the standard ignore rules, but still use the ignore rules given with -e options from the command line. This allows removing all untracked files, including build products. This can be used (possibly in conjunction with git restore or git reset) to create a pristine working directory to test a clean build.

I hope you are right.

Tim S.