[PATCH v10 1/3] ref-filter: add worktreepath atom

2019-04-28 Thread nbelakovski
From: Nickolai Belakovski Add an atom providing the path of the linked worktree where this ref is checked out, if it is checked out in any linked worktrees, and empty string otherwise. Signed-off-by: Nickolai Belakovski --- Documentation/git-for-each-ref.txt | 5 +++ ref-filter.c

[PATCH v10 0/3]

2019-04-28 Thread nbelakovski
From: Nickolai Belakovski Added test_i18ncmp per instructions from Szeder Is there some other part of the infrastructure that's testing for this? Because it did not fail in any of my Travis CI builds. Travis CI results: https://travis-ci.org/nbelakovski/git/builds/525801210 Nic

[PATCH v10 2/3] branch: update output to include worktree info

2019-04-28 Thread nbelakovski
From: Nickolai Belakovski The output of git branch is modified to mark branches checked out in a linked worktree with a "+" and color them in cyan (in contrast to the current branch, which will still be denoted with a "*" and colored in green) This is meant to communicate to the user that the br

[PATCH v10 3/3] branch: add worktree info on verbose output

2019-04-28 Thread nbelakovski
From: Nickolai Belakovski To display worktree path for refs checked out in a linked worktree Signed-off-by: Nickolai Belakovski --- Documentation/git-branch.txt | 6 -- builtin/branch.c | 4 t/t3203-branch-output.sh | 19 +++ 3 files changed, 27 inser

[PATCH v3 2/3] branch: Mark and color a branch differently if it is checked out in a linked worktree

2018-12-16 Thread nbelakovski
From: Nickolai Belakovski In order to more clearly display which branches are active, the output of git branch is modified to mark branches checkout out in a linked worktree with a "+" and color them in cyan (in contrast to the current branch, which will still be denoted with a "*" and colored in

[PATCH v3 3/3] branch: Add an extra verbose output displaying worktree path for refs checked out in a linked worktree

2018-12-16 Thread nbelakovski
From: Nickolai Belakovski --- builtin/branch.c | 4 1 file changed, 4 insertions(+) diff --git a/builtin/branch.c b/builtin/branch.c index 2a24153b78..56589a3684 100644 --- a/builtin/branch.c +++ b/builtin/branch.c @@ -366,6 +366,10 @@ static char *build_format(struct ref_filter *filter, i

[PATCH v3 1/3] ref-filter: add worktreepath atom

2018-12-16 Thread nbelakovski
From: Nickolai Belakovski Add an atom proving the path of the linked worktree where this ref is checked out, if it is checked out in any linked worktrees, and empty string otherwise. --- Documentation/git-for-each-ref.txt | 4 +++ ref-filter.c | 70

[PATCH v3 0/3]

2018-12-16 Thread nbelakovski
this series, we can skip it and I can move discussion to a separate thread (or just forget it, as the case may be) Travis CI results: https://travis-ci.org/nbelakovski/git/builds/468569102 Nickolai Belakovski (3): ref-filter: add worktreepath atom branch: Mark and color a branch differently

[PATCH v4 1/3] ref-filter: add worktreepath atom

2018-12-24 Thread nbelakovski
From: Nickolai Belakovski Add an atom providing the path of the linked worktree where this ref is checked out, if it is checked out in any linked worktrees, and empty string otherwise. --- Documentation/git-for-each-ref.txt | 5 +++ ref-filter.c | 72 ++

[PATCH v4 2/3] branch: Mark and color a branch differently if it is checked out in a linked worktree

2018-12-24 Thread nbelakovski
From: Nickolai Belakovski In order to more clearly display which branches are active, the output of git branch is modified to mark branches checkout out in a linked worktree with a "+" and color them in cyan (in contrast to the current branch, which will still be denoted with a "*" and colored in

[PATCH v4 3/3] branch: Add an extra verbose output displaying worktree path for refs checked out in a linked worktree

2018-12-24 Thread nbelakovski
From: Nickolai Belakovski --- builtin/branch.c | 4 1 file changed, 4 insertions(+) diff --git a/builtin/branch.c b/builtin/branch.c index 2a24153b78..56589a3684 100644 --- a/builtin/branch.c +++ b/builtin/branch.c @@ -366,6 +366,10 @@ static char *build_format(struct ref_filter *filter, i

[PATCH v4 0/3]

2018-12-24 Thread nbelakovski
the hashmap API seems OK, yea, this is definitely awful. It feels like it should just be able to take a key and return either an entry or NULL, and do away with entry_or_key and equals_function_data. Travis-CI results: https://travis-ci.org/nbelakovski/git/builds/471787317 Nickolai Belakovski (3):

[PATCH v5 0/3]

2019-01-05 Thread nbelakovski
sticking to the style in the rest of the code but I think it's a little better that all of the relevant structs and the cmpfnc are all in the same place. Travis-CI results: https://travis-ci.org/nbelakovski/git/builds/475825245 Nickolai Belakovski (3): ref-filter: add worktreepath

[PATCH v5 1/3] ref-filter: add worktreepath atom

2019-01-05 Thread nbelakovski
From: Nickolai Belakovski Add an atom providing the path of the linked worktree where this ref is checked out, if it is checked out in any linked worktrees, and empty string otherwise. --- Documentation/git-for-each-ref.txt | 5 +++ ref-filter.c | 71 ++

[PATCH v5 2/3] branch: Mark and color a branch differently if it is checked out in a linked worktree

2019-01-05 Thread nbelakovski
From: Nickolai Belakovski In order to more clearly display which branches are active, the output of git branch is modified to mark branches checkout out in a linked worktree with a "+" and color them in cyan (in contrast to the current branch, which will still be denoted with a "*" and colored in

[PATCH v5 3/3] branch: Add an extra verbose output displaying worktree path for refs checked out in a linked worktree

2019-01-05 Thread nbelakovski
From: Nickolai Belakovski --- Documentation/git-branch.txt | 5 - builtin/branch.c | 4 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/Documentation/git-branch.txt b/Documentation/git-branch.txt index b3eca6ffdc..6d1fc59e32 100644 --- a/Documentation/git-branc

[PATCH v6 1/3] ref-filter: add worktreepath atom

2019-01-22 Thread nbelakovski
From: Nickolai Belakovski Add an atom providing the path of the linked worktree where this ref is checked out, if it is checked out in any linked worktrees, and empty string otherwise. --- Documentation/git-for-each-ref.txt | 5 +++ ref-filter.c | 74 ++

[PATCH v6 2/3] branch: Mark and color a branch differently if it is checked out in a linked worktree

2019-01-22 Thread nbelakovski
From: Nickolai Belakovski The output of git branch is modified to mark branches checkout out in a linked worktree with a "+" and color them in cyan (in contrast to the current branch, which will still be denoted with a "*" and colored in green) This is meant to communicate to the user that the b

[PATCH v6 0/3]

2019-01-22 Thread nbelakovski
or ref-filter to be reentrant Travis-CI results: https://travis-ci.org/nbelakovski/git/builds/483134182 Nickolai Belakovski (3): ref-filter: add worktreepath atom branch: Mark and color a branch differently if it is checked out in a linked worktree branch: Add an extra verbose outp

[PATCH v6 3/3] branch: Add an extra verbose output displaying worktree path for refs checked out in a linked worktree

2019-01-22 Thread nbelakovski
From: Nickolai Belakovski --- Documentation/git-branch.txt | 7 +-- builtin/branch.c | 4 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/Documentation/git-branch.txt b/Documentation/git-branch.txt index b3eca6ffdc..a1aef00af0 100644 --- a/Documentation/git-br

[PATCH v7 0/3]

2019-02-01 Thread nbelakovski
i.org/nbelakovski/git/builds/487642061 Nickolai Belakovski (3): ref-filter: add worktreepath atom branch: Mark and color a branch differently if it is checked out in a linked worktree branch: Add an extra verbose output displaying worktree path for refs checked out in a linked wor

[PATCH v7 1/3] ref-filter: add worktreepath atom

2019-02-01 Thread nbelakovski
From: Nickolai Belakovski Add an atom providing the path of the linked worktree where this ref is checked out, if it is checked out in any linked worktrees, and empty string otherwise. Signed-off-by: Nickolai Belakovski --- Documentation/git-for-each-ref.txt | 5 +++ ref-filter.c

[PATCH v7 3/3] branch: Add an extra verbose output displaying worktree path for refs checked out in a linked worktree

2019-02-01 Thread nbelakovski
From: Nickolai Belakovski Signed-off-by: Nickolai Belakovski --- Documentation/git-branch.txt | 6 -- builtin/branch.c | 4 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/Documentation/git-branch.txt b/Documentation/git-branch.txt index b3eca6ffdc..778be7080

[PATCH v7 2/3] branch: Mark and color a branch differently if it is checked out in a linked worktree

2019-02-01 Thread nbelakovski
From: Nickolai Belakovski The output of git branch is modified to mark branches checkout out in a linked worktree with a "+" and color them in cyan (in contrast to the current branch, which will still be denoted with a "*" and colored in green) This is meant to communicate to the user that the b

[RFC] Sample of test for git branch -vv

2019-02-01 Thread nbelakovski
From: Nickolai Belakovski I remember now why I didn't add a test for this one earlier. Testing git branch -vv is a little tricky for a couple reasons. For one thing, the output contains commit hashes, so the 'expect' file cannot be simply static. For another, the output doesn't have clear del

[PATCH] worktree: populate lock_reason in get_worktrees and light refactor/cleanup in worktree files

2018-10-23 Thread nbelakovski
. The lock_reason_valid field was removed since a NULL/non-NULL value of lock_reason accomplishes the same effect. Some unused variables within worktree source code were removed. Signed-off-by: Nickolai Belakovski --- Notes: Travis CI results: https://travis-ci.org/nbelakovski/git/builds/445500127 bu

[PATCH] worktree: refactor lock_reason_valid and lock_reason to be more sensible

2018-10-24 Thread nbelakovski
From: Nickolai Belakovski lock_reason_valid is renamed to is_locked and lock_reason is removed as a field of the worktree struct. Lock reason can be obtained instead by a standalone function. This is done in order to make the worktree struct more intuitive when it is used elsewhere in the codeba

[PATCH v3 1/2] worktree: update documentation for lock_reason and lock_reason_valid

2018-10-29 Thread nbelakovski
From: Nickolai Belakovski Clarify that these fields are to be considered implementation details and direct the reader to use the is_worktree_locked function to retrieve said information. Signed-off-by: Nickolai Belakovski --- worktree.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)

[PATCH v3 2/2] worktree: rename is_worktree_locked to worktree_lock_reason

2018-10-29 Thread nbelakovski
From: Nickolai Belakovski A function prefixed with 'is_' would be expected to return a boolean, however this function returns a string. Signed-off-by: Nickolai Belakovski --- builtin/worktree.c | 10 +- worktree.c | 2 +- worktree.h | 4 ++-- 3 files changed, 8 insert

[PATCH v2 2/2] branch: Mark and colorize a branch differently if it is checked out in a linked worktree

2018-11-11 Thread nbelakovski
From: Nickolai Belakovski In order to more clearly display which branches are active, the output of git branch is modified to mark branches checkout out in a linked worktree with a "+" and color them in a faint light green (in contrast to the current branch, which will still be denoted with a "*"

[PATCH v2 1/2] ref-filter: add worktree atom

2018-11-11 Thread nbelakovski
From: Nickolai Belakovski Add an atom expressing whether the particular ref is checked out in a linked worktree. Signed-off-by: Nickolai Belakovski --- ref-filter.c | 31 +++ t/t6302-for-each-ref-filter.sh | 15 +++ 2 files changed, 46

[PATCH v2 0/2] refactoring branch colorization to ref-filter

2018-11-11 Thread nbelakovski
f the changes introduced here. I've split this work into two commits since the items are logically separate. CI results: https://travis-ci.org/nbelakovski/git/builds/453723727 Nickolai Belakovski (2): ref-filter: add worktree atom branch: Mark and colorize a branch differently if it is chec

[PATCH v8 1/3] ref-filter: add worktreepath atom

2019-02-19 Thread nbelakovski
From: Nickolai Belakovski Add an atom providing the path of the linked worktree where this ref is checked out, if it is checked out in any linked worktrees, and empty string otherwise. Signed-off-by: Nickolai Belakovski --- Documentation/git-for-each-ref.txt | 5 +++ ref-filter.c

[PATCH v8 2/3] branch: update output to include worktree info

2019-02-19 Thread nbelakovski
From: Nickolai Belakovski The output of git branch is modified to mark branches checkout out in a linked worktree with a "+" and color them in cyan (in contrast to the current branch, which will still be denoted with a "*" and colored in green) This is meant to communicate to the user that the b

[PATCH v8 0/3]

2019-02-19 Thread nbelakovski
earlier in this thread that if we went with "worktree:path", then "worktree" is somewhat ambiguous, and that discussion led to deciding to have "worktree" return the path,. After that I chose to name it "worktreepath" because I like to make things explicit an

[PATCH v8 3/3] branch: add worktree info on verbose output

2019-02-19 Thread nbelakovski
From: Nickolai Belakovski To display worktree path for refs checked out in a linked worktree Signed-off-by: Nickolai Belakovski --- Documentation/git-branch.txt | 6 -- builtin/branch.c | 4 t/t3203-branch-output.sh | 21 - 3 files changed, 28 ins

[PATCH v9 2/3] branch: update output to include worktree info

2019-03-15 Thread nbelakovski
From: Nickolai Belakovski The output of git branch is modified to mark branches checked out in a linked worktree with a "+" and color them in cyan (in contrast to the current branch, which will still be denoted with a "*" and colored in green) This is meant to communicate to the user that the br

[PATCH v9 1/3] ref-filter: add worktreepath atom

2019-03-15 Thread nbelakovski
From: Nickolai Belakovski Add an atom providing the path of the linked worktree where this ref is checked out, if it is checked out in any linked worktrees, and empty string otherwise. Signed-off-by: Nickolai Belakovski --- Documentation/git-for-each-ref.txt | 5 +++ ref-filter.c

[PATCH v9 3/3] branch: add worktree info on verbose output

2019-03-15 Thread nbelakovski
From: Nickolai Belakovski To display worktree path for refs checked out in a linked worktree Signed-off-by: Nickolai Belakovski --- Documentation/git-branch.txt | 6 -- builtin/branch.c | 4 t/t3203-branch-output.sh | 19 +++ 3 files changed, 27 inser

[PATCH v9 0/3]

2019-03-15 Thread nbelakovski
standpoint of decoupling tests and limiting scope of tests. Travis-CI results: https://travis-ci.org/nbelakovski/git/builds/506853143 Nickolai Belakovski (3): ref-filter: add worktreepath atom branch: update output to include worktree info branch: add worktree info on verbose output Do