[Intel-gfx] [dim PATCH v2 5/7] dim: fix list-upstreams when not in a git repo or with a drm upstream in place
Jani Nikula
jani.nikula at intel.com
Thu Nov 24 15:32:38 UTC 2016
'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 at 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
More information about the Intel-gfx
mailing list