From: Jani Nikula <jani.nikula@intel.com>
To: intel-gfx@lists.freedesktop.org
Cc: jani.nikula@intel.com
Subject: [dim PATCH v2 5/7] dim: fix list-upstreams when not in a git repo or with a drm upstream in place
Date: Thu, 24 Nov 2016 17:32:38 +0200 [thread overview]
Message-ID: <1480001560-18790-5-git-send-email-jani.nikula@intel.com> (raw)
In-Reply-To: <1480001560-18790-1-git-send-email-jani.nikula@intel.com>
'dim list-upstreams' is needed by bash completion and is used outside of
git repos, also within git repos without drm upstream, so don't fail if
it can be avoided.
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
---
dim | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/dim b/dim
index 3c7b6fc1343b..76e129de873d 100755
--- a/dim
+++ b/dim
@@ -1222,7 +1222,11 @@ function dim_list_upstreams
{
local dim_drm_upstream_remote
- dim_drm_upstream_remote=`url_to_remote $drm_upstream_git`
+ # Handle failures gracefully
+ if ! dim_drm_upstream_remote=$(url_to_remote $drm_upstream_git 2>/dev/null); then
+ return 0
+ fi
+
echo origin/master
echo $dim_drm_upstream_remote/drm-next
echo $dim_drm_upstream_remote/drm-fixes
--
2.1.4
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2016-11-24 15:33 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-24 15:32 [dim PATCH v2 1/7] dim: rename rebuild-nightly to rebuild-tip Jani Nikula
2016-11-24 15:32 ` [dim PATCH v2 2/7] dim: fix references to anything "nightly" in dim and documentation Jani Nikula
2016-11-24 15:32 ` [dim PATCH v2 3/7] dim: do not do local variable assignments in declaration Jani Nikula
2016-11-24 15:37 ` Jani Nikula
2016-11-24 15:32 ` [dim PATCH v2 4/7] dim: return exit status instead of actually exiting from url_to_remote Jani Nikula
2016-11-24 15:32 ` Jani Nikula [this message]
2016-11-24 15:32 ` [dim PATCH v2 6/7] dim: check positional parameter on dim fixes and cite Jani Nikula
2016-11-24 15:32 ` [dim PATCH v2 7/7] dim: unify rebuild fetch/merge messages Jani Nikula
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=1480001560-18790-5-git-send-email-jani.nikula@intel.com \
--to=jani.nikula@intel.com \
--cc=intel-gfx@lists.freedesktop.org \
/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