[PATCH v4 10/11] built-in add -i: use color in the main loop

2019-08-27 Thread Slavica Djukic via GitGitGadget
From: Slavica Djukic The error messages as well as the unique prefixes are colored in `git add -i` by default; We need to do the same in the built-in version. Signed-off-by: Slavica Djukic Signed-off-by: Johannes Schindelin --- add-interactive.c | 37 - 1 f

[PATCH v4 07/11] Add a function to determine unique prefixes for a list of strings

2019-08-27 Thread Slavica Djukic via GitGitGadget
From: Slavica Djukic In the `git add -i` command, we show unique prefixes of the commands and files, to give an indication what prefix would select them. Naturally, the C implementation looks a lot different than the Perl implementation: in Perl, a trie is much easier implemented, while we alrea

[PATCH v4 08/11] built-in add -i: show unique prefixes of the commands

2019-08-27 Thread Slavica Djukic via GitGitGadget
From: Slavica Djukic Just like in the Perl script `git-add--interactive.perl`, for each command a unique prefix is determined (if there exists any within the given parameters), and shown in the list, and accepted as a shortcut for the command. We use the prefix map implementation that we just ad

[PATCH v3 10/11] built-in add -i: use color in the main loop

2019-07-16 Thread Slavica Djukic via GitGitGadget
From: Slavica Djukic The error messages as well as the unique prefixes are colored in `git add -i` by default; We need to do the same in the built-in version. Signed-off-by: Slavica Djukic Signed-off-by: Johannes Schindelin --- add-interactive.c | 37 - 1 f

[PATCH v3 08/11] built-in add -i: show unique prefixes of the commands

2019-07-16 Thread Slavica Djukic via GitGitGadget
From: Slavica Djukic Just like in the Perl script `git-add--interactive.perl`, for each command a unique prefix is determined (if there exists any within the given parameters), and shown in the list, and accepted as a shortcut for the command. We use the prefix map implementation that we just ad

[PATCH v3 07/11] Add a function to determine unique prefixes for a list of strings

2019-07-16 Thread Slavica Djukic via GitGitGadget
From: Slavica Djukic In the `git add -i` command, we show unique prefixes of the commands and files, to give an indication what prefix would select them. Naturally, the C implementation looks a lot different than the Perl implementation: in Perl, a trie is much easier implemented, while we alrea

[PATCH v2 08/11] built-in add -i: show unique prefixes of the commands

2019-05-13 Thread Slavica Djukic via GitGitGadget
From: Slavica Djukic Just like in the Perl script `git-add--interactive.perl`, for each command a unique prefix is determined (if there exists any within the given parameters), and shown in the list, and accepted as a shortcut for the command. We use the prefix map implementation that we just ad

[PATCH v2 07/11] Add a function to determine unique prefixes for a list of strings

2019-05-13 Thread Slavica Djukic via GitGitGadget
From: Slavica Djukic In the `git add -i` command, we show unique prefixes of the commands and files, to give an indication what prefix would select them. Naturally, the C implementation looks a lot different than the Perl implementation: in Perl, a trie is much easier implemented, while we alrea

[PATCH v2 10/11] built-in add -i: use color in the main loop

2019-05-13 Thread Slavica Djukic via GitGitGadget
From: Slavica Djukic The error messages as well as the unique prefixes are colored in `git add -i` by default; We need to do the same in the built-in version. Signed-off-by: Slavica Djukic Signed-off-by: Johannes Schindelin --- add-interactive.c | 37 - 1 f

[PATCH 08/11] built-in add -i: show unique prefixes of the commands

2019-04-10 Thread Slavica Djukic via GitGitGadget
From: Slavica Djukic Just like in the Perl script `git-add--interactive.perl`, for each command a unique prefix is determined (if there exists any within the given parameters), and shown in the list, and accepted as a shortcut for the command. We use the prefix map implementation that we just ad

[PATCH 10/11] built-in add -i: use color in the main loop

2019-04-10 Thread Slavica Djukic via GitGitGadget
From: Slavica Djukic The error messages as well as the unique prefixes are colored in `git add -i` by default; We need to do the same in the built-in version. Signed-off-by: Slavica Djukic Signed-off-by: Johannes Schindelin --- add-interactive.c | 40 +++-

[PATCH 07/11] Add a function to determine unique prefixes for a list of strings

2019-04-10 Thread Slavica Djukic via GitGitGadget
From: Slavica Djukic In the `git add -i` command, we show unique prefixes of the commands and files, to give an indication what prefix would select them. Naturally, the C implementation looks a lot different than the Perl implementation: in Perl, a trie is much easier implemented, while we alrea

[PATCH v5 04/10] add-interactive.c: implement list_and_choose

2019-02-20 Thread Slavica Djukic via GitGitGadget
From: Slavica Djukic This is one of the two functions translated from Perl script, besides list_modified that will be used by *_cmd functions (including status) to collect index/worktree changes, list those changes and let user make a choice. At this point, it only prints worktree and index chan

[PATCH v5 07/10] add-interactive.c: add support for list_only option

2019-02-20 Thread Slavica Djukic via GitGitGadget
From: Slavica Djukic If list_only option is not set, (i.e. we want to pick elements from the list, not just display them), highlight unique prefixes of list elements and let user make a choice as shown in prompt_help_cmd and singleton_prompt_help_cmd. Input that is expected from user is full lin

[PATCH v5 08/10] add-interactive.c: implement show-help command

2019-02-20 Thread Slavica Djukic via GitGitGadget
From: Slavica Djukic Implement show-help command in add-interactive.c and use it in builtin add--helper.c. Use command name "show-help" instead of "help": add--helper is builtin, hence add--helper --help would be intercepted by handle_builtin and re-routed to the help command, without ever calli

[PATCH v5 09/10] t3701-add-interactive: test add_i_show_help()

2019-02-20 Thread Slavica Djukic via GitGitGadget
From: Slavica Djukic Add test to t3701-add-interactive to verify that add_i_show_help() outputs expected content. Also, add it before changing git-add--interactive.perl's help_cmd to demonstrate that there are no changes introduced by the conversion to C. Prefix git add -i call with GIT_PAGER_IN

[PATCH v5 10/10] add--interactive.perl: use add--helper --show-help for help_cmd

2019-02-20 Thread Slavica Djukic via GitGitGadget
From: Slavica Djukic Change help_cmd sub in git-add--interactive.perl to use show-help command from builtin add--helper. If an error occurs, it will be reported, but the Perl script will not exit, since the add--helper is called within an eval block. Just like the change where the Perl script c

[PATCH v5 03/10] add-interactive.c: implement list_modified

2019-02-20 Thread Slavica Djukic via GitGitGadget
From: Slavica Djukic Implement list_modified from Perl, which will be used by most of the *_cmd functions, including status in the following commit. It lists a numstat comparing changed files between a) the worktree and the index; b) the index and the HEAD. To do so, we use run_diff_index() and

[PATCH v5 05/10] add-interactive.c: implement status command

2019-02-20 Thread Slavica Djukic via GitGitGadget
From: Slavica Djukic Implement add --interactive's status command in add-interactive.c and use it in builtin add--helper.c. This is the first interactive add command implemented in C of those anticipated by the previous commit, which introduced the add--helper built-in. Implement additional help

[PATCH v4 7/7] add--interactive.perl: use add--helper --show-help for help_cmd

2019-01-25 Thread Slavica Djukic via GitGitGadget
From: Slavica Djukic Change help_cmd sub in git-add--interactive.perl to use show-help command from builtin add--helper. If an error occurs, it will be reported, but the Perl script will not exit, since the add--helper is called within an eval block. Just like the change where the Perl script c

[PATCH v4 5/7] add-interactive.c: implement show-help command

2019-01-25 Thread Slavica Djukic via GitGitGadget
From: Slavica Djukic Implement show-help command in add-interactive.c and use it in builtin add--helper.c. Use command name "show-help" instead of "help": add--helper is builtin, hence add--helper --help would be intercepted by handle_builtin and re-routed to the help command, without ever calli

[PATCH v4 6/7] t3701-add-interactive: test add_i_show_help()

2019-01-25 Thread Slavica Djukic via GitGitGadget
From: Slavica Djukic Add test to t3701-add-interactive to verify that add_i_show_help() outputs expected content. Also, add it before changing git-add--interactive.perl's help_cmd to demonstrate that there are no changes introduced by the conversion to C. Prefix git add -i call with GIT_PAGER_IN

[PATCH v3 5/7] add-interactive.c: implement show-help command

2019-01-21 Thread Slavica Djukic via GitGitGadget
From: Slavica Djukic Implement show-help command in add-interactive.c and use it in builtin add--helper.c. Use command name "show-help" instead of "help": add--helper is builtin, hence add--helper --help would be intercepted by handle_builtin and re-routed to the help command, without ever calli

[PATCH v3 7/7] add--interactive.perl: use add--helper --show-help for help_cmd

2019-01-21 Thread Slavica Djukic via GitGitGadget
From: Slavica Djukic Change help_cmd sub in git-add--interactive.perl to use show-help command from builtin add--helper. Signed-off-by: Slavica Djukic --- git-add--interactive.perl | 11 +-- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/git-add--interactive.perl b/git-a

[PATCH v3 6/7] t3701-add-interactive: test add_i_show_help()

2019-01-21 Thread Slavica Djukic via GitGitGadget
From: Slavica Djukic Add test to t3701-add-interactive to verify that add_i_show_help() outputs expected content. Also, add it before changing git-add--interactive.perl's help_cmd to demonstrate that there are no changes introduced by the conversion to C. Prefix git add -i call with GIT_PAGER_IN_

[PATCH v2 7/7] add--interactive.perl: use add--helper --show-help for help_cmd

2019-01-17 Thread Slavica Djukic via GitGitGadget
From: Slavica Djukic Change help_cmd sub in git-add--interactive.perl to use show-help command from builtin add--helper. Signed-off-by: Slavica Djukic --- git-add--interactive.perl | 11 +-- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/git-add--interactive.perl b/git-a

[PATCH v2 5/7] add-interactive.c: implement show-help command

2019-01-17 Thread Slavica Djukic via GitGitGadget
From: Slavica Djukic Implement show-help command in add-interactive.c and use it in builtin add--helper.c. Use command name "show-help" instead of "help": add--helper is builtin, hence add--helper --help would be intercepted by handle_builtin and re-routed to the help command, without ever calli

[PATCH v2 6/7] t3701-add-interactive: test add_i_show_help()

2019-01-17 Thread Slavica Djukic via GitGitGadget
From: Slavica Djukic Add test to t3701-add-interactive to verify that add_i_show_help() outputs expected content. Also, add it before changing git-add--interactive.perl's help_cmd to demonstrate that there are no changes introduced by the conversion to C. Prefix git add -i call with GIT_PAGER_IN_

[PATCH 5/7] add-interactive.c: implement show-help command

2018-12-20 Thread Slavica Djukic via GitGitGadget
From: Slavica Djukic Implement show-help command in add-interactive.c and use it in builtin add--helper.c. Use command name "show-help" instead of "help": add--helper is builtin, hence add--helper --help would be intercepted by handle_builtin and re-routed to the help command, without ever calli

[PATCH 7/7] add--interactive.perl: use add--helper --show-help for help_cmd

2018-12-20 Thread Slavica Djukic via GitGitGadget
From: Slavica Djukic Change help_cmd sub in git-add--interactive.perl to use show-help command from builtin add--helper. Add test to t3701-add-interactive to verify that show-help outputs expected content. Use GIT_PRETENT_TTY introduced in earlier commit to be able to test output color on Window

[PATCH 6/7] Git.pm: introduce environment variable GIT_TEST_PRETEND_TTY

2018-12-20 Thread Slavica Djukic via GitGitGadget
From: Slavica Djukic To enable testing the colored output on Windows, enable TTY by using environment variable GIT_TEST_PRETEND_TTY. This is the original idea by Johannes Schindelin. Signed-off-by: Slavica Djukic --- color.c | 4 perl/Git.pm | 2 +- 2 files changed, 5 insertions(+),