Skip to content
This repository has been archived by the owner on Dec 18, 2022. It is now read-only.

Remove obsolete junk from .gitignore #498

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
207 changes: 2 additions & 205 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,195 +1,9 @@
# Autotools generated files
locale/Makefile.in
Makefile
aclocal.m4
autom4te.cache
config.status
bin-stamp
.deps
.dirstamp
lib-stamp
libtool
stamp-h*
stamp-po
*.stamp

# Handcrafted makefiles
!lib-src/expat/amiga/Makefile
!lib-src/libnyquist/nyquist/sys/unix/*/Makefile
!lib-src/lv2/Makefile
!lib-src/mod-script-pipe/Makefile

# Generated files by build system
lib-src/expat/expat_config.h
lib-src/libflac/doc/Doxyfile
lib-src/libflac/config.h
lib-src/libflac/test/common.sh
lib-src/libid3tag/config.h
lib-src/libid3tag/libid3tag.list
lib-src/libmad/config.h
lib-src/libmad/libmad.list
lib-src/libmad/mad.h
lib-src/libogg/config.h
lib-src/libogg/include/ogg/config_types.h
lib-src/libogg/libogg.spec
lib-src/libsndfile/build-test-tarball.mk
lib-src/libsndfile/doc/libsndfile.css
lib-src/libsndfile/libsndfile.spec
lib-src/libsndfile/man/sndfile-deinterleave.1
lib-src/libsndfile/man/sndfile-metadata-set.1
lib-src/libsndfile/src/config.h
lib-src/libsndfile/src/sndfile.h
lib-src/libsndfile/src/version-metadata.rc
lib-src/libsndfile/tests/pedantic-header-test.sh
lib-src/libsndfile/tests/test_wrapper.sh
lib-src/libsoxr/soxr-config.h
lib-src/libsoxr/src/libsoxr-dev.src
lib-src/libsoxr/src/libsoxr.src
lib-src/libsoxr/tests/ref-*.s32
lib-src/libvorbis/config.h
lib-src/libvorbis/doc/Doxyfile
lib-src/libvorbis/libvorbis.spec
lib-src/sbsms/libsbsms.spec
lib-src/sbsms/src/config.h
lib-src/soundtouch/include/soundtouch_config.h
lib-src/twolame/doc/html/Doxyfile
lib-src/twolame/libtwolame/config.h
locale/POTFILES
src/audacity.desktop
src/RevisionIdent.h
src/configunix.h
src/configwin.h
*.pc

# CMake build output
lib-src/libsoxr/CMakeCache.txt
lib-src/libsoxr/*.cmake
CMakeFiles/
CTestTestfile.cmake
cmake_install.cmake
build/*
cmake-build-*/
leio marked this conversation as resolved.
Show resolved Hide resolved

# Waf build output
lib-src/lv2/.buildvars
lib-src/lv2/include/
lib-src/lv2/*/build/
lib-src/lv2/srcdir.mk
.lock-waf_linux2_build

# Mac build outputs
mac/Audacity.xcodeproj/project.xcworkspace/contents.xcworkspacedata
mac/Audacity.xcodeproj/project.xcworkspace/xcshareddata/Audacity.xccheckout
mac/Makefile
mac/confdefs.h
mac/config.status
mac/conftest.c
mac/help/
mac/images/
mac/lib-src/
mac/libtool
mac/po/
mac/src/
mac/tests/
# CMake build directory
build/

# Doxygen output
dox/

# Compiled Object files
*.slo
*.lo
*.o
*.obj
*.pyc

# Other unwanted files.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This entire section should not be removed.

*.suo
*.sdf
*.exp
*.ilk
*.pdb
*.idb
*.lastbuild
*.log
*.tlog
*.ipch
*.opensdf
*.vcxproj.user
*.sbr
*.bsc
*.aps

# Precompiled Headers
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Neither should this one.

*.gch
*.pch
*.ncb

# Compiled Dynamic libraries
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same. These aren't "junk" or "outdated". They serve as extremely low-cost safe-guards against accidents. I don't know why you would ever take such a hardline approach to git ignores. They cost almost nothing to maintain, nothing to check and they prevent accidents.

*.so
*.dylib
*.dll

# Compiled translation files (GNU Machine Object)
*.gmo

# Compiled Static libraries
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here, but you could get rid of the top two and just leave .a and .lib

*.lai
*.la
*.a
*.lib

# Executables
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These are also useful safeguards.

*.exe
*.app

# Executable without extension
/audacity
src/audacity
lib-src/expat/examples/elements
lib-src/expat/examples/outline
lib-src/expat/xmlwf/xmlwf
lib-src/libflac/examples/c/decode/file/example_c_decode_file
lib-src/libflac/examples/c/encode/file/example_c_encode_file
lib-src/libflac/examples/cpp/decode/file/example_cpp_decode_file
lib-src/libflac/examples/cpp/encode/file/example_cpp_encode_file
lib-src/libflac/src/flac/flac
lib-src/libflac/src/metaflac/metaflac
lib-src/libflac/src/test_grabbag/cuesheet/test_cuesheet
lib-src/libflac/src/test_grabbag/picture/test_picture
lib-src/libflac/src/test_libFLAC++/test_libFLAC++
lib-src/libflac/src/test_libFLAC/test_libFLAC
lib-src/libflac/src/test_seeking/test_seeking
lib-src/libflac/src/test_streams/test_streams
lib-src/libogg/src/test_bitwise
lib-src/libogg/src/test_framing
lib-src/libsndfile/src/G72x/g72x_test
lib-src/libsndfile/src/test_main
lib-src/libsoxr/examples/1a-lsr
lib-src/libsoxr/examples/3-options-input-fn
lib-src/libsoxr/tests/vector-cmp
lib-src/libsoxr/tests/vector-gen
lib-src/libvorbis/lib/test_sharedbook
lib-src/portaudio-v19/bin/
lib-src/soundtouch/source/SoundStretch/soundstretch
lib-src/twolame/frontend/twolame
lib-src/twolame/simplefrontend/stwolame

# Mac Specific
.DS_Store
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be left in. I believe Mac creates these automatically as hidden files to store folder attributes. Someone could literally commit this and have no idea it was even in the commit.

xcuserdata
*.xcconfig
mac/build

# Windows specific
win/Debug
win/Release
win/Projects/*/Debug
win/Projects/*/Release
win/.vs/
win/packages
win/.nuget
win-alt-build

# All those help files
help/manual*
help/temp*
Expand All @@ -198,21 +12,4 @@ help/temp*
src/RevisionIdent.h
win/resetPrefs.txt

# Emacs backup files
*~
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These are files automatically created by emacs in a lot of cases and if anyone has their emacs setup to generate them it's very easy to accidentally commit them.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is also done by some other editors too.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, other editors do this too. Following your reasoning, we should add the files created by every editor out there into .gitignore... do you really think that's appropriate?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, I meant some editors create ~ files too.

win/xaudacity.ico
*.sublime-project
*.sublime-workspace
/tests/results/*.png

# IDEA IDEs
.idea/
Comment on lines -208 to -209
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please keep this

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could have a slash in front though, for only ignoring at toplevel.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, .gitignore is for files that should be ignored for everyone working on the project. Files that are created only by your own system should be ignored for you only:

git config --global core.excludesFile '.idea'

Copy link
Member

@leio leio Aug 19, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds good, just the discoverability of this is so bad it has escaped me for over a decade as a good approach instead of listing them in project .gitignore. To the point it seems like something to note in some development docs of ours then, or we'll start getting PRs that try to add them all the time and we won't have anything to point them at as per instructions from our end.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, could you make a pull request to add it to CONTRIBUTING.md?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I cannot recall seeing a pull request where someone accidentally included a file generated by their editor. If that ever does happen, it is easy to catch in code review and tell the author to run git config --global core.excludesFile so I don't see what the problem is.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I also think that this should be kept, I don't see any benefits of removing it

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Keeping this here is a statement that these specific editors are preferred. I don't think that's appropriate.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But vcpkg_installed is also in the gitignore, so that means that I have to use vcpkg to install dependencies?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Keeping this here is a statement that these specific editors are preferred. I don't think that's appropriate.

On the contrary, if they were preferred, you'd let people ship relevant configurations of IDEs with them, rather than block them from doing so and "degrade" the integration with those specific IDEs, which is what we're doing here. If the .gitignore bore this sort of significance, it'd also be as if we were saying "we only prefer IDEs that leave junk in directories", which doesn't make too much sense.

Some repositories (especially the ones concerning JavaScript code, from what I've seen) leave IDE-specific directories on purpose in order to allow people to come up with a development environment instantly. This explicitly disallows people from doing so.

We could have a comment explaining that these editors are not preferred instead, maybe?


#other files that get in the way
*/not-for-git/*
*.dll

# VSCode
.vscode/

vcpkg_installed