From: Jani Nikula <jani.nikula@intel.com>
To: igt-dev@lists.freedesktop.org
Cc: Jani Nikula <jani.nikula@intel.com>
Subject: [igt-dev] [PATCH 1/3] dim: pass git directory via parameter in dim cite, don't cd
Date: Mon, 14 Jan 2019 13:41:03 +0200 [thread overview]
Message-ID: <20190114114105.6944-1-jani.nikula@intel.com> (raw)
Make dim_cite safer to use within dim.
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
---
dim | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/dim b/dim
index b2fddff1010c..9aac817be567 100755
--- a/dim
+++ b/dim
@@ -2275,9 +2275,8 @@ function dim_cite
sha1=${1:?$usage}
- cd $DIM_PREFIX/$DIM_REPO
-
- git log -1 $sha1 "--pretty=format:%H (\"%s\")%n" | \
+ git --git-dir="$DIM_PREFIX/$DIM_REPO/.git" log -1 $sha1 \
+ "--pretty=format:%H (\"%s\")%n" | \
sed -e 's/\([0-f]\{12\}\)[0-f]*/\1/'
}
--
2.20.1
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev
next reply other threads:[~2019-01-14 11:39 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-01-14 11:41 Jani Nikula [this message]
2019-01-14 11:41 ` [igt-dev] [PATCH 2/3] dim: improve error messages in push branch checks Jani Nikula
2019-01-14 11:41 ` [igt-dev] [PATCH 3/3] dim: add safeguards for users pushing too many commits at once Jani Nikula
2019-01-14 15:24 ` [igt-dev] [PATCH 1/3] dim: pass git directory via parameter in dim cite, don't cd 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=20190114114105.6944-1-jani.nikula@intel.com \
--to=jani.nikula@intel.com \
--cc=igt-dev@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.