Pillow icon indicating copy to clipboard operation
Pillow copied to clipboard

.gitignore review

Open homm opened this issue 7 years ago • 4 comments

There are two points:

Ignore rules shouldn't be too broad to not affect unrelated files. This is very confusing when you are creating a file and don't see it in the git. As I know, git doesn't provide information why a particular file is ignored and it is a bit hard to find the exact rule.

Compiled files is a frequent source of errors. For example, If you switch to 4.3.x branch, compile Pillow and return to 5.0.x, there will be PIL folder with .so and .pyc files. It will be importable from python but will be not visible to git because .so and .pyc files are ignored everywhere. With this PR you can see compiled files in unexpected places.

homm avatar Mar 31 '18 11:03 homm

@wiredfool The example isn't included in the documentation anywhere, it just in the repo without any links to it. I'll revert this, just want to note.

homm avatar Apr 02 '18 11:04 homm

With this .gitignore I get:

➤ Untracked files
#
#      untracked:  [5] PIL
#      untracked:  [6] Pillow.egg-info
#      untracked:  [7] Tests/__pycache__
#      untracked:  [8] __pycache__
#      untracked: [10] build
#      untracked: [11] dist
#      untracked: [12] src/PIL/__pycache__
#      untracked: [13] src/PIL/_imaging.cpython-36m-darwin.so
#      untracked: [14] src/PIL/_imaging.so
#      untracked: [15] src/PIL/_imagingcms.cpython-36m-darwin.so
#      untracked: [16] src/PIL/_imagingcms.so
#      untracked: [17] src/PIL/_imagingft.cpython-36m-darwin.so
#      untracked: [18] src/PIL/_imagingft.so
#      untracked: [19] src/PIL/_imagingmath.cpython-36m-darwin.so
#      untracked: [20] src/PIL/_imagingmath.so
#      untracked: [21] src/PIL/_imagingmorph.cpython-36m-darwin.so
#      untracked: [22] src/PIL/_imagingmorph.so
#      untracked: [23] src/PIL/_imagingtk.cpython-36m-darwin.so
#      untracked: [24] src/PIL/_imagingtk.so
#      untracked: [25] src/PIL/_webp.cpython-36m-darwin.so
#      untracked: [26] src/PIL/_webp.so
#      untracked: [27] src/Pillow.egg-info

Do we want all those to be visible/potentially committed?

hugovk avatar Apr 05 '18 09:04 hugovk

FWIW I don't care that much for .gitignore in general. Mine are usually empty because I like to "see what's going on". On rare occasions, I've added things to .gitignore and have certainly worked on a lot of projects where other developers seem to care about .gitignore.

File under bikeshed, I guess.

aclark4life avatar Apr 05 '18 11:04 aclark4life

@hugovk

Do we want all those to be visible/potentially committed?

Not potentially committed, but visible.

[5] PIL

This is what I talking about and why sources was moved to ./src subdir ) If you have compiled files in this folder, they will be used in from PIL import Image. Now you can see this folder and can erese it.

[6] Pillow.egg-info

This is artifact from pre-5.0 versions of Pillow and now you see than you can saifly remove it.

As of other files, they are all should be ignored and I don't know why you are seeing them. Which version of git have you installed? My is:

$ git --version
git version 1.9.1

and I don't see these files.

homm avatar Apr 06 '18 00:04 homm

Let's close this, thanks anyway for the suggestion!

hugovk avatar Oct 25 '22 18:10 hugovk