fix pull merging

This commit is contained in:
xfnw 2020-09-30 22:13:45 +00:00
parent 04a362e01b
commit 5412b5b225
1 changed files with 3 additions and 3 deletions

6
nboard
View File

@ -143,9 +143,9 @@ please report any bugs to ~xfnw on IRC, anywhere you can find him, or
on the tildegit page, https://tildegit.org/xfnw/nboard
""")
elif len(sys.argv) > 1 and sys.argv[1] == 'pull':
branches=subprocess.run(['git','--dir-dir='+os.path.expanduser('~')+'/.nboard','for-each-ref','refs/remotes','--format','%(rename)'], capture_output=True).stdout.decode().splitlines()
subprocess.run(['git','--git-dir='+os.path.expanduser('~')+'/.nboard','pull','--all'])
subprocess.run(['git','--git-dir='+os.path.expanduser('~')+'/.nboard','merge']+branches)
branches=subprocess.run(['git','--git-dir='+os.path.expanduser('~')+'/.nboard/.git','for-each-ref','refs/remotes','--format','%(refname)'], capture_output=True).stdout.decode().splitlines()
subprocess.run(['git','--git-dir='+os.path.expanduser('~')+'/.nboard/.git','fetch','--all'])
subprocess.run(['git','--git-dir='+os.path.expanduser('~')+'/.nboard/.git','merge']+branches)
print("pulled all remotes!")
else:
try: