From: Thierry Reding <thierry.reding@gmail.com>
To: intel-gfx@lists.freedesktop.org
Cc: dri-devel@lists.freedesktop.org
Subject: [maintainer-tools PATCH 2/2] dim: Simplify test for current branch
Date: Mon, 31 Jul 2017 19:15:53 +0200 [thread overview]
Message-ID: <20170731171553.30586-2-thierry.reding@gmail.com> (raw)
In-Reply-To: <20170731171553.30586-1-thierry.reding@gmail.com>
From: Thierry Reding <treding@nvidia.com>
Instead of listing branches and grepping for the current branch, simply
read the name of the current branch and compare.
Suggested-by: Daniel Vetter <daniel.vetter@intel.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
---
dim | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dim b/dim
index 1422b35e2471..ebb1da05662d 100755
--- a/dim
+++ b/dim
@@ -333,7 +333,7 @@ function git_current_branch
function git_is_current_branch # branch
{
- git branch --list $1 | grep -q '\*'
+ test "$(git_current_branch)" = "$1"
}
function git_branch_exists # branch
--
2.13.3
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
next prev parent reply other threads:[~2017-07-31 17:15 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-07-31 14:17 [maintainer-tools PATCH] dim: Add apply and push shorthands for current branch Thierry Reding
2017-07-31 15:51 ` Daniel Vetter
2017-07-31 17:15 ` [maintainer-tools PATCH v2 1/2] " Thierry Reding
2017-07-31 17:15 ` Thierry Reding [this message]
2017-08-03 10:50 ` Jani Nikula
2017-08-03 12:39 ` Daniel Vetter
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=20170731171553.30586-2-thierry.reding@gmail.com \
--to=thierry.reding@gmail.com \
--cc=dri-devel@lists.freedesktop.org \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.