Commit 1e5b21e2 authored by Raymond Toy's avatar Raymond Toy

Handle the case where Git describe prints nothing. In this case, just

use the original file comment.
parent fce6baff
...@@ -1127,11 +1127,13 @@ in the user USER-INFO slot of STREAM-SOURCE-LOCATIONs.") ...@@ -1127,11 +1127,13 @@ in the user USER-INFO slot of STREAM-SOURCE-LOCATIONs.")
(setf (default-directory) cwd)))) (setf (default-directory) cwd))))
(generate-comment (file-info) (generate-comment (file-info)
(let* ((name (pathname (source-info-stream file-info))) (let* ((name (pathname (source-info-stream file-info)))
(proc (run-git name))) (proc (run-git name))
(if (and proc (zerop (process-exit-code proc))) comment)
(if (and proc (zerop (process-exit-code proc))
(setf comment (read-line (process-output proc) nil nil)))
(format nil "$Header: ~A ~A $" (format nil "$Header: ~A ~A $"
(enough-namestring name) (enough-namestring name)
(read-line (process-output proc))) comment)
(second form))))) (second form)))))
(cond ((file-info-comment file) (cond ((file-info-comment file)
(compiler-warning _N"Ignoring extra file comment:~% ~S." form)) (compiler-warning _N"Ignoring extra file comment:~% ~S." form))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment