Re: [PATCH] git-clone: improve error message if curl program is missing or not executable

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Gerrit Pape <pape@xxxxxxxxxxx> writes:

> If the curl program is not available (or not executable), and git clone is
> started to clone a repository through http, this is the output
>
>  Initialized empty Git repository in /tmp/puppet/.git/
>  /usr/bin/git-clone: line 37: curl: command not found
>  Cannot get remote repository information.
>  Perhaps git-update-server-info needs to be run there?
>
> This patch improves the error message by checking the return code when
> running curl to exit immediately if it's 126 or 127; the error output now
> is
>
>  Initialized empty Git repository in /tmp/puppet/.git/
>  /usr/bin/git-clone: line 37: curl: command not found
> ...
> The hint that 'Perhaps git-update-server-info needs to be run there'
> might make sense, so I made it only exit if the return code is 126 or
> 127.

Thanks.  Is 126/127 stable?  Otherwise we may be better off
doing the check in your original patch, but after detecting
error from curl executable, like:

	curl ... original invocation ... || {
        	status=$? 
                if type says curl is unavailable
                then
                	exit
		fi
                return $status
	}                        

But that can be fixed up in a follow-up patch/discussion.  I'll
take your patch as-is and apply it to 'maint'.
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux