diff mbox

dim: really make the branch argument for dim retip optional

Message ID 20170321124519.13148-1-daniel.vetter@ffwll.ch (mailing list archive)
State New, archived
Headers show

Commit Message

Daniel Vetter March 21, 2017, 12:45 p.m. UTC
Some didn't work, at least here.

Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
---
 dim | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)
diff mbox

Patch

diff --git a/dim b/dim
index 821147510dc5..91e75299f56d 100755
--- a/dim
+++ b/dim
@@ -380,7 +380,13 @@  function dim_retip
 	local branch upstream remote
 
 	branch="$1"
-	shift
+
+	if [ -n "$branch" ] ; then
+		shift
+	else
+		branch=$(git symbolic-ref --short HEAD)
+	fi
+
 	remote=$(url_to_remote $drm_tip_ssh)
 	upstream=$(git_find_tip "$branch")