On Thu, 21 Jun 2018, Liviu Dudau <[email protected]> wrote:
> 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.
>
> Signed-off-by: Liviu Dudau <[email protected]>
> ---
>  dim          | 7 +++++--
>  dim.rst      | 5 +++++
>  dimrc.sample | 3 +++
>  3 files changed, 13 insertions(+), 2 deletions(-)
>
> diff --git a/dim b/dim
> index e477d043458b3..b3c933827f572 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}
>  
> @@ -1795,7 +1798,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
> @@ -1896,7 +1899,7 @@ function dim_pull_request
>               repo="drm-intel"
>       else
>               tag=$(tag_name "$branch")
> -             gitk --first-parent "$branch" ^$upstream &
> +             $DIM_BROWSER --first-parent "$branch" ^$upstream &

I'm lagging with emails, sorry. I don't have anything against the patch.

In the long term, I was planning on hacking the template for writing the
tag to include the pretty-formatted log of what's in the pull, as
comments. Similar to what git commit -v does for commits. This idea
doesn't conflict with what you're doing, of course.

BR,
Jani.


>               tag_branch $tag $branch
>               $DRY git push $remote $tag
>               prep_pull_mail $req_file $tag
> diff --git a/dim.rst b/dim.rst
> index a99e40678a2f0..d6149a6e5b069 100644
> --- a/dim.rst
> +++ b/dim.rst
> @@ -444,6 +444,11 @@ 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_BROWSER
> +-----------
> +Browser for git repositories. Defaults to **gitk(1)**, but for non-graphical
> +remote access a suitable replacement can be found in **tig(1)**.
> +
>  DIM_MAKE_OPTIONS
>  ----------------
>  Additional options to pass to **make(1)**. Defaults to "-j20".
> diff --git a/dimrc.sample b/dimrc.sample
> index 1b522fa47e8c2..d2ea5ad245d18 100644
> --- a/dimrc.sample
> +++ b/dimrc.sample
> @@ -14,5 +14,8 @@
>  # [-s subject] [-i file] [-c cc-addr] to-addr [...]
>  #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=

-- 
Jani Nikula, Intel Open Source Graphics Center
_______________________________________________
dim-tools mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dim-tools

Reply via email to