• Fabian Homborg's avatar
    lib/git/git_is_touched: Speed up (#706) · 131c8d74
    Fabian Homborg authored
    * lib/git/git_is_touched: Speed up
    
    This used to use `git status --porcelain`, which by necessity needs to
    check the entire repo for all kinds of changes, just to figure out if
    there are any.
    
    Instead, we now use git commands that can exit early.
    
    In large repos, this can be faster by a factor of 15 or so.
    
    Fixes #624.
    
    * Fix return status
    
    `git diff` also returns 1 if there *is* a diff.
    131c8d74
git_is_touched.fish 394 Bytes