git-download: Print a message when falling back to a full fetch.

Otherwise the user might believe that git-fetch stalled, observing the lack of
output following a 'fatal' git error message (see:
https://debbugs.gnu.org/33100).

* guix/build/git.scm (git-fetch): Print message when falling back to a full
fetch.
master
Maxim Cournoyer 2018-10-24 08:49:50 -04:00
parent 63eb2b899b
commit 2f18b7329d
No known key found for this signature in database
GPG Key ID: 1260E46482E63562
1 changed files with 2 additions and 0 deletions

View File

@ -45,6 +45,8 @@ recursively. Return #t on success, #f otherwise."
(if (zero? (system* git-command "fetch" "--depth" "1" "origin" commit))
(invoke git-command "checkout" "FETCH_HEAD")
(begin
(setvbuf (current-output-port) 'line)
(format #t "Failed to do a shallow fetch; retrying a full fetch...~%")
(invoke git-command "fetch" "origin")
(invoke git-command "checkout" commit)))
(when recursive?