Re: [igt-dev] [PATCH 1/3] dim: pass git directory via parameter in dim cite, don't cd

Jani Nikula
2019-01-14T15:22:13Z

This series obviously sent to the wrong list. Resubmitted to dim-tools.

Sorry for the noise.

BR,
Jani.

On Mon, 14 Jan 2019, Jani Nikula <jani.nikula@intel.com> wrote:
> 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/'
> }

--
Jani Nikula, Intel Open Source Graphics Center