dri-devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel Vetter <daniel@ffwll.ch>
To: Andrzej Hajda <a.hajda@samsung.com>
Cc: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>,
	dim-tools@lists.freedesktop.org, dri-devel@lists.freedesktop.org,
	Marek Szyprowski <m.szyprowski@samsung.com>
Subject: Re: [maintainer-tools PATCH RFC 2/3] dim: fix git directory handling
Date: Fri, 14 Dec 2018 17:26:53 +0100	[thread overview]
Message-ID: <20181214162653.GS21184@phenom.ffwll.local> (raw)
In-Reply-To: <20181214133852.19665-3-a.hajda@samsung.com>

On Fri, Dec 14, 2018 at 02:38:51PM +0100, Andrzej Hajda wrote:
> Assumption that git directory is always located at REPO/.git is incorrect,
> especially in case of git worktrees. There is already function to deal
> with it correctly - git_dir, let's then use it.
> 
> Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>

Patch 1&2 are Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>

> ---
>  dim | 13 ++++---------
>  1 file changed, 4 insertions(+), 9 deletions(-)
> 
> diff --git a/dim b/dim
> index df66c58..3afa8b6 100755
> --- a/dim
> +++ b/dim
> @@ -1088,12 +1088,7 @@ function dim_backmerge
>  
>  	git merge --rerere-autoupdate --no-commit $upstream >& /dev/null || true
>  
> -	if [[ -d .git ]]; then
> -		patch_file=".git"
> -	else
> -		patch_file=$(cut -d ' ' -f 2 .git)
> -	fi
> -	patch_file=$patch_file/MERGE_MSG
> +	patch_file=$(git_dir)/MERGE_MSG
>  
>  
>  	cat > $patch_file <<-HERE
> @@ -1340,7 +1335,7 @@ dim_alias_mrr=magic-rebase-resolve
>  function dim_magic_rebase_resolve
>  {
>  	git diff HEAD | patch -p1 -R
> -	dim_magic_patch < .git/rebase-merge/patch
> +	dim_magic_patch < $(git_dir)/rebase-merge/patch
>  	make $DIM_MAKE_OPTIONS
>  	git add -u
>  	git rebase --continue
> @@ -2102,7 +2097,7 @@ function setup_aux_checkout # name url directory
>  			git clone --reference=$DIM_PREFIX/$DIM_REPO/.git $url $dir
>  			cd $dir
>  			git config remote.origin.url $url
> -			echo "$DIM_PREFIX/$DIM_REPO/.git/objects" > .git/objects/info/alternates
> +			echo "$(git_dir $DIM_PREFIX/$DIM_REPO)/objects" > $(git_dir)/objects/info/alternates
>  			git repack -a -d -l
>  			remote=origin
>  		fi
> @@ -2132,7 +2127,7 @@ function dim_setup
>  	fi
>  	cd $DIM_PREFIX
>  
> -	if [ ! -d $DIM_PREFIX/$DIM_REPO/.git ]; then
> +	if [ ! -d $(git_dir $DIM_PREFIX/$DIM_REPO) ]; then
>  		echoerr "No git checkout found in $DIM_PREFIX/$DIM_REPO."
>  		echoerr "Please set up your maintainer linux repository at $DIM_PREFIX/$DIM_REPO with"
>  		echoerr "    cd $DIM_PREFIX"
> -- 
> 2.17.1
> 
> _______________________________________________
> dim-tools mailing list
> dim-tools@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dim-tools

-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

  reply	other threads:[~2018-12-14 16:26 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CGME20181214133858eucas1p19a983a1f42b3d833868de6e18464ef22@eucas1p1.samsung.com>
2018-12-14 13:38 ` [maintainer-tools PATCH RFC 0/3] dim: fix git directory evaluation Andrzej Hajda
2018-12-14 13:38   ` [maintainer-tools PATCH RFC 1/3] dim: allow git_dir to specify arbitrary work directory Andrzej Hajda
2018-12-14 13:38   ` [maintainer-tools PATCH RFC 2/3] dim: fix git directory handling Andrzej Hajda
2018-12-14 16:26     ` Daniel Vetter [this message]
2018-12-14 13:38   ` [maintainer-tools PATCH RFC 3/3] dim: fix rr_cache_dir discovery Andrzej Hajda
2018-12-14 16:29     ` Daniel Vetter
2018-12-17  9:54       ` Andrzej Hajda
2018-12-17 14:46         ` Daniel Vetter
2018-12-18  7:15           ` Andrzej Hajda
2018-12-18  7:58             ` Daniel Vetter

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20181214162653.GS21184@phenom.ffwll.local \
    --to=daniel@ffwll.ch \
    --cc=a.hajda@samsung.com \
    --cc=b.zolnierkie@samsung.com \
    --cc=dim-tools@lists.freedesktop.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=m.szyprowski@samsung.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox