Skip to content

.gitignore files are too aggressive in 2.6.12 #1058

Closed

Description

@rrueth

When using thirdparty tools in our system, my company will commit the third party source code so that the tool can built and distributed easily across various systems. We also use git for version control. When committing the redis 2.6.12 source to our repository, I noticed that a few of the files required for building redis and jemalloc were being ignored in the main .gitignore and deps/jemalloc/.gitignore.

Specifically, the main .gitignore was ignoring:

src/redis-benchmark.c
src/redis-check-aof.c
src/redis-check-dump.c
src/redis-cli.c
src/release.h
tests/assets/encodings.rdb
tests/assets/hash-zipmap.rdb
tests/integration/redis-cli.tcl
utils/redis-copy.rb
utils/redis-sha1.rb

I believe that the offending lines in .gitignore are:
redis-*
release.h
*.rdb

Second, in deps/jemalloc/.gitignore, the following files were being ignored:
deps/jemalloc/VERSION
deps/jemalloc/configure
deps/jemalloc/doc/jemalloc.3
deps/jemalloc/doc/jemalloc.html
deps/jemalloc/test/jemalloc_test.h.in

I believe that the offending lines in deps/jemalloc/.gitignore are:
/configure
doc/jemalloc.html
/doc/jemalloc.3
/test/jemalloc_test.h
/VERSION

I understand that this practice of committing the source code of third-party tools may not be the norm, but it would be nice to fix the .gitignores tonot ignore files that are already committed/part of the tarball (as .gitignore has no effect on files that are already being tracked).

Activity

  1. antirez commented on Apr 18, 2013

    @antirez
    Contributor

    Hello, there was a problem indeed... Thanks, now it's fixed in all branches.

    However I did all the edits you suggested, but release.h as it is automatically generated by Redis every time you try to build it.

  2. antirez commented on Apr 18, 2013

    @antirez
    Contributor

    p.s. thank you for reporting this. Closing, but feel free to comment more here if there is something still wrong.

  3. jperla commented on Apr 16, 2014

    @jperla

    @antirez I found another problem with these rules (dating back to 2.6.17 too). It seems to ignore deps/jemalloc/test/jemalloc_test.h.in .

    The fix is to add the following line to deps/jemalloc/.gitignore:

    !test/*.h.in

    @rrueth did your company hit this as well?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions