Stream: committers
Topic: clean.sh
Grahame Grieve (Sep 07 2018 at 03:00):
Grahame Grieve (Sep 07 2018 at 03:00):
umm.. think that's a little over the top. Not sure what to do with it?
Grahame Grieve (Sep 07 2018 at 03:01):
the windows batch file is not so dangerous
Josh Mandel (Sep 07 2018 at 03:09):
This script shouldn't exist. it should be replaced by "git clean" as a first pass.
Josh Mandel (Sep 07 2018 at 03:09):
It does look incredibly dangerous.
Grahame Grieve (Sep 07 2018 at 03:29):
git clean is not the same thing
Josh Mandel (Sep 07 2018 at 03:39):
What's the specific use case?
Josh Mandel (Sep 07 2018 at 03:39):
(if nothing else, the sh script should work more like the .bat)
Grahame Grieve (Sep 07 2018 at 03:40):
clean.ba/sh deletes all the output files, and the stupid backup files that get created all over the places (e.g. clutter text search) without deleting source files
Grahame Grieve (Sep 07 2018 at 03:40):
I didn't write the .sh file, or it would work like the bat file
Grahame Grieve (Sep 07 2018 at 03:40):
git clean would delete candidate sources files as well.
Josh Mandel (Sep 07 2018 at 03:45):
This reminds me that backup files should be added to a .gitignore -- do we have a list of extensions that shouldn't be checked in?
Josh Mandel (Sep 07 2018 at 03:45):
.bak, .class, .tmp, .jar ...
Josh Mandel (Sep 07 2018 at 03:46):
If we get that right, then "git clean -X" may do the trick of clean.sh
Grahame Grieve (Sep 07 2018 at 03:48):
gie clean "removes all untracked files, including build products" - obviously i was not clear enough about the difference. We *do not want to remove all untracked files"
Grahame Grieve (Sep 07 2018 at 03:48):
here's my svn ignore list
Grahame Grieve (Sep 07 2018 at 03:48):
fhir-error-dump.txt
source-lloyd
publish.zip
*.gitattributes
ivy
publish-web.bat
fhir-error-dump.html
validation.log
local.ini
13005_patch
*.gen.svg
Grahame Grieve (Sep 07 2018 at 03:48):
weird things in there
Josh Mandel (Sep 07 2018 at 03:48):
-X ensures that it only removes ignored files though
Grahame Grieve (Sep 07 2018 at 03:49):
oh. well that might do it then
Grahame Grieve (Sep 07 2018 at 03:50):
my ignore list would actually be:
*.bak
*.class
*.~ *
publish
temp
Grahame Grieve (Sep 07 2018 at 03:51):
extra space after ~ in order to get the * to show - but not in actual file filter
Josh Mandel (Sep 07 2018 at 03:51):
Cool.
Grahame Grieve (Sep 07 2018 at 03:51):
but tell me why git clean -X is less dangerous?
Grahame Grieve (Sep 07 2018 at 03:52):
I guess it limits to those file types and locations...
Grahame Grieve (Sep 07 2018 at 03:53):
but what if you run it in the wrong directory (as is evidently what happened here)
Josh Mandel (Sep 07 2018 at 03:53):
Because it can't delete your home dir. (If some of the named directories in clean.sh are missing, then cd ../../.. could point to something very high in the root hierarchy and then delete all files.)
Grahame Grieve (Sep 07 2018 at 03:54):
well, ok, if you say so
Grahame Grieve (Sep 08 2018 at 02:19):
so we're just going to delete clean.sh?
Lloyd McKenzie (Sep 11 2018 at 03:17):
No objections raised, so I guess delete it. (Or replace it with a call to git clean -X)
Last updated: Apr 12 2022 at 19:14 UTC