[PATCH v11 14/22] stash: convert show to builtin

2018-11-22 Thread Paul-Sebastian Ungureanu
. In C, both options are passed further to `git diff`. Signed-off-by: Paul-Sebastian Ungureanu --- builtin/stash--helper.c | 87 ++ git-stash.sh| 132 +--- 2 files changed, 88 insertions(+), 131 deletions(-) diff --git

[PATCH v11 20/22] stash: convert `stash--helper.c` into `stash.c`

2018-11-22 Thread Paul-Sebastian Ungureanu
alled `git stash--helper create "$@"`, then some of these changes wouldn't have been necessary. This commit also removes the word `helper` since now stash is called directly and not by a shell script. Signed-off-by: Paul-Sebastian Ungureanu --- .gitignore

[PATCH v11 15/22] stash: convert store to builtin

2018-11-22 Thread Paul-Sebastian Ungureanu
Add stash store to the helper and delete the store_stash function from the shell script. Signed-off-by: Paul-Sebastian Ungureanu --- builtin/stash--helper.c | 62 + git-stash.sh| 43 ++-- 2 files changed, 64 insertions

[PATCH v11 16/22] stash: convert create to builtin

2018-11-22 Thread Paul-Sebastian Ungureanu
Add stash create to the helper. Signed-off-by: Paul-Sebastian Ungureanu --- builtin/stash--helper.c | 451 +++- git-stash.sh| 2 +- 2 files changed, 451 insertions(+), 2 deletions(-) diff --git a/builtin/stash--helper.c b/builtin/stash

[PATCH v11 01/22] sha1-name.c: add `get_oidf()` which acts like `get_oid()`

2018-11-22 Thread Paul-Sebastian Ungureanu
Compared to `get_oid()`, `get_oidf()` has as parameters a pointer to `object_id`, a printf format string and additional arguments. This will help simplify the code in subsequent commits. Original-idea-by: Johannes Schindelin Signed-off-by: Paul-Sebastian Ungureanu --- cache.h | 1 + sha1

[PATCH v11 02/22] strbuf.c: add `strbuf_join_argv()`

2018-11-22 Thread Paul-Sebastian Ungureanu
Implement `strbuf_join_argv()` to join arguments into a strbuf. Signed-off-by: Paul-Sebastian Ungureanu --- strbuf.c | 15 +++ strbuf.h | 7 +++ 2 files changed, 22 insertions(+) diff --git a/strbuf.c b/strbuf.c index f6a6cf78b9..82e90f1dfe 100644 --- a/strbuf.c +++ b/strbuf.c

[PATCH v11 10/22] stash: convert drop and clear to builtin

2018-11-22 Thread Paul-Sebastian Ungureanu
that are not valid when the commands are called externally. Once pop is converted they can both be removed. Signed-off-by: Joel Teichroeb Signed-off-by: Paul-Sebastian Ungureanu --- builtin/stash--helper.c | 117 git-stash.sh| 4 +- 2 files

[PATCH v11 21/22] stash: optimize `get_untracked_files()` and `check_changes()`

2018-11-22 Thread Paul-Sebastian Ungureanu
ate_stash()` and `do_push_stash()`). This way `check_changes()` and `get_untracked files()` are called only one time. https://public-inbox.org/git/20180818223329.gj11...@hank.intra.tgummerer.com/ Signed-off-by: Paul-Sebastian Ungureanu --- builtin/stash.c | 50 ---

[PATCH v11 12/22] stash: convert pop to builtin

2018-11-22 Thread Paul-Sebastian Ungureanu
From: Joel Teichroeb Add stash pop to the helper and delete the pop_stash, drop_stash, assert_stash_ref functions from the shell script now that they are no longer needed. Signed-off-by: Joel Teichroeb Signed-off-by: Paul-Sebastian Ungureanu --- builtin/stash--helper.c | 39

[PATCH v11 18/22] stash: make push -q quiet

2018-11-22 Thread Paul-Sebastian Ungureanu
There is a change in behaviour with this commit. When there was no initial commit, the shell version of stash would still display a message. This commit makes `push` to not display any message if `--quiet` or `-q` is specified. Add tests for `--quiet`. Signed-off-by: Paul-Sebastian Ungureanu

[PATCH v11 11/22] stash: convert branch to builtin

2018-11-22 Thread Paul-Sebastian Ungureanu
Teichroeb Signed-off-by: Paul-Sebastian Ungureanu --- builtin/stash--helper.c | 46 + git-stash.sh| 17 ++- 2 files changed, 48 insertions(+), 15 deletions(-) diff --git a/builtin/stash--helper.c b/builtin/stash--helper.c index

[PATCH v11 22/22] stash: replace all `write-tree` child processes with API calls

2018-11-22 Thread Paul-Sebastian Ungureanu
This commit replaces spawning `git write-tree` with API calls. Signed-off-by: Paul-Sebastian Ungureanu --- builtin/stash.c | 41 - 1 file changed, 12 insertions(+), 29 deletions(-) diff --git a/builtin/stash.c b/builtin/stash.c index 5ad0f443ca

[PATCH v11 17/22] stash: convert push to builtin

2018-11-22 Thread Paul-Sebastian Ungureanu
Add stash push to the helper. Signed-off-by: Paul-Sebastian Ungureanu --- builtin/stash--helper.c | 245 +++- git-stash.sh| 6 +- 2 files changed, 245 insertions(+), 6 deletions(-) diff --git a/builtin/stash--helper.c b/builtin/stash--helper.c

[PATCH v11 09/22] stash: convert apply to builtin

2018-11-22 Thread Paul-Sebastian Ungureanu
that when it is complete it can simply be renamed and the shell script deleted. Delete the contents of the apply_stash shell function and replace it with a call to stash--helper apply until pop is also converted. Signed-off-by: Joel Teichroeb Signed-off-by: Paul-Sebastian Ungureanu --- .gitignore

[PATCH v11 13/22] stash: convert list to builtin

2018-11-22 Thread Paul-Sebastian Ungureanu
Add stash list to the helper and delete the list_stash function from the shell script. Signed-off-by: Paul-Sebastian Ungureanu --- builtin/stash--helper.c | 31 +++ git-stash.sh| 7 +-- 2 files changed, 32 insertions(+), 6 deletions(-) diff --git

[PATCH v11 19/22] stash: convert save to builtin

2018-11-22 Thread Paul-Sebastian Ungureanu
Add stash save to the helper and delete functions which are no longer needed (`show_help()`, `save_stash()`, `push_stash()`, `create_stash()`, `clear_stash()`, `untracked_files()` and `no_changes()`). Signed-off-by: Paul-Sebastian Ungureanu --- builtin/stash--helper.c | 50 +++ git

[PATCH v11 06/22] stash: rename test cases to be more descriptive

2018-11-22 Thread Paul-Sebastian Ungureanu
Rename some test cases' labels to be more descriptive and under 80 characters per line. Signed-off-by: Paul-Sebastian Ungureanu --- t/t3903-stash.sh | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/t/t3903-stash.sh b/t/t3903-stash.sh index 098a387a82

[PATCH v11 05/22] t3903: modernize style

2018-11-22 Thread Paul-Sebastian Ungureanu
Remove whitespaces after redirection operators and wrap long lines. Signed-off-by: Paul-Sebastian Ungureanu --- t/t3903-stash.sh | 120 --- 1 file changed, 61 insertions(+), 59 deletions(-) diff --git a/t/t3903-stash.sh b/t/t3903-stash.sh index

[PATCH v11 08/22] stash: mention options in `show` synopsis

2018-11-22 Thread Paul-Sebastian Ungureanu
Mention in the documentation, that `show` accepts any option known to `git diff`. Signed-off-by: Paul-Sebastian Ungureanu --- Documentation/git-stash.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Documentation/git-stash.txt b/Documentation/git-stash.txt index

[PATCH v11 07/22] stash: add tests for `git stash show` config

2018-11-22 Thread Paul-Sebastian Ungureanu
This commit introduces tests for `git stash show` config. It tests all the cases where `stash.showStat` and `stash.showPatch` are unset or set to true / false. Signed-off-by: Paul-Sebastian Ungureanu --- t/t3907-stash-show-config.sh | 83 1 file changed, 83

[PATCH v11 03/22] strbuf.c: add `strbuf_insertf()` and `strbuf_vinsertf()`

2018-11-22 Thread Paul-Sebastian Ungureanu
Implement `strbuf_insertf()` and `strbuf_vinsertf()` to insert data using a printf format string. Original-idea-by: Johannes Schindelin Signed-off-by: Paul-Sebastian Ungureanu --- strbuf.c | 36 strbuf.h | 9 + 2 files changed, 45 insertions

[PATCH v11 00/22] Convert "git stash" to C builtin

2018-11-22 Thread Paul-Sebastian Ungureanu
(changed "!oidcmp" to "oideq") - fixed merge conflicts Best regards, Paul Joel Teichroeb (5): stash: improve option parsing test coverage stash: convert apply to builtin stash: convert drop and clear to builtin stash: convert branch to builtin stash: convert pop to bui

[PATCH v11 04/22] stash: improve option parsing test coverage

2018-11-22 Thread Paul-Sebastian Ungureanu
From: Joel Teichroeb In preparation for converting the stash command incrementally to a builtin command, this patch improves test coverage of the option parsing. Both for having too many parameters, or too few. Signed-off-by: Joel Teichroeb Signed-off-by: Paul-Sebastian Ungureanu --- t/t3903

[PATCH v10 18/21] stash: convert save to builtin

2018-10-14 Thread Paul-Sebastian Ungureanu
a message. Even if this is a change in behaviour, the documentation remains the same because the `-m` parameter was omitted before. Signed-off-by: Paul-Sebastian Ungureanu --- builtin/stash--helper.c | 52 +++ git-stash.sh| 311 +--- 2 files

[PATCH v10 07/21] stash: mention options in `show` synopsis

2018-10-14 Thread Paul-Sebastian Ungureanu
Mention in the documentation, that `show` accepts any option known to `git diff`. Signed-off-by: Paul-Sebastian Ungureanu --- Documentation/git-stash.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Documentation/git-stash.txt b/Documentation/git-stash.txt index

[PATCH v10 05/21] stash: rename test cases to be more descriptive

2018-10-14 Thread Paul-Sebastian Ungureanu
Rename some test cases' labels to be more descriptive and under 80 characters per line. Signed-off-by: Paul-Sebastian Ungureanu --- t/t3903-stash.sh | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/t/t3903-stash.sh b/t/t3903-stash.sh index de6cab1fe7

[PATCH v10 09/21] stash: convert drop and clear to builtin

2018-10-14 Thread Paul-Sebastian Ungureanu
that are not valid when the commands are called externally. Once pop is converted they can both be removed. Signed-off-by: Joel Teichroeb Signed-off-by: Paul-Sebastian Ungureanu --- builtin/stash--helper.c | 117 git-stash.sh| 4 +- 2 files

[PATCH v10 16/21] stash: convert push to builtin

2018-10-14 Thread Paul-Sebastian Ungureanu
Add stash push to the helper. Signed-off-by: Paul-Sebastian Ungureanu --- builtin/stash--helper.c | 241 +++- git-stash.sh| 6 +- 2 files changed, 241 insertions(+), 6 deletions(-) diff --git a/builtin/stash--helper.c b/builtin/stash--helper.c

[PATCH v10 20/21] stash: optimize `get_untracked_files()` and `check_changes()`

2018-10-14 Thread Paul-Sebastian Ungureanu
ate_stash()` and `do_push_stash()`). This way `check_changes()` and `get_untracked files()` are called only one time. https://public-inbox.org/git/20180818223329.gj11...@hank.intra.tgummerer.com/ Signed-off-by: Paul-Sebastian Ungureanu --- builtin/stash.c | 50 ---

[PATCH v10 10/21] stash: convert branch to builtin

2018-10-14 Thread Paul-Sebastian Ungureanu
Teichroeb Signed-off-by: Paul-Sebastian Ungureanu --- builtin/stash--helper.c | 46 + git-stash.sh| 17 ++- 2 files changed, 48 insertions(+), 15 deletions(-) diff --git a/builtin/stash--helper.c b/builtin/stash--helper.c index

[PATCH v10 13/21] stash: convert show to builtin

2018-10-14 Thread Paul-Sebastian Ungureanu
. In C, both options are passed further to `git diff`. Signed-off-by: Paul-Sebastian Ungureanu --- builtin/stash--helper.c | 87 ++ git-stash.sh| 132 +--- 2 files changed, 88 insertions(+), 131 deletions(-) diff --git

[PATCH v10 15/21] stash: convert create to builtin

2018-10-14 Thread Paul-Sebastian Ungureanu
Add stash create to the helper. Signed-off-by: Paul-Sebastian Ungureanu --- builtin/stash--helper.c | 458 git-stash.sh| 2 +- 2 files changed, 459 insertions(+), 1 deletion(-) diff --git a/builtin/stash--helper.c b/builtin/stash--helper.c

[PATCH v10 02/21] strbuf.c: add `strbuf_join_argv()`

2018-10-14 Thread Paul-Sebastian Ungureanu
Implement `strbuf_join_argv()` to join arguments into a strbuf. Signed-off-by: Paul-Sebastian Ungureanu --- strbuf.c | 13 + strbuf.h | 7 +++ 2 files changed, 20 insertions(+) diff --git a/strbuf.c b/strbuf.c index 64041c3c24..c8a104099a 100644 --- a/strbuf.c +++ b/strbuf.c

[PATCH v10 19/21] stash: convert `stash--helper.c` into `stash.c`

2018-10-14 Thread Paul-Sebastian Ungureanu
alled `git stash--helper create "$@"`, then some of these changes wouldn't have been necessary. This commit also removes the word `helper` since now stash is called directly and not by a shell script. Signed-off-by: Paul-Sebastian Ungureanu --- .gitignore

[PATCH v10 00/21] Convert "git stash" to C builtin

2018-10-14 Thread Paul-Sebastian Ungureanu
to builtin stash: convert drop and clear to builtin stash: convert branch to builtin stash: convert pop to builtin Paul-Sebastian Ungureanu (16): sha1-name.c: add `get_oidf()` which acts like `get_oid()` strbuf.c: add `strbuf_join_argv()` t3903: modernize style stash: rename test

[PATCH v10 06/21] stash: add tests for `git stash show` config

2018-10-14 Thread Paul-Sebastian Ungureanu
This commit introduces tests for `git stash show` config. It tests all the cases where `stash.showStat` and `stash.showPatch` are unset or set to true / false. Signed-off-by: Paul-Sebastian Ungureanu --- t/t3907-stash-show-config.sh | 83 1 file changed, 83

[PATCH v10 21/21] stash: replace all `write-tree` child processes with API calls

2018-10-14 Thread Paul-Sebastian Ungureanu
This commit replaces spawning `git write-tree` with API calls. Signed-off-by: Paul-Sebastian Ungureanu --- builtin/stash.c | 41 - 1 file changed, 12 insertions(+), 29 deletions(-) diff --git a/builtin/stash.c b/builtin/stash.c index d2365ada2e

[PATCH v10 17/21] stash: make push -q quiet

2018-10-14 Thread Paul-Sebastian Ungureanu
There is a change in behaviour with this commit. When there was no initial commit, the shell version of stash would still display a message. This commit makes `push` to not display any message if `--quiet` or `-q` is specified. Add tests for `--quiet`. Signed-off-by: Paul-Sebastian Ungureanu

[PATCH v10 04/21] t3903: modernize style

2018-10-14 Thread Paul-Sebastian Ungureanu
Remove whitespaces after redirection operators and wrap long lines. Signed-off-by: Paul-Sebastian Ungureanu --- t/t3903-stash.sh | 120 --- 1 file changed, 61 insertions(+), 59 deletions(-) diff --git a/t/t3903-stash.sh b/t/t3903-stash.sh index

[PATCH v10 11/21] stash: convert pop to builtin

2018-10-14 Thread Paul-Sebastian Ungureanu
From: Joel Teichroeb Add stash pop to the helper and delete the pop_stash, drop_stash, assert_stash_ref functions from the shell script now that they are no longer needed. Signed-off-by: Joel Teichroeb Signed-off-by: Paul-Sebastian Ungureanu --- builtin/stash--helper.c | 39

[PATCH v10 14/21] stash: convert store to builtin

2018-10-14 Thread Paul-Sebastian Ungureanu
Add stash store to the helper and delete the store_stash function from the shell script. Signed-off-by: Paul-Sebastian Ungureanu --- builtin/stash--helper.c | 62 + git-stash.sh| 43 ++-- 2 files changed, 64 insertions

[PATCH v10 08/21] stash: convert apply to builtin

2018-10-14 Thread Paul-Sebastian Ungureanu
that when it is complete it can simply be renamed and the shell script deleted. Delete the contents of the apply_stash shell function and replace it with a call to stash--helper apply until pop is also converted. Signed-off-by: Joel Teichroeb Signed-off-by: Paul-Sebastian Ungureanu --- .gitignore

[PATCH v10 01/21] sha1-name.c: add `get_oidf()` which acts like `get_oid()`

2018-10-14 Thread Paul-Sebastian Ungureanu
Compared to `get_oid()`, `get_oidf()` has as parameters a pointer to `object_id`, a printf format string and additional arguments. This will help simplify the code in subsequent commits. Original-idea-by: Johannes Schindelin Signed-off-by: Paul-Sebastian Ungureanu --- cache.h | 1 + sha1

[PATCH v10 12/21] stash: convert list to builtin

2018-10-14 Thread Paul-Sebastian Ungureanu
Add stash list to the helper and delete the list_stash function from the shell script. Signed-off-by: Paul-Sebastian Ungureanu --- builtin/stash--helper.c | 31 +++ git-stash.sh| 7 +-- 2 files changed, 32 insertions(+), 6 deletions(-) diff --git

[PATCH v10 03/21] stash: improve option parsing test coverage

2018-10-14 Thread Paul-Sebastian Ungureanu
From: Joel Teichroeb In preparation for converting the stash command incrementally to a builtin command, this patch improves test coverage of the option parsing. Both for having too many parameters, or too few. Signed-off-by: Joel Teichroeb Signed-off-by: Paul-Sebastian Ungureanu --- t/t3903

[PATCH v9 07/21] stash: convert apply to builtin

2018-09-25 Thread Paul-Sebastian Ungureanu
that when it is complete it can simply be renamed and the shell script deleted. Delete the contents of the apply_stash shell function and replace it with a call to stash--helper apply until pop is also converted. Signed-off-by: Joel Teichroeb Signed-off-by: Paul-Sebastian Ungureanu --- .gitignore

[GSoC][PATCH v9 06/21] strbuf.c: add `strbuf_join_argv()`

2018-09-25 Thread Paul-Sebastian Ungureanu
Implement `strbuf_join_argv()` to join arguments. Signed-off-by: Paul-Sebastian Ungureanu --- strbuf.c | 15 +++ strbuf.h | 7 +++ 2 files changed, 22 insertions(+) diff --git a/strbuf.c b/strbuf.c index 64041c3c24..3eb431b2b0 100644 --- a/strbuf.c +++ b/strbuf.c @@ -259,6

[PATCH v9 19/21] stash: convert `stash--helper.c` into `stash.c`

2018-09-25 Thread Paul-Sebastian Ungureanu
alled `git stash--helper create "$@"`, then some of these changes wouldn't have been necessary. This commit also removes the word `helper` since now stash is called directly and not by a shell script. Signed-off-by: Paul-Sebastian Ungureanu --- .gitignore

[PATCH v9 14/21] stash: convert store to builtin

2018-09-25 Thread Paul-Sebastian Ungureanu
Add stash store to the helper and delete the store_stash function from the shell script. Signed-off-by: Paul-Sebastian Ungureanu --- builtin/stash--helper.c | 60 + git-stash.sh| 43 ++--- 2 files changed, 62 insertions

[PATCH v9 15/21] stash: convert create to builtin

2018-09-25 Thread Paul-Sebastian Ungureanu
Add stash create to the helper. Signed-off-by: Paul-Sebastian Ungureanu --- builtin/stash--helper.c | 450 git-stash.sh| 2 +- 2 files changed, 451 insertions(+), 1 deletion(-) diff --git a/builtin/stash--helper.c b/builtin/stash--helper.c

[PATCH v9 08/21] stash: convert drop and clear to builtin

2018-09-25 Thread Paul-Sebastian Ungureanu
that are not valid when the commands are called externally. Once pop is converted they can both be removed. Signed-off-by: Joel Teichroeb Signed-off-by: Paul-Sebastian Ungureanu --- builtin/stash--helper.c | 116 git-stash.sh| 4 +- 2 files

[PATCH v9 06/21] stash: add tests for `git stash show` config

2018-09-25 Thread Paul-Sebastian Ungureanu
This commit introduces tests for `git stash show` config. It tests all the cases where `stash.showStat` and `stash.showPatch` are unset or set to true / false. Signed-off-by: Paul-Sebastian Ungureanu --- t/t3907-stash-show-config.sh | 83 1 file changed, 83

[PATCH v9 10/21] stash: convert pop to builtin

2018-09-25 Thread Paul-Sebastian Ungureanu
From: Joel Teichroeb Add stash pop to the helper and delete the pop_stash, drop_stash, assert_stash_ref functions from the shell script now that they are no longer needed. Signed-off-by: Joel Teichroeb Signed-off-by: Paul-Sebastian Ungureanu --- builtin/stash--helper.c | 38

[PATCH v9 18/21] stash: convert save to builtin

2018-09-25 Thread Paul-Sebastian Ungureanu
a message. Even if this is a change in behaviour, the documentation remains the same because the `-m` parameter was omitted before. Signed-off-by: Paul-Sebastian Ungureanu --- builtin/stash--helper.c | 50 +++ git-stash.sh| 311 +--- 2 files

[PATCH v9 01/21] sha1-name.c: add `get_oidf()` which acts like `get_oid()`

2018-09-25 Thread Paul-Sebastian Ungureanu
Compared to `get_oid()`, `get_oidf()` has as parameters a pointer to `object_id`, a printf format string and additional arguments. This will help simplify the code in subsequent commits. Original-idea-by: Johannes Schindelin Signed-off-by: Paul-Sebastian Ungureanu --- cache.h | 1 + sha1

[PATCH v9 21/21] stash: replace all `write-tree` child processes with API calls

2018-09-25 Thread Paul-Sebastian Ungureanu
This commit replaces spawning `git write-tree` with API calls. Signed-off-by: Paul-Sebastian Ungureanu --- builtin/stash.c | 41 - 1 file changed, 12 insertions(+), 29 deletions(-) diff --git a/builtin/stash.c b/builtin/stash.c index 43d0de1f13

[PATCH v9 20/21] stash: optimize `get_untracked_files()` and `check_changes()`

2018-09-25 Thread Paul-Sebastian Ungureanu
ate_stash()` and `do_push_stash()`). This way `check_changes()` and `get_untracked files()` are called only one time. https://public-inbox.org/git/20180818223329.gj11...@hank.intra.tgummerer.com/ Signed-off-by: Paul-Sebastian Ungureanu --- builtin/stash.c | 51 ---

[PATCH v9 11/21] stash: convert list to builtin

2018-09-25 Thread Paul-Sebastian Ungureanu
Add stash list to the helper and delete the list_stash function from the shell script. Signed-off-by: Paul-Sebastian Ungureanu --- builtin/stash--helper.c | 31 +++ git-stash.sh| 7 +-- 2 files changed, 32 insertions(+), 6 deletions(-) diff --git

[PATCH v9 16/21] stash: convert push to builtin

2018-09-25 Thread Paul-Sebastian Ungureanu
Add stash push to the helper. Signed-off-by: Paul-Sebastian Ungureanu --- builtin/stash--helper.c | 244 +++- git-stash.sh| 6 +- 2 files changed, 244 insertions(+), 6 deletions(-) diff --git a/builtin/stash--helper.c b/builtin/stash--helper.c

[PATCH v9 00/21] Convert "git stash" to C builtin

2018-09-25 Thread Paul-Sebastian Ungureanu
w a little bit closer to be used as API. Joel Teichroeb (5): stash: improve option parsing test coverage stash: convert apply to builtin stash: convert drop and clear to builtin stash: convert branch to builtin stash: convert pop to builtin Paul-Sebastian Ungureanu (16): sha1-name.c: add

[GSoC][PATCH v9 05/21] stash: add tests for `git stash show` config

2018-09-25 Thread Paul-Sebastian Ungureanu
This commit introduces tests for `git stash show` config. It tests all the cases where `stash.showStat` and `stash.showPatch` are unset or set to true / false. Signed-off-by: Paul-Sebastian Ungureanu --- t/t3907-stash-show-config.sh | 83 1 file changed, 83

[PATCH v9 13/21] stash: mention options in `show` synopsis.

2018-09-25 Thread Paul-Sebastian Ungureanu
Mention in the usage text and in the documentation, that `show` accepts any option known to `git diff`. Signed-off-by: Paul-Sebastian Ungureanu --- Documentation/git-stash.txt | 4 ++-- builtin/stash--helper.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git

[PATCH v9 17/21] stash: make push -q quiet

2018-09-25 Thread Paul-Sebastian Ungureanu
There is a change in behaviour with this commit. When there was no initial commit, the shell version of stash would still display a message. This commit makes `push` to not display any message if `--quiet` or `-q` is specified. Signed-off-by: Paul-Sebastian Ungureanu --- builtin/stash--helper.c

[PATCH v9 09/21] stash: convert branch to builtin

2018-09-25 Thread Paul-Sebastian Ungureanu
Teichroeb Signed-off-by: Paul-Sebastian Ungureanu --- builtin/stash--helper.c | 46 + git-stash.sh| 17 ++- 2 files changed, 48 insertions(+), 15 deletions(-) diff --git a/builtin/stash--helper.c b/builtin/stash--helper.c index

[PATCH v9 04/21] stash: update test cases conform to coding guidelines

2018-09-25 Thread Paul-Sebastian Ungureanu
Removed whitespaces after redirection operators. Signed-off-by: Paul-Sebastian Ungureanu --- t/t3903-stash.sh | 120 --- 1 file changed, 61 insertions(+), 59 deletions(-) diff --git a/t/t3903-stash.sh b/t/t3903-stash.sh index af7586d43d..de6cab1fe7

[PATCH v9 12/21] stash: convert show to builtin

2018-09-25 Thread Paul-Sebastian Ungureanu
. In C, both options are passed further to `git diff`. Signed-off-by: Paul-Sebastian Ungureanu --- builtin/stash--helper.c | 87 ++ git-stash.sh| 132 +--- 2 files changed, 88 insertions(+), 131 deletions(-) diff --git

[PATCH v9 02/21] strbuf.c: add `strbuf_join_argv()`

2018-09-25 Thread Paul-Sebastian Ungureanu
Implement `strbuf_join_argv()` to join arguments into a strbuf. Signed-off-by: Paul-Sebastian Ungureanu --- strbuf.c | 15 +++ strbuf.h | 7 +++ 2 files changed, 22 insertions(+) diff --git a/strbuf.c b/strbuf.c index 64041c3c24..3eb431b2b0 100644 --- a/strbuf.c +++ b/strbuf.c

[GSoC][PATCH v9 04/21] stash: rename test cases to be more descriptive

2018-09-25 Thread Paul-Sebastian Ungureanu
Rename some test cases' labels to be more descriptive and under 80 characters per line. Signed-off-by: Paul-Sebastian Ungureanu --- t/t3903-stash.sh | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/t/t3903-stash.sh b/t/t3903-stash.sh index de6cab1fe7

[PATCH v9 05/21] stash: rename test cases to be more descriptive

2018-09-25 Thread Paul-Sebastian Ungureanu
Rename some test cases' labels to be more descriptive and under 80 characters per line. Signed-off-by: Paul-Sebastian Ungureanu --- t/t3903-stash.sh | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/t/t3903-stash.sh b/t/t3903-stash.sh index de6cab1fe7

[GSoC][PATCH v9 02/21] stash: improve option parsing test coverage

2018-09-25 Thread Paul-Sebastian Ungureanu
From: Joel Teichroeb In preparation for converting the stash command incrementally to a builtin command, this patch improves test coverage of the option parsing. Both for having too many parameters, or too few. Signed-off-by: Joel Teichroeb Signed-off-by: Paul-Sebastian Ungureanu --- t/t3903

[GSoC][PATCH v9 03/21] stash: update test cases conform to coding guidelines

2018-09-25 Thread Paul-Sebastian Ungureanu
Removed whitespaces after redirection operators. Signed-off-by: Paul-Sebastian Ungureanu --- t/t3903-stash.sh | 120 --- 1 file changed, 61 insertions(+), 59 deletions(-) diff --git a/t/t3903-stash.sh b/t/t3903-stash.sh index af7586d43d..de6cab1fe7

[PATCH v9 03/21] stash: improve option parsing test coverage

2018-09-25 Thread Paul-Sebastian Ungureanu
From: Joel Teichroeb In preparation for converting the stash command incrementally to a builtin command, this patch improves test coverage of the option parsing. Both for having too many parameters, or too few. Signed-off-by: Joel Teichroeb Signed-off-by: Paul-Sebastian Ungureanu --- t/t3903

Re: [GSoC][PATCH v8 18/20] stash: convert `stash--helper.c` into `stash.c`

2018-09-25 Thread Paul-Sebastian Ungureanu
Hi, @@ -1443,9 +1448,10 @@ static int push_stash(int argc, const char **argv, const char *prefix) OPT_END() }; - argc = parse_options(argc, argv, prefix, options, -git_stash_helper_push_usage, -0); + if

Re: [GSoC][PATCH v8 14/20] stash: convert create to builtin

2018-09-25 Thread Paul-Sebastian Ungureanu
Hi, Sorry for the late reply. I had a lot on my plate for the last couple of weeks. + + git_config(git_diff_basic_config, NULL); Is this not called in as part of `git_config(git_default_config, NULL);` in cmd_stash() already? *clicketyclick* I guess not. But then, maybe it would

Re: What's cooking in git.git (Sep 2018, #04; Thu, 20)

2018-09-23 Thread Paul-Sebastian Ungureanu
Hello, On 21.09.2018 08:22, Junio C Hamano wrote: The tip of 'next' hasn't been rewound yet. The three GSoC "rewrite in C" topics are still unclassified in this "What's cooking" report, but I am hoping that we can have them in 'next' sooner rather than later. I got an impression that Dscho

Re: [RFC PATCH 5/5] split-index: smudge and add racily clean cache entries to split index

2018-09-10 Thread Paul-Sebastian Ungureanu
Hello, On 06.09.2018 20:53, Ævar Arnfjörð Bjarmason wrote: On Thu, Sep 06 2018, Ævar Arnfjörð Bjarmason wrote: On Thu, Sep 06 2018, SZEDER Gábor wrote: On Thu, Sep 06, 2018 at 02:26:49PM +0200, Ævar Arnfjörð Bjarmason wrote: On Thu, Sep 06 2018, SZEDER Gábor wrote: Several tests failed

[GSoC][PATCH v8 13/20] stash: convert store to builtin

2018-08-30 Thread Paul-Sebastian Ungureanu
Add stash store to the helper and delete the store_stash function from the shell script. Signed-off-by: Paul-Sebastian Ungureanu --- builtin/stash--helper.c | 55 + git-stash.sh| 43 ++-- 2 files changed, 57

[GSoC][PATCH v8 14/20] stash: convert create to builtin

2018-08-30 Thread Paul-Sebastian Ungureanu
Add stash create to the helper. Signed-off-by: Paul-Sebastian Ungureanu --- builtin/stash--helper.c | 430 git-stash.sh| 2 +- 2 files changed, 431 insertions(+), 1 deletion(-) diff --git a/builtin/stash--helper.c b/builtin/stash--helper.c

[GSoC][PATCH v8 17/20] stash: convert save to builtin

2018-08-30 Thread Paul-Sebastian Ungureanu
a message. Even if this is a change in behaviour, the documentation remains the same because the `-m` parameter was omitted before. Signed-off-by: Paul-Sebastian Ungureanu --- builtin/stash--helper.c | 52 +++ git-stash.sh| 311 +--- 2 files

[GSoC][PATCH v8 16/20] stash: make push -q quiet

2018-08-30 Thread Paul-Sebastian Ungureanu
There is a change in behaviour with this commit. When there was no initial commit, the shell version of stash would still display a message. This commit makes `push` to not display any message if `--quiet` or `-q` is specified. Signed-off-by: Paul-Sebastian Ungureanu --- builtin/stash--helper.c

[GSoC][PATCH v8 18/20] stash: convert `stash--helper.c` into `stash.c`

2018-08-30 Thread Paul-Sebastian Ungureanu
alled `git stash--helper create "$@"`, then some of these changes wouldn't have been necessary. This commit also removes the word `helper` since now stash is called directly and not by a shell script. Signed-off-by: Paul-Sebastian Ungureanu --- .gitignore

[GSoC][PATCH v8 20/20] stash: replace all `write-tree` child processes with API calls

2018-08-30 Thread Paul-Sebastian Ungureanu
This commit replaces spawning `git write-tree` with API calls. Signed-off-by: Paul-Sebastian Ungureanu --- builtin/stash.c | 41 - 1 file changed, 12 insertions(+), 29 deletions(-) diff --git a/builtin/stash.c b/builtin/stash.c index ba5818e24e

[GSoC][PATCH v8 19/20] stash: optimize `get_untracked_files()` and `check_changes()`

2018-08-30 Thread Paul-Sebastian Ungureanu
igned-off-by: Paul-Sebastian Ungureanu --- builtin/stash.c | 73 ++--- 1 file changed, 33 insertions(+), 40 deletions(-) diff --git a/builtin/stash.c b/builtin/stash.c index 3d2316e3f7..ba5818e24e 100644 --- a/builtin/stash.c +++ b/builtin/stash.c @

[GSoC][PATCH v8 15/20] stash: convert push to builtin

2018-08-30 Thread Paul-Sebastian Ungureanu
Add stash push to the helper. Signed-off-by: Paul-Sebastian Ungureanu --- builtin/stash--helper.c | 229 git-stash.sh| 6 +- 2 files changed, 233 insertions(+), 2 deletions(-) diff --git a/builtin/stash--helper.c b/builtin/stash--helper.c

[GSoC][PATCH v8 07/20] stash: convert drop and clear to builtin

2018-08-30 Thread Paul-Sebastian Ungureanu
that are not valid when the commands are called externally. Once pop is converted they can both be removed. Signed-off-by: Joel Teichroeb Signed-off-by: Paul-Sebastian Ungureanu --- builtin/stash--helper.c | 115 git-stash.sh| 4 +- 2 files

[GSoC][PATCH v8 04/20] stash: rename test cases to be more descriptive

2018-08-30 Thread Paul-Sebastian Ungureanu
Rename some test cases' labels to be more descriptive and under 80 characters per line. Signed-off-by: Paul-Sebastian Ungureanu --- t/t3903-stash.sh | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/t/t3903-stash.sh b/t/t3903-stash.sh index de6cab1fe7

[GSoC][PATCH v8 08/20] stash: convert branch to builtin

2018-08-30 Thread Paul-Sebastian Ungureanu
Teichroeb Signed-off-by: Paul-Sebastian Ungureanu --- builtin/stash--helper.c | 44 + git-stash.sh| 17 ++-- 2 files changed, 46 insertions(+), 15 deletions(-) diff --git a/builtin/stash--helper.c b/builtin/stash--helper.c index

[GSoC][PATCH v8 05/20] stash: add tests for `git stash show` config

2018-08-30 Thread Paul-Sebastian Ungureanu
This commit introduces tests for `git stash show` config. It tests all the cases where `stash.showStat` and `stash.showPatch` are unset or set to true / false. Signed-off-by: Paul-Sebastian Ungureanu --- t/t3907-stash-show-config.sh | 81 1 file changed, 81

[GSoC][PATCH v8 03/20] stash: update test cases conform to coding guidelines

2018-08-30 Thread Paul-Sebastian Ungureanu
Removed whitespaces after redirection operators. Signed-off-by: Paul-Sebastian Ungureanu --- t/t3903-stash.sh | 120 --- 1 file changed, 61 insertions(+), 59 deletions(-) diff --git a/t/t3903-stash.sh b/t/t3903-stash.sh index af7586d43d..de6cab1fe7

[GSoC][PATCH v8 02/20] stash: improve option parsing test coverage

2018-08-30 Thread Paul-Sebastian Ungureanu
From: Joel Teichroeb In preparation for converting the stash command incrementally to a builtin command, this patch improves test coverage of the option parsing. Both for having too many parameters, or too few. Signed-off-by: Joel Teichroeb Signed-off-by: Paul-Sebastian Ungureanu --- t/t3903

[GSoC][PATCH v8 00/20] Convert "git stash" to C builtin

2018-08-30 Thread Paul-Sebastian Ungureanu
: convert apply to builtin stash: convert drop and clear to builtin stash: convert branch to builtin stash: convert pop to builtin Paul-Sebastian Ungureanu (15): sha1-name.c: add `get_oidf()` which acts like `get_oid()` stash: update test cases conform to coding guidelines stash: rename test

[GSoC][PATCH v8 06/20] stash: convert apply to builtin

2018-08-30 Thread Paul-Sebastian Ungureanu
that when it is complete it can simply be renamed and the shell script deleted. Delete the contents of the apply_stash shell function and replace it with a call to stash--helper apply until pop is also converted. Signed-off-by: Joel Teichroeb Signed-off-by: Paul-Sebastian Ungureanu --- .gitignore

[GSoC][PATCH v8 01/20] sha1-name.c: add `get_oidf()` which acts like `get_oid()`

2018-08-30 Thread Paul-Sebastian Ungureanu
Compared to `get_oid()`, `get_oidf()` has as parameters a pointer to `object_id`, a printf format string and additional arguments. This will help simplify the code in subsequent commits. Original-idea-by: Johannes Schindelin Signed-off-by: Paul-Sebastian Ungureanu --- cache.h | 1 + sha1

[GSoC][PATCH v8 09/20] stash: convert pop to builtin

2018-08-30 Thread Paul-Sebastian Ungureanu
From: Joel Teichroeb Add stash pop to the helper and delete the pop_stash, drop_stash, assert_stash_ref functions from the shell script now that they are no longer needed. Signed-off-by: Joel Teichroeb Signed-off-by: Paul-Sebastian Ungureanu --- builtin/stash--helper.c | 36

[GSoC][PATCH v8 11/20] stash: convert show to builtin

2018-08-30 Thread Paul-Sebastian Ungureanu
. In C, both options are passed further to `git diff`. Signed-off-by: Paul-Sebastian Ungureanu --- builtin/stash--helper.c | 87 ++ git-stash.sh| 132 +--- 2 files changed, 88 insertions(+), 131 deletions(-) diff --git

[GSoC][PATCH v8 10/20] stash: convert list to builtin

2018-08-30 Thread Paul-Sebastian Ungureanu
Add stash list to the helper and delete the list_stash function from the shell script. Signed-off-by: Paul-Sebastian Ungureanu --- builtin/stash--helper.c | 31 +++ git-stash.sh| 7 +-- 2 files changed, 32 insertions(+), 6 deletions(-) diff --git

[GSoC][PATCH v8 12/20] stash: mention options in `show` synopsis.

2018-08-30 Thread Paul-Sebastian Ungureanu
Mention in the usage text and in the documentation, that `show` accepts any option known to `git diff`. Signed-off-by: Paul-Sebastian Ungureanu --- Documentation/git-stash.txt | 4 ++-- builtin/stash--helper.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git

Re: [GSoC][PATCH v7 15/26] stash: convert create to builtin

2018-08-18 Thread Paul Sebastian Ungureanu
On Thu, Aug 16, 2018 at 1:13 AM, Thomas Gummerer wrote: > On 08/08, Paul-Sebastian Ungureanu wrote: >> Add stash create to the helper. >> >> Signed-off-by: Paul-Sebastian Ungureanu >> --- >> builtin/stash--helper.c | 406

Re: [GSoC][PATCH v7 12/26] stash: refactor `show_stash()` to use the diff API

2018-08-18 Thread Paul Sebastian Ungureanu
On Thu, Aug 16, 2018 at 12:01 AM, Thomas Gummerer wrote: > On 08/08, Paul-Sebastian Ungureanu wrote: >> Currently, `show_stash()` uses `cmd_diff()` to generate >> the output. After this commit, the output will be generated >> using the internal API. >> >> Be

Re: [GSoC][PATCH v7 10/26] stash: convert show to builtin

2018-08-18 Thread Paul Sebastian Ungureanu
On Wed, Aug 15, 2018 at 11:20 PM, Thomas Gummerer wrote: > '--quiet' doesn't make too much sense to use with 'git stash show', so > I'm not sure whether or not it makes sense to support it at all. But > we do promise to pass all options through to in our documentation, so > the new behaviour is

  1   2   >