public inbox for igt-dev@lists.freedesktop.org
 help / color / mirror / Atom feed
* [igt-dev] [PATCH 1/3] dim: pass git directory via parameter in dim cite, don't cd
@ 2019-01-14 11:41 Jani Nikula
  2019-01-14 11:41 ` [igt-dev] [PATCH 2/3] dim: improve error messages in push branch checks Jani Nikula
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Jani Nikula @ 2019-01-14 11:41 UTC (permalink / raw)
  To: igt-dev; +Cc: Jani Nikula

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

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2019-01-14 15:22 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-01-14 11:41 [igt-dev] [PATCH 1/3] dim: pass git directory via parameter in dim cite, don't cd Jani Nikula
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox