From: "Shawn O. Pearce" <spearce@spearce.org>
To: Johannes Sixt <j.sixt@viscovery.net>
Cc: David Aguilar <davvid@gmail.com>,
gitster@pobox.com, git@vger.kernel.org, johan@herland.net,
mlevedahl@gmail.com
Subject: Re: [PATCH] git-submodule: remove unnecessary exits when calling resolve_relative_url
Date: Thu, 25 Sep 2008 07:54:07 -0700 [thread overview]
Message-ID: <20080925145407.GM3669@spearce.org> (raw)
In-Reply-To: <48DB81DE.6070600@viscovery.net>
Johannes Sixt <j.sixt@viscovery.net> 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.
next prev parent reply other threads:[~2008-09-25 14:55 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-09-22 16:08 [PATCH] Fix submodule sync with relative submodule URLs Johan Herland
2008-09-24 7:29 ` David Aguilar
2008-09-24 9:31 ` Johan Herland
2008-09-24 16:19 ` Shawn O. Pearce
2008-09-24 16:41 ` Johan Herland
2008-09-25 11:38 ` David Aguilar
2008-09-25 11:21 ` [PATCH] git-submodule: remove unnecessary exits when calling resolve_relative_url David Aguilar
2008-09-25 12:19 ` Johannes Sixt
2008-09-25 14:54 ` Shawn O. Pearce [this message]
2008-09-25 14:58 ` Johan Herland
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20080925145407.GM3669@spearce.org \
--to=spearce@spearce.org \
--cc=davvid@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=j.sixt@viscovery.net \
--cc=johan@herland.net \
--cc=mlevedahl@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).