Comments (8)
Could you explain this issue a bit more ?
I have no idea what it's about
from coala-quickstart.
The gitignore already contains globs to ignore e.g. generated files. We need to ignore e.g. for python projects the build directory in the coafile and the gitignore, this issue is about coala-quickstart using gitignore to generate the ignore setting for a coafile automatically.
from coala-quickstart.
Ahh, i see - so, it's auto filling the coafile ignore setting using
gitignore.
Just a note: hgignore has a similar syntax to gitignore - could do that too
?
Also, Our globs and gitignore globs are not similar.
For example, "build" in gitignore means /build/ or similar in our
globs. But ".pyc" would be */.pyc. etc
On Sun, Mar 6, 2016 at 12:25 AM, Lasse Schuirmann [email protected]
wrote:
The gitignore already contains globs to ignore e.g. generated files. We
need to ignore e.g. for python projects the build directory in the coafile
and the gitignore, this issue is about coala-quickstart using gitignore to
generate the ignore setting for a coafile automatically.—
Reply to this email directly or view it on GitHub
#13 (comment)
.
from coala-quickstart.
@AbdealiJK I verified the following: (tracked - doesn't match, untracked - matches)
- with
.c
:./file.c
is still tracked - with
*.c
:./file.c
is untracked - with
*.c
:./test1/file.c
is untracked - with
.c
:./test1/file.c
is obviously tracked - with
**.c
:./test1/file.c
and./file.c
and are both untracked - with
.c
and*.c
:./.c
is untracked - with
file
:./file
and./test/file
are both untracked
Now consider only ./test/build/test2/file.c
.
- with
build
- untracked - with
test
- untracked - with
file
- tracked - with
file.c
- untracked - with
/build
,/file.c
- tracked - with
/test
- untracked - with
test/
,build/
- untracked
This is getting really weird and I'm super confused. However I found this JavaScript library that converts from gitignore globs to some other glob format (however I'm unsure whether our glob is same as that).
from coala-quickstart.
Nearly All of those make sense to me, why are you confused? Have you read https://git-scm.com/docs/gitignore ?
The only case which doesn't make sense is
Pattern: 'test' tracking the file './test/build/test2/file.c'. Imo it shouldn't, can you recheck?
from coala-quickstart.
@AbdealiJK For instance build
matches the file, which doesn't feel intutive to me (because it's not in the root directory). But that's probably because I'm thinking very verbose - I'd prefer for only **/build/**
to match the file instead of build
, but I totally understand build
matching the file is simpler.
And you're right, test
does make the file untracked. Sorry about that 😅
from coala-quickstart.
it's quite simple: every untracked file that matches a pattern in gitignore is ignored. If it's already tracked it isn't ignored. You can make it ignored again when you delete the file from the repository.
from coala-quickstart.
https://gist.github.com/hypothesist/d58073e5add2f1d5abc5e66183bddeb2
From Gitter:
@AbdealiJK [ref] -
- Not sure if \ is also acceptable for windows (instead of the first /), so maybe test that out ?
- Your is_glob_exp checks for ( but what about ( in file names ? like the Windows pesky "Program files (x86)" ? Will it get confused by that ?
- You seem to be adding ** in the line 6,7 - what if it's not a directory ? like if I ignore /.coverage or /npm-log.txt or /Gemfile.lock
os.path.join(os.path.join(project_dir, "**"), line)
==os.path.join(project_dir, "**", line)
- What about a case like I do test.c in my gitignore and I happen to have a folder named test.c - will the contents of the folder be ignored by git ? (Your code does ignore the contents of the folder)
me [ref] -
- I just verified on Windows: /cov successfully ignores a file cov in the root directory.
- test (1|2) ignores a file called test (1|2) (literally). But test (1|2) never ignores a directory/file named test 1. Does git even support alternatives? Although test [12] ignores test 1. Anyway, a file called test [1] is not ignored when I add the same to .gitignore. However it is ignored when I escaped the [ and ]. So the fix is simple: before checking for *!?[](not no parens, ?, |), remove all escaped characters?
- How about adding both ./cov and ./cov/** to the glob list? There can never exist a file and dir with the same name at the same place, so this should cover both and exactly the one that's there?
- git does ignore a directory called test.c when test.c is added to .gitignore
from coala-quickstart.
Related Issues (20)
- Node initialiser includes dead code HOT 1
- initialize_project_data includes dead code HOT 1
- function green_mode unnecessary delayed import of check_filename_prefix_postfix HOT 10
- UtilitiesTest.py test method test_search_for_orig contains dead code HOT 2
- test_bear_test_fun_2 contains unused test_unified_results HOT 2
- TestUtilities.py bear_test_module unused variable mocked HOT 1
- .travis.yml: Cache ntlk data
- add .coafile.green to .gitignore HOT 1
- facilitate deletion of coafile.green on running pytest HOT 3
- Investigate: how to use the nextgen-core for more reliable and easier processing of bears HOT 1
- coala-ci failing because of old version of a bear
- green_modeTest.py: Unused import AllKindsOfSettingsDependentBear HOT 3
- Unable to install for Python 3.7 HOT 2
- Use coala & coala-bears master HOT 2
- Spelling mistake taraget HOT 5
- Spelling mistake caputred HOT 1
- Add .editorconfig to moban sync HOT 1
- green_mode.py: Incomplete branch coverage on python3.6 HOT 2
- Make coala-quickstart generate configuration files in TOML
- spelling of command is incorrect in Installation section. HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from coala-quickstart.