diff --git a/src/git/commit.py b/src/git/commit.py index 35d1069..74e4918 100644 --- a/src/git/commit.py +++ b/src/git/commit.py @@ -7,11 +7,11 @@ def Commit(): commit_message = prompt("Commit Message [v:vim mode]") if commit_message.count('`'): warning( - '{M}{BL}`{M}{R} is not acceptable in this mode.') - if confirm('Replace {M}{BL}`{M}{C} with {M}{BL}\'{M}{C}'): + f'{M}{BL}`{M}{R} is not acceptable in this mode.') + if confirm(f'Replace {M}{BL}`{M}{C} with {M}{BL}\'{M}{C}'): commit_message = commit_message.replace('`', "'") warning( - '{M}{BL}`{M}{R} is now replaced with {M}{BL}\'{R}...') + f'{M}{BL}`{M}{R} is now replaced with {M}{BL}\'{R}...') else: warning('Now entering vim mode...') commit_message = 'v' diff --git a/src/git/pull.py b/src/git/pull.py index 4de4160..3c37240 100644 --- a/src/git/pull.py +++ b/src/git/pull.py @@ -1,4 +1,18 @@ from ..issues import execute def Pull(remote, branch): - execute([f'git pull {remote} {branch}']) \ No newline at end of file + if not Status(): + execute([f'git pull {remote} {branch}']) + else: + execute([f'git diff --stat']) + print( + f'\nTheres some changes in branch {br(current_branch)}.') + qs = [f'Commit changes of branch {br(current_branch)}'] + qs.append(f'Stash changes of branch {br(current_branch)} ') + answer = getAnswer(qs) + if answer == 1: + execute([f'git add .', f'git diff --stat']) + Commit() + elif answer == 2: + execute([f'git stash']) + execute([f'git pull {remote} {branch}'])