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
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
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
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
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
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
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
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
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
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
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
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
d thanks to Johannes Schindelin, who turned out to be
the most amazing mentor.
-Slavica Djukic
On 20-Feb-19 12:41 PM, Slavica Đukić via GitGitGadget wrote:
This is the first version of a patch series to start porting
git-add--interactive from Perl to C. Daniel Ferreira's patch series us
On 22-Feb-19 10:46 PM, Junio C Hamano wrote:
"Slavica Djukic via GitGitGadget" writes:
+#define HEADER_INDENT " "
+
enum collection_phase {
WORKTREE,
INDEX
@@ -27,6 +29,61 @@ struct collection_status {
struct hashmap file_
On 22-Feb-19 11:11 PM, Junio C Hamano wrote:
"Slavica Djukic via GitGitGadget" writes:
+static int parse_color_slot(const char *slot)
+{
+ if (!strcasecmp(slot, "prompt"))
+ return COLOR_PROMPT;
+ if (!strcasecmp(slot, "header"))
+
On 21-Feb-19 9:27 PM, Junio C Hamano wrote:
Junio C Hamano writes:
A few things I missed in the previous message.
+ for (i = 0; i < stat.nr; i++) {
+ struct file_stat *entry;
+ const char *name = stat.files[i]->name;
+ unsigned int hash = strh
On 21-Feb-19 8:06 PM, Junio C Hamano wrote:
"Slavica Djukic via GitGitGadget" writes:
diff --git a/add-interactive.c b/add-interactive.c
new file mode 100644
index 00..7d096207d4
--- /dev/null
+++ b/add-interactive.c
@@ -0,0 +1,188 @@
+#include "cache.h"
Here is a meta question, which is mostly meant to those who use
gitgitgadget@. The person who wanted to send this copy of the patch
this time (i.e. Slavica, not Daniel) is not shown anywhere on the
header of the e-mail, so the response to the message will not go to
Slavica at all, even though it proba
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
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
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 c
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
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
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
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 addit
s_cmd
Slavica Djukic (7):
add-interactive.c: implement list_modified
add-interactive.c: implement list_and_choose
add-interactive.c: implement status command
add-interactive.c: add support for list_only option
add-interactive.c: implement show-help command
t3701-add-interactive:
Hi Phillip,
Sorry for omitting you in Cc, again.
I accidentally wrote yours and Ævar's email prefixed with Cc:, rather
then separating
them with comma, like Johannes said I should.
-Slavica
On 25-Jan-19 1:23 PM, Slavica Đukić via GitGitGadget wrote:
This is the first version of a
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
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 c
tin helper for interactive add
add-interactive.c: implement status command
add--interactive.perl: use add--helper --status for status_cmd
Slavica Djukic (3):
add-interactive.c: implement show-help command
t3701-add-interactive: test add_i_show_help()
add--interactive.perl: use add--hel
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
Hi Phillip,
On 25-Jan-19 12:01 PM, Phillip Wood wrote:
Hi Slavica
Having suggested that you move this patch up the series, I thought I
should check that it does actually pass before the rewrite.
Unfortunately when I run it it fails, but it is due to a missing
trailing space in the expected
Hello Ævar,
thanks for taking time and making review.
On 21-Jan-19 10:59 AM, Ævar Arnfjörð Bjarmason wrote:
On Mon, Jan 21 2019, Slavica Djukic via GitGitGadget wrote:
From: Slavica Djukic
Change help_cmd sub in git-add--interactive.perl to use
show-help command from builtin add--helper
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 c
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
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
oided command names translation in
add_i_show_help
Daniel Ferreira (4):
diff: export diffstat interface
add--helper: create builtin helper for interactive add
add-interactive.c: implement status command
add--interactive.perl: use add--helper --status for status_cmd
Slavica Djukic (3):
Hi Phillip,
On 18-Jan-19 12:20 PM, Phillip Wood wrote:
Hi Slavica
I think this round is looking good I've got a couple of comments about
the translation of the help text but everything else looks fine to me
now. In future when you're posting a new version it's helpful CC
status_cmd
Slavica Djukic (3):
add-interactive.c: implement show-help command
t3701-add-interactive: test add_i_show_help()
add--interactive.perl: use add--helper --show-help for help_cmd
.gitignore | 1 +
Makefile | 2 +
add-interactive.c
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
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 c
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
Hi Phillip,
First of all, thank you for taking your time to review this patch series.
On 14-Jan-19 12:13 PM, Phillip Wood wrote:
Hi Salvica/Johannes
On 20/12/2018 12:09, Slavica Djukic via GitGitGadget wrote:
From: Slavica Djukic
To enable testing the colored output on Windows, enable TTY
On 20-Dec-18 1:34 PM, Johannes Schindelin wrote:
From: "Slavica Đukić via GitGitGadget"
This is the first version of a patch series to start porting
git-add--interactive from Perl to C. Daniel Ferreira's patch series used as
a head start:
https://public-inbox.org/git/1494907
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 c
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
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
y experience as
intern.
-Slavica Djukic
clue...! I'll begin experimenting on
update_cmd() to see if I gain some insight on this issue that I could
bring to this series. I do think this would be a good idea, though! :)
I am Slavica Đukic, Outreachy intern for Git (Dec-March 2018/19 round).
Project I'll be working on is "Turn
ository.
Helped-by: Junio C Hamano
Signed-off-by: Slavica Djukic
---
git-stash.sh | 17 +
t/t3903-stash.sh | 28
2 files changed, 45 insertions(+)
diff --git a/git-stash.sh b/git-stash.sh
index 94793c1a9..789ce2f41 100755
--- a/git-stash.sh
+++
Changes since v2:
* squash patch 1/2 and patch 2/2 into a single patch
* modify first part of test when there is valid ident
present: create a stash, grab %an and %ae out of the
resulting commit object and compare to original ident
Slavica Djukic (1
Hi Junio,
On 16-Nov-18 11:12 AM, Junio C Hamano wrote:
Slavica Djukic writes:
+ git var GIT_COMMITTER_IDENT >actual &&
+ test_cmp expected actual &&
I am not sure what you are testing with this step. There is nothing
that changed environment variables or con
Hi Junio,
On 16-Nov-18 6:55 AM, Junio C Hamano wrote:
Slavica Djukic writes:
+test_expect_failure 'stash works when user.name and user.email are not set' '
+ git reset &&
+ git var GIT_COMMITTER_IDENT >expected &&
All the other existing
e stashes in a more permanent history by
committing, and they must do "git config user.{name,email}" at that
point anyway, so arguably this change is only delaying a step that
is necessary to work in the repository.
Helped-by: Junio C Hamano
Signed-off-by: Slavica Djukic
---
git-stash.sh |
Add test to document that stash fails if user.name and user.email
are not configured.
In the later commit, test will be updated to expect success.
Signed-off-by: Slavica Djukic
---
t/t3903-stash.sh | 23 +++
1 file changed, 23 insertions(+)
diff --git a/t/t3903-stash.sh b/t
Changes since v1:
*extend test to check whether git stash executes under valid ident
(and not under fallback one) when there is such present
*add prepare_fallback_ident() function to git-stash.sh to
provide fallback identity
Slavica Djukic (2
also users who find this convinient.
For example, in this thread:
https://public-inbox.org/git/87o9debty4@evledraar.gmail.com/T/#ma4fb50903a54cbcdecd4ef05856bf8094bc3c323
user points out that he would find it useful if stash had --author option.
Signed-off-by: Slavica Djukic
---
builtin
back_ident(), which will pre-load the ident.
In following commit, set_fallback_ident() function will be called in stash.
Signed-off-by: Slavica Djukic
---
cache.h | 1 +
ident.c | 17 +
2 files changed, 18 insertions(+)
diff --git a/cache.h b/cache.h
index 681307f716..6b5b559a05 10
Add test to assert that stash fails if user.name and user.email
are not configured.
In the final commit, test will be updated to expect success.
Signed-off-by: Slavica Djukic
---
t/t3903-stash.sh | 15 +++
1 file changed, 15 insertions(+)
diff --git a/t/t3903-stash.sh b/t/t3903
Enhancement request that ask for 'git stash' to work even if
'user.name' and 'user.email' are not configured.
Due to an implementation detail, git-stash undesirably requires
'user.name' and 'user.email' to be set, but shouldn't.
Sla
On 26-Oct-18 3:13 AM, Junio C Hamano wrote:
Slavica Djukic writes:
From: Slavica
Please make sure this matches your sign-off below.
This is part of enhancement request that ask for 'git stash' to work
even if 'user.name' and 'user.email' are not config
From: Slavica
This is part of enhancement request that ask for 'git stash' to work
even if 'user.name' and 'user.email' are not configured.
Due to an implementation detail, git-stash undesirably requires
'user.name' and 'user.email' to be set,
it with test_must_fail config user.email.
Slavica (1):
[Outreachy] t3903-stash: test without configured user name
t/t3903-stash.sh | 14 ++
1 file changed, 14 insertions(+)
--
2.19.1.windows.1
From: Slavica
This is part of enhancement request that ask for 'git stash' to work
even if 'user.name' and 'user.email' are not configured.
Due to an implementation detail, git-stash undesirably requires
'user.name' and 'user.email' to be set,
Changes since v1:
*changed test title
*removed subshell and HOME override
*fixed weird identation
*unset() replaced with sane_unset()
Slavica (1):
[Outreachy] t3903-stash: test without configured user name
t/t3903-stash.sh | 13 +
1 file changed, 13 insertions
On 23-Oct-18 8:52 PM, Christian Couder wrote:
On Tue, Oct 23, 2018 at 6:35 PM Slavica wrote:
This is part of enhancement request that ask for `git stash` to work even if
`user.name` is not configured.
The issue is discussed here:
https://public-inbox.org/git/87o9debty4
This is part of enhancement request that ask for `git stash` to work even if
`user.name` is not configured.
The issue is discussed here:
https://public-inbox.org/git/87o9debty4@evledraar.gmail.com/T/#u.
Signed-off-by: Slavica
---
t/t3903-stash.sh | 17 +
1 file changed, 17
67 matches
Mail list logo