Skip to content

Commit

Permalink
git: Use Git built for Windows on Cygwin when working with LFS
Browse files Browse the repository at this point in the history
  • Loading branch information
pallxk committed Jan 6, 2017
1 parent 767080b commit ae1c9f9
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions bash/.bashrc.d/git.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,17 @@ git () {
elif [ "$command" = "cd" -a $# -eq 0 ]; then
cd "$(git rev-parse --show-toplevel)"
return

# git lfs
elif [ "$command" = "lfs" ]; then
# Use Git built for Windows on Cygwin when working with LFS
if [[ $(uname -s) = CYGWIN* ]]; then
local git="$(type -pa git | grep ^/cygdrive/ | head -1)"
if [ "$git" ]; then
"$git" "$command" "$@"
return
fi
fi
fi

# Execute the original command with defaults inserted
Expand Down

0 comments on commit ae1c9f9

Please sign in to comment.