From 1e5b21e28d58b1b16a36111967e2ee77464cafbd Mon Sep 17 00:00:00 2001 From: Raymond Toy Date: Mon, 10 Oct 2011 21:54:17 -0700 Subject: [PATCH] Handle the case where Git describe prints nothing. In this case, just use the original file comment. --- compiler/main.lisp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/compiler/main.lisp b/compiler/main.lisp index 7bfce70b4..58af0435d 100644 --- a/compiler/main.lisp +++ b/compiler/main.lisp @@ -1127,11 +1127,13 @@ in the user USER-INFO slot of STREAM-SOURCE-LOCATIONs.") (setf (default-directory) cwd)))) (generate-comment (file-info) (let* ((name (pathname (source-info-stream file-info))) - (proc (run-git name))) - (if (and proc (zerop (process-exit-code proc))) + (proc (run-git name)) + comment) + (if (and proc (zerop (process-exit-code proc)) + (setf comment (read-line (process-output proc) nil nil))) (format nil "$Header: ~A ~A $" (enough-namestring name) - (read-line (process-output proc))) + comment) (second form))))) (cond ((file-info-comment file) (compiler-warning _N"Ignoring extra file comment:~% ~S." form)) -- GitLab