diff options
author | John Ankarström <john@ankarstrom.se> | 2022-01-22 19:25:08 +0100 |
---|---|---|
committer | John Ankarström <john@ankarstrom.se> | 2022-01-22 19:25:08 +0100 |
commit | 6020c9326843ee232a4fea3b2be13f9f3516abbb (patch) | |
tree | 0d3736ffe8dc3d02d2fc87b73aaa03e1f41d5824 | |
parent | 0fc1703d4dbd29b4f03cca18aa318903a8e67bab (diff) | |
download | save-6020c9326843ee232a4fea3b2be13f9f3516abbb.tar.gz |
Improve git-add error handling.
-rw-r--r-- | save.pl | 10 |
1 files changed, 6 insertions, 4 deletions
@@ -34,12 +34,14 @@ init :- shell("git add .", Status), added(Status). -added(1) :- +added(S) :- + dif(S, 0), + !, send(@display, report, error, - 'Files could not be added to index. -Ensure Git is in PATH.'). + 'Files could not be added to index. Ensure Git is in PATH +and that the current directory is a Git repository.'). -added(0) :- +added(_) :- %send(@pce, load_defaults, 'Defaults'), % Right side. |