Comments (8)
Good idea. Though I don't like hardcoding stuff like that.
How about reading the things link
should ignore from the .gitignore
file?
Incidentally we could use git ls-files
instead of find
for that I believe.
from homeshick.
From a .gitignore in /home or one dir up, in the castle?
On Sun, Dec 15, 2013 at 4:26 AM, Anders Ingemann
[email protected]:
Good idea. Though I don't like hardcoding stuff like that.
How about reading the things link should ignore from the .gitignore file?
Incidentally we could use git ls-files instead of find for that I believe.—
Reply to this email directly or view it on GitHubhttps://github.com//issues/73#issuecomment-30601767
.
from homeshick.
Well git ls-files
would take all those into consideration, even .gitignore-global
, which is where I would ignore stuff like .DS_Store
.
from homeshick.
I can't think of any potential issues; has my vote. 👍
from homeshick.
Since git 1.8.2 there is git check-ignore
, given a path it returns whether the file is ignored.
Using that would avoid having to rewrite the entire linking function (ls-files
only lists files, not folders like find). check-ignore
exits with 0 if a file is ignored and 1 if it isn't. This also works with force added files (i.e. it returns 1).
I think it would be fair to require git 1.8.2 for this feature to be working and simply fall back to not checking for ignored files when git < 1.8.2.
from homeshick.
Sounds good! Only thing I can think to add for you to look at (not sure if it really helps) is this prezto alias which lists ignored files inside a repo:
https://github.com/sorin-ionescu/prezto/blob/master/modules/git/alias.zsh#L75
I'm sure check-ignore
is fast, and falling back to the default behavior for git versions < 1.8.2 should be harmless as long as it's well documented.
from homeshick.
Only thing I can think to add for you to look at (not sure if it really helps) is this prezto alias which lists ignored files inside a repo
alias gdi='git status --porcelain --short --ignored | sed -n "s/^!! //p"'
Hm interesting, especially because it uses --porcelain
and seems like a rather stable command.
This is certainly an option if we want backwards compatibility.
However, for stabilities sake I think I'll refrain from implementing that, checking whether an exit code is 0 or 1 has a much lower chance of going wrong. I'll leave the backwards compatible part to someone who really needs it and creates a PR.
from homeshick.
I'm merging this into #95 since solving it would also solve this issue.
from homeshick.
Related Issues (20)
- New version? HOT 4
- Homeshick gives a help message and crashes my zsh session HOT 1
- Don't commit home folder HOT 1
- Dependancy Issue with ASDF HOT 5
- Add dry run mode HOT 2
- Homeshick doesnt prompt me upon refresh HOT 1
- Clone command should use git@github as the remote origin HOT 4
- Always says my castles are outdated no matter I just refreshed HOT 5
- Cloning takes forever for simple repos HOT 1
- Automatically symlink submodules of castle as a single symlink to toplevel directory HOT 4
- homeshick doesn't track nor link .git directories HOT 6
- Your package destroyed all of my dotfiles HOT 13
- 解决zsh补全msfvenom出现_values:compvalues:11: not enough arguments(参数不足)的问题 HOT 2
- Clone/pull on large repositories/submodules: Recursion and depth HOT 2
- New version? HOT 1
- Clone to directory, and set working directory, like git -C directory HOT 2
- Relative symlinks do not allow git templatedir to live in castle HOT 3
- Naming differences HOT 4
- Installing homeschick broke the terminal HOT 2
- Ability to track a whole directory HOT 5
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 homeshick.