[PATCH] dim: Use your favorite git browser.
Rodrigo Vivi
rodrigo.vivi at intel.com
Mon Jan 22 22:50:08 UTC 2018
By having to constantly monitor dinq and navigate on the patches
I found a terminal solution that is very nifty and convenient: tig.
The big advantage from tig is that it runs on terminal.
Big disadvantage of gitk is that it has no ctrl+ to make fonts
bigger like terminals.
Gitk is still the default.
v2: Fix typo (Martin)
Signed-off-by: Rodrigo Vivi <rodrigo.vivi at intel.com>
Acked-by: Martin Peres <martin.peres at free.fr>
---
dim | 7 +++++--
dim.rst | 6 ++++++
dimrc.sample | 7 +++++++
3 files changed, 18 insertions(+), 2 deletions(-)
diff --git a/dim b/dim
index a9f7747e9a9d..5949fba1d368 100755
--- a/dim
+++ b/dim
@@ -52,6 +52,9 @@ DIM_REPO=${DIM_REPO:-${DIM_DRM_INTEL:-src}}
# usage: $DIM_MUA [-s subject] [-i file] [-c cc-addr] to-addr [...]
DIM_MUA=${DIM_MUA:-mutt}
+# Git repository browser.
+DIM_GIT_BROWSER=${DIM_GIT_BROWSER:-gitk}
+
# make options (not used for C=1)
DIM_MAKE_OPTIONS=${DIM_MAKE_OPTIONS:--j20}
@@ -1627,7 +1630,7 @@ function dim_update_next
$DRY git add drivers/gpu/drm/i915/i915_drv.h
git commit $DRY_RUN -sm "drm/i915: Update DRIVER_DATE to $driver_date"
- gitk drm-intel-next-queued ^$(repo_to_remote drm-upstream)/drm-next &
+ $DIM_GIT_BROWSER drm-intel-next-queued ^$(repo_to_remote drm-upstream)/drm-next &
# try to push dinq first in case someone raced
FORCE=1 dim_push_queued
@@ -1766,7 +1769,7 @@ function dim_pull_request
while git tag -l $tag | grep -q $tag ; do
tag="$branch-$dim_today-$((++suffix))"
done
- gitk "$branch@{upstream}" ^$upstream &
+ $DIM_GIT_BROWSER "$branch@{upstream}" ^$upstream &
tag_branch $tag $branch
$DRY git push $remote $tag
prep_pull_mail $req_file $tag
diff --git a/dim.rst b/dim.rst
index 6f64d5cad364..915317e0c24d 100644
--- a/dim.rst
+++ b/dim.rst
@@ -490,6 +490,12 @@ DIM_MUA
Mail user agent. Must support the following subset of **mutt(1)** command line
options: \$DIM_MUA [-s subject] [-i file] [-c cc-addr] to-addr [...]
+DIM_GIT_BROWSER
+---------------
+Git repository browser.
+Must support revision range in the same way that gitk.
+Must run detached.
+
DIM_MAKE_OPTIONS
----------------
Additional options to pass to **make(1)**. Defaults to "-j20".
diff --git a/dimrc.sample b/dimrc.sample
index 1b522fa47e8c..dcefeee448f0 100644
--- a/dimrc.sample
+++ b/dimrc.sample
@@ -14,5 +14,12 @@
# [-s subject] [-i file] [-c cc-addr] to-addr [...]
#DIM_MUA=mutt
+# Git repository browser.
+# Must support revision range in the same way that gitk.
+# Must run detached.
+# Examples:
+#DIM_GIT_BROWSER="xterm -hold -e tig"
+#DIM_GIT_BROWSER="konsole -e tig"
+
# Command to run after dim apply
#DIM_POST_APPLY_ACTION=
--
2.13.6
More information about the dim-tools
mailing list