Commit graph

30 commits

Author SHA1 Message Date
spacewander 458727bafb fix(git-ignore): use $XDG_CONFIG_HOME only when it is defined 2021-03-25 11:31:11 +08:00
equt ef13ed06a3
[ fix ] Quote env var 2020-11-11 22:30:10 +08:00
equt 8ed7da3f02
[ feat ] Use default global ignore file 2020-11-11 22:30:10 +08:00
Christophe Badoit 41ebe0e0bf git-ignore: support non-default .git directory
useful for submodules.

Closes tj/git-extras#807
2019-12-06 17:23:19 +01:00
Robin von Bülow 256044c04f
Use GIT_DIR environment variable to to set .git directory 2019-10-02 12:42:14 +02:00
Richard Russon f30005acfd optimisation of mkdir 2018-05-25 11:16:14 +01:00
Richard Russon 691d640b2d Ensure info dir exists 2018-05-25 10:12:27 +01:00
Richard Russon 0f76863d9b add: git-ignore -p (private to repo) 2018-05-23 23:59:21 +01:00
Jan Schulz b4f4dd1197 Add more info how to set global gitignore 2015-10-22 11:28:17 +02:00
Rob Kennedy e2b6eaf028 Don't treat ignored patterns as regexps
Fixes #353.
2015-04-29 22:48:16 -07:00
Kylie McClain 5b1ac3ccc6 use argument separator for usages of grep which can choke on weird input 2015-04-08 18:51:30 -04:00
CJ 522213a28f Support ~ in add_patterns for git-ignore 2015-03-11 15:00:30 +08:00
CJ bf89063212 Support ~ in show git-ignore 2015-03-11 15:00:24 +08:00
wooorm 1199186652 Fix typo in in git ignore message 2015-01-23 11:58:38 +01:00
spacewander 0374044790 modify the behavior of git-ignore, now it will cd root to find .gitignore 2014-11-17 21:36:56 +08:00
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