aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xgiti13
1 files changed, 7 insertions, 6 deletions
diff --git a/giti b/giti
index 1d56cff..0502902 100755
--- a/giti
+++ b/giti
@@ -109,18 +109,19 @@ def giti(kind: str):
print('Found no exact match, let\'s give searching a try...')
filepath = search_for_file(kind)
if not filepath:
- print('Can\'t help any more, exiting')
- print('No changes made')
- exit(0)
+ terminate_gracefully()
gifile = get_ignore_file(filepath, path=True)
if not gifile:
- print('Can\'t help any more, exiting')
- print('No changes made')
- exit(0)
+ terminate_gracefully()
save_file(gifile)
+def terminate_gracefully():
+ print('Can\'t help any more, exiting')
+ print('No changes made')
+ exit(0)
+
def show_help():
print('Usage: giti [language or stuff]')