diff options
author | John Ankarström <john@ankarstrom.se> | 2022-01-22 22:35:01 +0100 |
---|---|---|
committer | John Ankarström <john@ankarstrom.se> | 2022-01-22 22:35:01 +0100 |
commit | e3b572e8ee9c1400eea172dd2b53c00f1eaa9f98 (patch) | |
tree | 65df017cda44789cc8a53e49ffee88d0918e798e | |
parent | 2832b5f1932a5c8c964a143782c381c819aa3625 (diff) | |
download | save-e3b572e8ee9c1400eea172dd2b53c00f1eaa9f98.tar.gz |
-rw-r--r-- | save.pl | 15 |
1 files changed, 6 insertions, 9 deletions
@@ -38,12 +38,11 @@ init :- added(S) :- dif(S, 0), - !, send(@display, report, error, 'Files could not be added to index. Ensure Git is in PATH and that the current directory is a Git repository.'). -added(_) :- +added(0) :- %send(@pce, load_defaults, 'Defaults'), % Right side. @@ -52,9 +51,7 @@ added(_) :- refresh, % Left side. - send(@dialog, append, text('Comment (optional):', - left, - bold)), + send(@dialog, append, text('Comment (optional):', left, bold)), send(@dialog, append, @editor), send(@dialog, append, @save_button), send(@dialog, append, @refresh_button), @@ -118,14 +115,14 @@ commit(Msg) :- process_create(path(git), ['commit', '-m', Msg], [process(PID)]), process_wait(PID, S), - commited(S). + committed(S). -commited(S) :- +committed(S) :- dif(S, exit(0)), dif(S, exit(128)), - !, send(@display, report, error, 'Files could not be saved.'). -commited(_) :- +committed(exit(N)) :- + member(N, [0,128]), send(@dialog, destroy). |