[maintainer-tools PATCH v2 2/4] dim: fix git directory handling

2018-12-18 Thread Andrzej Hajda
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 Reviewed-by: Daniel Vetter --- dim | 13 - 1 file changed

[maintainer-tools PATCH v2 4/4] dim: use git rev-parse to get git directory

2018-12-18 Thread Andrzej Hajda
Using rev-parse git option is safer than manually parsing git files. Signed-off-by: Andrzej Hajda --- dim | 8 +--- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/dim b/dim index e4a4afe..e999409 100755 --- a/dim +++ b/dim @@ -556,13 +556,7 @@ function check_conflicts # tree

[maintainer-tools PATCH v2 0/4] dim: fix git directory evaluation

2018-12-18 Thread Andrzej Hajda
Hi all, This small patchset fixes issues with dim and git worktree's. In v2 I have: - removed incorrect rr_cache_dir fix patch, - added patch fixing update_rerere_cache, - added patch converting git_dir function to use git rev_parse, - added R-Bs (thanks Daniel). Regards Andrzej Andrzej

[maintainer-tools PATCH v2 1/4] dim: allow git_dir to specify arbitrary work directory

2018-12-18 Thread Andrzej Hajda
git_dir function returns git directory for current working directory. Allowing specifying any directory allows to reuse it more widely. Signed-off-by: Andrzej Hajda Reviewed-by: Daniel Vetter --- dim | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/dim b/dim index

[maintainer-tools PATCH v2 3/4] dim: fix update_rerere_cache

2018-12-18 Thread Andrzej Hajda
update_rerere_cache does not work correctly if drm-tip and $DIM_REPO are workdirs - it cannot locate properly rr-cache. Let's use git rev-parse to resolve rr-cache location. Signed-off-by: Andrzej Hajda --- dim | 25 - 1 file changed, 12 insertions(+), 13 deletions

Re: [maintainer-tools PATCH RFC 3/3] dim: fix rr_cache_dir discovery

2018-12-17 Thread Andrzej Hajda
On 17.12.2018 15:46, Daniel Vetter wrote: > On Mon, Dec 17, 2018 at 10:54:48AM +0100, Andrzej Hajda wrote: >> Hi Daniel, >> >> Thanks for reviewing other two patches. >> >> >> On 14.12.2018 17:29, Daniel Vetter wrote: >>> On Fri, Dec 1

Re: [maintainer-tools PATCH RFC 3/3] dim: fix rr_cache_dir discovery

2018-12-17 Thread Andrzej Hajda
Hi Daniel, Thanks for reviewing other two patches. On 14.12.2018 17:29, Daniel Vetter wrote: > On Fri, Dec 14, 2018 at 02:38:52PM +0100, Andrzej Hajda wrote: >> rr_cache_dir function cannot assume REPO/.git is a directory. On the other >> side it should be backward compatibl

[maintainer-tools PATCH RFC 2/3] dim: fix git directory handling

2018-12-14 Thread Andrzej Hajda
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 --- dim | 13 - 1 file changed, 4 insertions(+), 9 deletions

[maintainer-tools PATCH RFC 3/3] dim: fix rr_cache_dir discovery

2018-12-14 Thread Andrzej Hajda
rr_cache_dir function cannot assume REPO/.git is a directory. On the other side it should be backward compatible - if rr-cache directory/link already exists it should be returned. Signed-off-by: Andrzej Hajda --- Hi, I am not sure of the purpose of rr-cache symbolic link, dim does not use

[maintainer-tools PATCH RFC 1/3] dim: allow git_dir to specify arbitrary work directory

2018-12-14 Thread Andrzej Hajda
git_dir function returns git directory for current working directory. Allowing specifying any directory allows to reuse it more widely. Signed-off-by: Andrzej Hajda --- dim | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/dim b/dim index 70939ff..df66c58 100755

[maintainer-tools PATCH RFC 0/3] dim: fix git directory evaluation

2018-12-14 Thread Andrzej Hajda
touching :) Regards Andrzej Andrzej Hajda (3): dim: allow git_dir to specify arbitrary work directory dim: fix git directory handling dim: fix rr_cache_dir discovery dim | 33 - 1 file changed, 16 insertions(+), 17 deletions(-) -- 2.17.1