summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Ankarström <john@ankarstrom.se>2022-01-22 18:22:10 +0100
committerJohn Ankarström <john@ankarstrom.se>2022-01-22 18:22:10 +0100
commit95b78a40d28192f319462ba8f277ff26fdb40d8a (patch)
treef2a5701332987fb6c7b987530645053bd3ced1f1
parent5819d9faef5507a87d06c6f01eb8298b0eb5ec82 (diff)
downloadsave-95b78a40d28192f319462ba8f277ff26fdb40d8a.tar.gz
M save.pl
M save.pl~
-rw-r--r--save.pl5
-rw-r--r--save.pl~3
2 files changed, 5 insertions, 3 deletions
diff --git a/save.pl b/save.pl
index 2e192b4..b06d2e4 100644
--- a/save.pl
+++ b/save.pl
@@ -84,12 +84,11 @@ commit(Msg) :-
write('creating process'), nl,
process_create(path(git), ['commit', '-m', Msg],
[process(PID)]),
- write(waiting), nl,
process_wait(PID, S),
- write(waited), nl,
commited(S).
-commited(1) :-
+commited(S) :-
+ dif(S, 0),
send(@display, report, error,
'Files could not be saved.').
diff --git a/save.pl~ b/save.pl~
index 5990d16..2e192b4 100644
--- a/save.pl~
+++ b/save.pl~
@@ -81,9 +81,12 @@ chain_atom_x(C, A0, A) :-
).
commit(Msg) :-
+ write('creating process'), nl,
process_create(path(git), ['commit', '-m', Msg],
[process(PID)]),
+ write(waiting), nl,
process_wait(PID, S),
+ write(waited), nl,
commited(S).
commited(1) :-