Commit Graph

8 Commits

Author SHA1 Message Date
Fabian Homborg
131c8d74e5 lib/git/git_is_touched: Speed up (#706)
* 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.
2019-06-07 12:14:11 -07:00
Itzik Ephraim
a6a67be60b Use posix stderr redirection (2> instead of ^)
Fish is deprecating `^` as a shortcut for stderr redirection.
Replace with the more common and compatible `2>`.

Fixes #609
2018-06-09 01:23:32 +03:00
Derek Willian Stavis
8aa8acb027 lib/git: fix branch name in detached head (#366) 2016-07-22 13:27:38 -03:00
Derek Stavis
de0aaeabf7 git_ahead: Fix indicator override 2016-01-21 09:47:11 -02:00
Itzik Ephraim
e83b674fd3 bugfix: git_ahead no longer reports 'none' as 'ahead' 2016-01-19 19:00:21 +02:00
Itzik Ephraim
ec8c209f07 A different approach in git_ahead 2016-01-16 17:30:52 +02:00
Itzik Ephraim
6fa3332438 bugfix: add missing $s in git_ahead 2015-12-31 15:19:06 +02:00
Jorge Bucaran
2693a2fd18 %%% United States of the Fish → Wahoo + OMF %%% 2015-08-27 00:20:13 +09:00