Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

grv seems to ignore entries with wildcards in .gitignore #55

Open
marcelpaulo opened this issue Apr 12, 2018 · 2 comments
Open

grv seems to ignore entries with wildcards in .gitignore #55

marcelpaulo opened this issue Apr 12, 2018 · 2 comments

Comments

@marcelpaulo
Copy link

I've got this .gitignore:

# files directly below bk.d are output by the backup scriplets, so they don't
# need to be tracked
bk.d/*
!bk.d/*/

which is applied to this repo tree:

+paulo@monk:~/prj/s/bk$ tree
.
├── bin
│   └── bk
├── bk.d
│   ├── foto
│   │   ├── 80backup-file
│   │   └── 90check-partition
│   ├── installed_packages
│   ├── musica
│   │   ├── 10stop-quodlibet
│   │   ├── 80backup-file
│   │   └── 90check-partition
│   ├── online
│   │   ├── 10get-contacts
│   │   └── 10get-trakt-episodes
│   ├── ppas
│   ├── software_from_source
│   ├── sys
│   │   ├── 10get-installed-package
│   │   ├── 10get-ppa
│   │   ├── 10get-source-software
│   │   ├── 80backup-file
│   │   ├── 90check-partition
│   │   └── backup_rules
│   ├── video
│   │   ├── 80backup-file
│   │   └── 90check-partition
│   └── watch
│       ├── 80backup-file
│       └── 90check-partition
└── default
    └── bk

so that the directories below bk.d are tracked, but the files directly below it are not. git is parsing .gitignore correctly:

+paulo@monk:~/prj/s/bk$ git status
On branch master
nothing to commit, working tree clean

But grv doesn't seem to:

image

I'm running grv master (783dad1) on Xubuntu 17.10 with go 1.10.

I ran grv with -logLevel DEBUG and here's the log file in case it helps. I didn't see any mention of .gitignore.

@rgburke
Copy link
Owner

rgburke commented Apr 12, 2018

Thanks for reporting this issue. GRV uses the libgit2 library to interface with a git repository. libgit2 performs all logic related to the repository including reading the .gitignore file and generating status output.

This appears to be a bug with libgit2 and I have raised libgit2/libgit2#4624 against libgit2 using the example you've provided.

@marcelpaulo
Copy link
Author

You nailed it ! Yes, of course, I could have thought that libgit2 handled all the interaction with the repository, but ... I didn't. Apologies !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants