git: fix git-lazy-checkin to push
This commit is contained in:
@@ -15,7 +15,7 @@ def lazy_commit(all: bool = True, message: str = None):
|
|||||||
call_proc(git_cmd_base + ["rev-parse", "--abbrev-ref", "HEAD@{upstream}"])
|
call_proc(git_cmd_base + ["rev-parse", "--abbrev-ref", "HEAD@{upstream}"])
|
||||||
except subprocess.CalledProcessError:
|
except subprocess.CalledProcessError:
|
||||||
print("Current branch has no upstream")
|
print("Current branch has no upstream")
|
||||||
# exit(1)
|
exit(1)
|
||||||
|
|
||||||
call_proc(git_cmd_base + ["add", "-A" if all else "-u"])
|
call_proc(git_cmd_base + ["add", "-A" if all else "-u"])
|
||||||
if message is None:
|
if message is None:
|
||||||
@@ -25,7 +25,7 @@ def lazy_commit(all: bool = True, message: str = None):
|
|||||||
print("Failed to describe changes, are there any staged changes?")
|
print("Failed to describe changes, are there any staged changes?")
|
||||||
exit(1)
|
exit(1)
|
||||||
call_proc(["git", "commit", "-m", message])
|
call_proc(["git", "commit", "-m", message])
|
||||||
# call_proc(["git", "push"])
|
call_proc(["git", "push"])
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
|
|||||||
Reference in New Issue
Block a user