We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 88c63a9 commit 6f9183dCopy full SHA for 6f9183d
src/update.py
@@ -7,14 +7,12 @@
7
with open(os.path.join(HOME_PATH, 'VERSION'), 'r') as f:
8
VERSION = f.read().strip()
9
10
-flag = False
11
12
def check_update(repo: git.Repo, remote: git.Remote):
13
- global flag
14
remote.fetch()
15
- status = repo.is_dirty()
16
- flag = True
17
- return status
+ local_branch = repo.active_branch
+ remote_branch = repo.remotes.origin.refs[local_branch.name]
+ return local_branch.commit != remote_branch.commit
18
19
def update():
20
repo = git.Repo(HOME_PATH)
0 commit comments