Commit graph

15 commits

Author SHA1 Message Date
Konstantin Schukraft e4290dfb32 invoke bash via /usr/bin/env for portability 2014-07-02 09:41:37 +02:00
nickl- c749fdc54f Complete git-ignore includes global.
Did a rebase merge from the old pull request #46 which we may close now.
Yet it wasn't as simple as that in the end but all things have a resolve:
Added 2 context type arguments to specify --local or --global.
Refactored usage into functions te prevent duplication.
Capable to view and append to both global gitignore as well as the .gitignore from the working folder.
Supports all types of ignore patters including ! negated, comments as well as blank lines.
Complete documentation including several examples.
2012-07-22 22:27:37 +02:00
TweeKane aa084d9b7b Add global gitignore to git-ignore output 2012-07-22 22:27:37 +02:00
nickl- 7398d10bd4 Fix #127 git-ignore won't add duplicates.
As per the bug identified in #127 git-ignore would add duplicate entries in .gitignore which is redundant and should not happen.
grep will suitably verify that the entry doesn't exit but only if the file actually exists or we will get an error on stderr. check if the
file exists with test -f and that the new entry is present or alternatively just go ahead and add the new value which will create the file if it didn't exist.
Running the same command again does not add the duplicate.
2012-07-21 13:34:35 +02:00
Tj Holowaychuk b7222ed26e revert git-ignore but retain argc == 0 as showing .gitignore contents 2011-05-20 07:37:04 -07:00
Jonhnny Weslley 5117150a84 fixed typo error
Signed-off-by: Tj Holowaychuk <tj@vision-media.ca>
2011-05-19 14:26:47 -07:00
Jonhnny Weslley 954f3d5f45 git-ignore: show all availables templates if no patterns are found.
Signed-off-by: Tj Holowaychuk <tj@vision-media.ca>
2011-05-19 14:26:46 -07:00
Jonhnny Weslley e28c359a7a improved user feedback: show matched string using 'grep --color'
Signed-off-by: Tj Holowaychuk <tj@vision-media.ca>
2011-05-19 14:26:46 -07:00
Jonhnny Weslley 89e2047442 Fixes multiple matches selection
Signed-off-by: Tj Holowaychuk <tj@vision-media.ca>
2011-05-19 14:26:46 -07:00
Jonhnny Weslley a5392d54c3 git-ignore template support. Templates are based in https://github.com/github/gitignore
Signed-off-by: Tj Holowaychuk <tj@vision-media.ca>
2011-05-19 14:26:46 -07:00
Jonhnny Weslley 38d8a22589 git-ignore doesnt fail if .gitignore file dont exists yet
Signed-off-by: Tj Holowaychuk <tj@vision-media.ca>
2011-05-19 14:26:46 -07:00
Jonhnny Weslley 81ede0a4ba show ignored files if no arguments are provided 2010-10-08 08:29:27 -07:00
Tj Holowaychuk 4dc99404ac Added git-delete-branch 2010-08-10 21:13:59 -07:00
Tj Holowaychuk e36ef2fcb4 Docs for git-ignore. Closes #3 2010-08-05 07:41:42 -07:00
Tj Holowaychuk fc22d00bf1 Added git-ignore 2010-08-05 07:39:28 -07:00