andsens / homeshick

git dotfiles synchronizer written in bash
MIT License
2.11k stars 145 forks source link

Make 'homeshick check' ls-remote call compatbile with git-1.7 #159

Closed wlonkly closed 7 years ago

wlonkly commented 7 years ago

Turns out git 1.7... (1) doesn't support the -q option to ls-remote, and (2) is what ships with RHEL 6/CentOS 6, so homeshick check always fails uncheckable there. As best as I can tell, -q is a noop for 'git ls-remote --heads' when you supply the repo as an argument, so it's safe to remove.

wlonkly commented 7 years ago

Fixes #160.

andsens commented 7 years ago

Thank you for taking time to fix this!

Reading the man page I see that the -q is wholly unnecessary:

       -q, --quiet
           Do not print remote URL to stderr.

The command redirects stderr to /dev/null anyways so there is really no need for the flag. Maybe there should be a unit test for this fix but homeshick does not have a testing harness to install different git versions, so I think it's fine we skip that for now :-)

Merging.