Skip to content

Commit

Permalink
Better git fetch
Browse files Browse the repository at this point in the history
Related to FreshRSS#2625

If for some reasons branches have diverged:, e.g.:

```
$ git status -sb --porcelain remote
## dev...origin/dev [ahead 4, behind 1]
```
  • Loading branch information
Alkarex committed Nov 2, 2019
1 parent c277e15 commit abc7eca
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/Controllers/updateController.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public static function hasGitUpdate() {
}
chdir($cwd);
$line = is_array($output) ? implode('; ', $output) : '' . $output;
return strpos($line, '[behind') !== false;
return strpos($line, '[behind') !== false || strpos($line, '[ahead') !== false;
}

public static function gitPull() {
Expand Down

0 comments on commit abc7eca

Please sign in to comment.