From: Liviu Dudau <[email protected]> gitk is a fine repository browser but it requires a graphical interface that doesn't work very well with remote access. Alternative repository browsers like tig are a good replacement for those cases.
v2: (by Rodrigo) Rebased after a conflict and updated the doc to remove the remote access mention and make mention the need for detached flow and that it is just used for making pull requests. Signed-off-by: Liviu Dudau <[email protected]> Tested-by: Rodrigo Vivi <[email protected]> (with DIM_BROWSER="terminator -l simple -x tig 2>/dev/null") Signed-off-by: Rodrigo Vivi <[email protected]> --- dim | 7 +++++-- dim.rst | 10 ++++++++++ dimrc.sample | 3 +++ 3 files changed, 18 insertions(+), 2 deletions(-) diff --git a/dim b/dim index 3f5fdb9233f7..e2eb006a8376 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_BROWSER=${DIM_BROWSER:-gitk} + # make options (not used for C=1) DIM_MAKE_OPTIONS=${DIM_MAKE_OPTIONS:--j20} @@ -1841,7 +1844,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 --first-parent drm-intel-next-queued ^$(branch_to_remote drm-next)/drm-next & + $DIM_BROWSER --first-parent drm-intel-next-queued ^$(branch_to_remote drm-next)/drm-next & # try to push dinq first in case someone raced FORCE=1 dim_push_queued @@ -1942,7 +1945,7 @@ function dim_pull_request repo="drm-intel" else tag=$(tag_name "$branch") - gitk --first-parent "$branch" ^$upstream & + $DIM_BROWSER --first-parent "$branch" ^$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 f33fa57e4cb3..33498a30585d 100644 --- a/dim.rst +++ b/dim.rst @@ -455,6 +455,16 @@ options: \$DIM_MUA [-s subject] [-i file] [-c cc-addr] to-addr [...] This is only needed for sending out pull requests. +DIM_BROWSER +----------- +Browser for git repositories. Defaults to **gitk(1)**, but for non-graphical +view a suitable replacement can be found in **tig(1)**. + +It must support revision range in the same way that gitk. +It must be able run detached. + +This is only needed for sending out pull requests. + DIM_MAKE_OPTIONS ---------------- Additional options to pass to **make(1)**. Defaults to "-j20". diff --git a/dimrc.sample b/dimrc.sample index b061d2bf0c55..878ddff9dcca 100644 --- a/dimrc.sample +++ b/dimrc.sample @@ -15,5 +15,8 @@ # This is only needed for sending out pull requests #DIM_MUA=mutt +# Git repository browser. gitk (default) and tig are know to work +#DIM_BROWSER=gitk + # Command to run after dim apply #DIM_POST_APPLY_ACTION= -- 2.17.1 _______________________________________________ dim-tools mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dim-tools
