Skip to content

Commit

Permalink
chore: Fix gitignore for accidental binary commits.
Browse files Browse the repository at this point in the history
The current .gitignore patterns for accidental commits of binaries like
influxd and influx are too aggressive. It's common for tooling to use
.gitignore to filter out files from listings.

These rules cause the entire cmd/* directory to be excluded before the
exclusion (!*) rules are applied. Per gitignore manfile:

    An optional prefix "!" which negates the pattern; any matching file
    excluded by a previous pattern will become included again. It is not
    possible to re-include a file if a parent directory of that file is
    excluded.

The result is that any files/packages inside cmd/* directories cannot be found
by tooling  that uses .gitignore for file-filtering.

This adjusts the most permissive of the rules to target project root
only. Files found at other locations in the tree will be ignored
correctly.
  • Loading branch information
brettbuddin committed Jun 8, 2020
1 parent be4f989 commit d4bc963
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -75,27 +75,27 @@ cmd/influxd/version.go

*.test

influx_tsm
/influx_tsm
**/influx_tsm
!**/influx_tsm/

influx_stress
/influx_stress
**/influx_stress
!**/influx_stress/

influxd
/influxd
**/influxd
!**/influxd/

influx
/influx
**/influx
!**/influx/

influxdb
/influxdb
**/influxdb
!**/influxdb/

influx_inspect
/influx_inspect
**/influx_inspect
!**/influx_inspect/

Expand Down

0 comments on commit d4bc963

Please sign in to comment.