From 5a4e49ea56ff7619df09ef99b83401f11e7cbe6a Mon Sep 17 00:00:00 2001 From: Ben Kurtovic Date: Fri, 5 Jun 2015 21:14:59 -0400 Subject: [PATCH] Don't update branches for bare repos (#14) --- gitup/update.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/gitup/update.py b/gitup/update.py index 15bedd4..5a3145c 100644 --- a/gitup/update.py +++ b/gitup/update.py @@ -237,12 +237,13 @@ def _update_repository(repo, current_only=False, rebase=False, merge=False): else: remotes = repo.remotes if not remotes: - print(INDENT2, ERROR, "no remotes configured to pull from.") + print(INDENT2, ERROR, "no remotes configured to fetch.") return rebase = rebase or _read_config(repo, "pull.rebase") _fetch_remotes(remotes) - _update_branches(repo, active, merge, rebase) + if not repo.bare: + _update_branches(repo, active, merge, rebase) def _update_subdirectories(path, long_name, update_args): """Update all subdirectories that are git repos in a given directory."""