Re: [PATCH] git-submodule: remove unnecessary exits when calling resolve_relative_url

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

 



Johannes Sixt <j.sixt@xxxxxxxxxxxxx> wrote:
> David Aguilar schrieb:
> > resolve_relative_url calls die() when no remote url exists so these calls to
> > exit can be removed.
> ...
> > @@ -155,7 +155,7 @@ cmd_add()
> >  	case "$repo" in
> >  	./*|../*)
> >  		# dereference source url relative to parent's url
> > -		realrepo=$(resolve_relative_url "$repo") || exit
> > +		realrepo=$(resolve_relative_url "$repo")
> >  		;;
> 
> Did you test it? The command inside $(...) is run in its own sub-process,
> therefore, the die() does not exit the caller, just the sub-process, and
> the || exit *is* required.
> 
> BTW, I think that || exit is sufficient; you don't need to add another
> error message - the one that resolve_relative_url() prints is sufficient.

Exactly.

I think we just need a "|| exit" after each of these
$(resolve_relative_url) calls.  The original patch that
started this discussion just needs a "|| exit".

die with an additional message is just too verbose.


-- 
Shawn.
--
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