Re: [GSoC] A blog about 'git stash' project

2018-05-04 Thread Paul-Sebastian Ungureanu
Hello Dscho, On 04.05.2018 01:10, Johannes Schindelin wrote: Hi Paul, On Fri, 4 May 2018, Paul-Sebastian Ungureanu wrote: The community bonding period started. It is well known that for a greater rate of success, it is recommended to send weekly reports regarding project status. But, what

Re: [GSoC] A blog about 'git stash' project

2018-05-08 Thread Paul-Sebastian Ungureanu
Hello, On 08.05.2018 07:00, Taylor Blau wrote: On Fri, May 04, 2018 at 12:48:21AM +0300, Paul-Sebastian Ungureanu wrote: Hello everybody, The community bonding period started. It is well known that for a greater rate of success, it is recommended to send weekly reports regarding project

[GSoC] Week 2 - 'git stash' blog

2018-05-14 Thread Paul-Sebastian Ungureanu
Hello world, A new week has begun, but how was the last one? I posted a new blog post about it [1]. Any feedback is greatly appreciated! Thank you! [1] https://ungps.github.io/ Best regards, Paul

Re: [GSoC] A blog about 'git stash' project

2018-05-07 Thread Paul-Sebastian Ungureanu
Hello, On 06.05.2018 16:22, Kaartic Sivaraam wrote: The blog looks pretty well written. I also read your proposal. It also seems to be pretty much well written. I like the way you explain things. Particularly, you seem to be explaining the problem and the way you're about to approach it well.

Re: [GSoC] A blog about 'git stash' project

2018-05-20 Thread Paul-Sebastian Ungureanu
Hi On 17.05.2018 13:29, Kaartic Sivaraam wrote: On Thursday 17 May 2018 02:39 PM, Johannes Schindelin wrote: I have great empathy for the desire to see these bugs fixed. The conversion must come first, though, and in the interest of making it easier on me and other reviewers, I must insist on

[GSoC] Week 3 - 'git stash' blog

2018-05-22 Thread Paul-Sebastian Ungureanu
Hello, New week, new blog post [1]. Any feedback is greatly appreciated! Thank you! [1] https://ungps.github.io/ Best, Paul

Re: [GSoC] GSoC with git, week 7

2018-06-18 Thread Paul-Sebastian Ungureanu
Hello! On 18.06.2018 20:34, Alban Gruin wrote: Hi, I published a new blog post here: https://blog.pa1ch.fr/posts/2018/06/18/en/gsoc2018-week-7.html It’s shorter than the last one, but feel free to tell me what you think about it! :) Cheers, Alban Good job! My blog is also up:

Re: [GSoC] GSoC with git, week 6

2018-06-13 Thread Paul-Sebastian Ungureanu
Hello, Nice job there! I also published a blog post regarding `git stash`. https://ungps.github.io/ Best, Paul

[PATCH v6 3/4] stash: convert branch to builtin

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

[PATCH v6 2/4] stash: convert drop and clear to builtin

2018-06-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 | 112 git-stash.sh| 4 +- 2 files

[PATCH v6 4/4] stash: convert pop to builtin

2018-06-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 | 36

[PATCH v6 1/4] stash: convert apply to builtin

2018-06-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

[PATCH v6 2/4] stash: improve option parsing test coverage

2018-06-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

[PATCH v6 0/4] stash: add new tests and introduce a new helper function

2018-06-25 Thread Paul-Sebastian Ungureanu
test coverage Paul-Sebastian Ungureanu (3): sha1-name.c: added 'get_oidf', which acts like 'get_oid' stash: update test cases conform to coding guidelines stash: renamed test cases to be more descriptive cache.h | 1 + sha1-name.c | 19 ++ t/t3903-stash.sh | 169

[PATCH v6 1/4] sha1-name.c: added 'get_oidf', which acts like 'get_oid'

2018-06-25 Thread Paul-Sebastian Ungureanu
Compared to 'get_oid', 'get_oidf' has as parameters a printf format string and the 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-name.c | 19

[PATCH v6 3/4] stash: update test cases conform to coding guidelines

2018-06-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 af7586d43..de6cab1fe

[PATCH v6 4/4] stash: renamed test cases to be more descriptive

2018-06-25 Thread Paul-Sebastian Ungureanu
Renamed 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 de6cab1fe..8d002a7f2

[PATCH v6 5/6] stash: update `git stash show` documentation

2018-06-25 Thread Paul-Sebastian Ungureanu
Add in documentation about the change of behavior regarding the `--quiet` option, which was introduced in the last commit. (the `--quiet` option does not exit anymore with erorr if it is given an empty stash as argument) Signed-off-by: Paul-Sebastian Ungureanu --- Documentation/git-stash.txt

[PATCH v6 3/6] stash: change `git stash show` usage text and documentation

2018-06-25 Thread Paul-Sebastian Ungureanu
It is already stated in documentation that it will accept any option known to `git diff`, but not in the usage text and some parts of the documentation. Signed-off-by: Paul-Sebastian Ungureanu --- Documentation/git-stash.txt | 4 ++-- builtin/stash--helper.c | 4 ++-- 2 files changed, 4

[PATCH v6 6/6] stash: convert store to builtin

2018-06-25 Thread Paul-Sebastian Ungureanu
Add stash store to the helper and delete the store_stash function from the shell script. Add the usage string which was forgotten in the shell script. Signed-off-by: Paul-Sebastian Ungureanu --- builtin/stash--helper.c | 48 + git-stash.sh

[PATCH v6 2/6] stash: convert show to builtin

2018-06-25 Thread Paul-Sebastian Ungureanu
` errors out on `--index` and does not display any message on `--quiet`, but errors out if the stash is not empty. Signed-off-by: Paul-Sebastian Ungureanu --- builtin/stash--helper.c | 77 +++ git-stash.sh| 132 +--- 2 files

[PATCH v6 1/6] stash: implement the "list" command in the builtin

2018-06-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 | 33 + git-stash.sh| 7 +-- 2 files changed, 34 insertions(+), 6 deletions(-) diff --git

[PATCH v6 4/6] stash: refactor `show_stash()` to use the diff API

2018-06-25 Thread Paul-Sebastian Ungureanu
given an empty stash. Signed-off-by: Paul-Sebastian Ungureanu --- builtin/stash--helper.c | 72 + 1 file changed, 45 insertions(+), 27 deletions(-) diff --git a/builtin/stash--helper.c b/builtin/stash--helper.c index 4f49fd04b..4589e12d6 100644

[GSoC] A blog about 'git stash' project

2018-05-03 Thread Paul-Sebastian Ungureanu
Hello everybody, The community bonding period started. It is well known that for a greater rate of success, it is recommended to send weekly reports regarding project status. But, what would be a good form for such a report? I, for one, think that starting a blog is one of the best options

Re: [PATCH v5 0/5] Convert some stash functionality to a builtin

2018-04-28 Thread Paul-Sebastian Ungureanu
Hello Joel, Since there seems to be interest from GSOC students who want to work on converting builtins, I figured I should finish what I have that works now so they could build on top of it. First of all, I must thank you for submitting this series of patches. It is a great starting point

Re: [GSoC][PATCH v2] ref-filter: Make "--contains " less chatty if is invalid

2018-02-24 Thread Paul-Sebastian Ungureanu
Hello, Your proposed solution makes a lot more sense. I have actually considered a solution similar to this (the third solution from [1]), but found it more complicated. I did not account for the fact that once a callback is called, the user is already aware of the available options and the user

[GSoC][PATCH v2] ref-filter: Make "--contains " less chatty if is invalid

2018-02-23 Thread Paul-Sebastian Ungureanu
ption parsing, then it must be an invalid argument and the user should be informed of usage, but if a error occurs during ref-filtering, then it is a problem with the argument. Signed-off-by: Paul-Sebastian Ungureanu <ungureanupaulsebast...@gmail.com> --- builtin/branch.c | 12 +++ buil

[GSoC][PATCH] tag: Make "git tag --contains " less chatty if is invalid

2018-02-19 Thread Paul-Sebastian Ungureanu
should be informed of usage, but if a error occurs during ref-filtering, then it is a problem with the argument. Signed-off-by: Paul-Sebastian Ungureanu <ungureanupaulsebast...@gmail.com> --- builtin/tag.c | 11 +-- parse-options.h | 11 +++ ref-fi

Re: [GSoC][PATCH v7 05/26] stash: convert apply to builtin

2018-08-10 Thread Paul-Sebastian Ungureanu
Hellom On 10.08.2018 00:00, Junio C Hamano wrote: Paul-Sebastian Ungureanu writes: Good to see that the right way to forward a patch from another person is used, but is this a GSoC project? Yes, it is. I forgot to add the [GSoC] tag in the last series of patches. The reason I asked

Re: [GSoC][PATCH v7 00/26] Convert "git stash" to C builtin

2018-08-16 Thread Paul Sebastian Ungureanu
Hi, On Thu, Aug 16, 2018 at 1:25 AM, Thomas Gummerer wrote: > On 08/08, Paul-Sebastian Ungureanu wrote: >> Hello, >> >> Here is the whole `git stash` C version. Some of the previous >> patches were already reviewed (up to and including "stash: convert >>

Re: [GSoC][PATCH v7 05/26] stash: convert apply to builtin

2018-08-09 Thread Paul-Sebastian Ungureanu
Hello, On 08.08.2018 23:18, Junio C Hamano wrote: Paul-Sebastian Ungureanu writes: From: Joel Teichroeb Add a builtin helper for performing stash commands. Converting all at once proved hard to review, so starting with just apply lets conversion get started without the other commands being

[GSoC][PATCH v7 04/26] stash: renamed test cases to be more descriptive

2018-08-08 Thread Paul-Sebastian Ungureanu
Renamed 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 de6cab1fe..8d002a7f2

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

2018-08-08 Thread Paul-Sebastian Ungureanu
given an empty stash. Signed-off-by: Paul-Sebastian Ungureanu --- builtin/stash--helper.c | 73 + 1 file changed, 45 insertions(+), 28 deletions(-) diff --git a/builtin/stash--helper.c b/builtin/stash--helper.c index 0c1efca6b..ec8c38c6f 100644

[GSoC][PATCH v7 18/26] stash: convert push to builtin

2018-08-08 Thread Paul-Sebastian Ungureanu
Add stash push to the helper. --- builtin/stash--helper.c | 209 git-stash.sh| 6 +- 2 files changed, 213 insertions(+), 2 deletions(-) diff --git a/builtin/stash--helper.c b/builtin/stash--helper.c index f905d3908..c26cad3d5 100644 ---

[GSoC][PATCH v7 06/26] stash: convert drop and clear to builtin

2018-08-08 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 v7 01/26] sha1-name.c: added 'get_oidf', which acts like 'get_oid'

2018-08-08 Thread Paul-Sebastian Ungureanu
Compared to 'get_oid', 'get_oidf' has as parameters a printf format string and the 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-name.c | 19

[GSoC][PATCH v7 13/26] stash: update `git stash show` documentation

2018-08-08 Thread Paul-Sebastian Ungureanu
Add in documentation about the change of behavior regarding the `--quiet` option, which was introduced in the last commit. (the `--quiet` option does not exit anymore with erorr if it is given an empty stash as argument) Signed-off-by: Paul-Sebastian Ungureanu --- Documentation/git-stash.txt

[GSoC][PATCH v7 11/26] stash: change `git stash show` usage text and documentation

2018-08-08 Thread Paul-Sebastian Ungureanu
It is already stated in documentation that it will accept any option known to `git diff`, but not in the usage text and some parts of the documentation. Signed-off-by: Paul-Sebastian Ungureanu --- Documentation/git-stash.txt | 4 ++-- builtin/stash--helper.c | 4 ++-- 2 files changed, 4

[GSoC][PATCH v7 07/26] stash: convert branch to builtin

2018-08-08 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 v7 03/26] stash: update test cases conform to coding guidelines

2018-08-08 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 af7586d43..de6cab1fe

[GSoC][PATCH v7 17/26] stash: avoid spawning a "diff-index" process

2018-08-08 Thread Paul-Sebastian Ungureanu
This commits replaces spawning `diff-index` child process by using the already existing `diff` API --- builtin/stash--helper.c | 56 ++--- 1 file changed, 42 insertions(+), 14 deletions(-) diff --git a/builtin/stash--helper.c b/builtin/stash--helper.c index

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

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

[GSoC][PATCH v7 26/26] stash: replace all "git apply" child processes with API calls

2018-08-08 Thread Paul-Sebastian Ungureanu
`apply_all_patches()` does not provide a method to apply patches from strbuf. Because of this, this commit introduces a new function `apply_patch_from_buf()` which applies a patch from buf. It works by saving the strbuf as a file. This way we can call `apply_all_patches()`. Before returning, the

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

2018-08-08 Thread Paul-Sebastian Ungureanu
` errors out on `--index` and does not display any message on `--quiet`, but errors out if the stash is not empty. Signed-off-by: Paul-Sebastian Ungureanu --- builtin/stash--helper.c | 78 git-stash.sh| 132 +--- 2 files

[GSoC][PATCH v7 23/26] stash: convert `stash--helper.c` into `stash.c`

2018-08-08 Thread Paul-Sebastian Ungureanu
The old shell script `git-stash.sh` was removed and replaced entirely by `builtin/stash.c`. In order to do that, `create` and `push` were adapted to work without `stash.sh`. For example, before this commit, `git stash create` called `git stash--helper create --message "$*"`. If it called `git

[GSoC][PATCH v7 00/26] Convert "git stash" to C builtin

2018-08-08 Thread Paul-Sebastian Ungureanu
C: 0,13s user 0,19s system 102% cpu 0,308 total Best regards, Paul Ungureanu 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-Seb

[GSoC][PATCH v7 24/26] stash: optimize `get_untracked_files()` and `check_changes()`

2018-08-08 Thread Paul-Sebastian Ungureanu
This commits introduces a optimization by avoiding calling the same functions again. For example, `git stash push -u` would call at some points the following functions: * `check_changes()` * `do_create_stash()`, which calls: `check_changes()` and `get_untracked_files()` Note that

[GSoC][PATCH v7 19/26] stash: make push to be quiet

2018-08-08 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. --- builtin/stash--helper.c | 41

[GSoC][PATCH v7 20/26] stash: add tests for `git stash push -q`

2018-08-08 Thread Paul-Sebastian Ungureanu
This commit introduces more tests for the quiet option of `git stash push`. --- t/t3903-stash.sh | 21 + 1 file changed, 21 insertions(+) diff --git a/t/t3903-stash.sh b/t/t3903-stash.sh index 8d002a7f2..b78db74ae 100755 --- a/t/t3903-stash.sh +++ b/t/t3903-stash.sh @@

[GSoC][PATCH v7 22/26] stash: convert save to builtin

2018-08-08 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()`). --- builtin/stash--helper.c | 48 +++ git-stash.sh| 311

[GSoC][PATCH v7 14/26] stash: convert store to builtin

2018-08-08 Thread Paul-Sebastian Ungureanu
Add stash store to the helper and delete the store_stash function from the shell script. Add the usage string which was forgotten in the shell script. Signed-off-by: Paul-Sebastian Ungureanu --- builtin/stash--helper.c | 52 + git-stash.sh

[GSoC][PATCH v7 25/26] stash: replace all `write-tree` child processes with API calls

2018-08-08 Thread Paul-Sebastian Ungureanu
This commit replaces spawning `git write-tree` with API calls. --- builtin/stash.c | 40 1 file changed, 12 insertions(+), 28 deletions(-) diff --git a/builtin/stash.c b/builtin/stash.c index 4d5c0d16e..46e76a34e 100644 --- a/builtin/stash.c +++

[GSoC][PATCH v7 16/26] stash: replace spawning a "read-tree" process

2018-08-08 Thread Paul-Sebastian Ungureanu
Instead of spawning a child process, make use of `reset_tree()` function already implemented in `stash-helper.c`. --- builtin/stash--helper.c | 9 +++-- 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/builtin/stash--helper.c b/builtin/stash--helper.c index a4e57899b..887b78d05

[GSoC][PATCH v7 21/26] stash: replace spawning `git ls-files` child process

2018-08-08 Thread Paul-Sebastian Ungureanu
This commit replaces spawning `git ls-files` child process with API calls to get the untracked files. --- builtin/stash--helper.c | 49 +++-- 1 file changed, 32 insertions(+), 17 deletions(-) diff --git a/builtin/stash--helper.c b/builtin/stash--helper.c index

[GSoC][PATCH v7 08/26] stash: convert pop to builtin

2018-08-08 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 v7 05/26] stash: convert apply to builtin

2018-08-08 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 v7 09/26] stash: implement the "list" command in the builtin

2018-08-08 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 v7 02/26] stash: improve option parsing test coverage

2018-08-08 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 v7 09/26] stash: implement the "list" command in the builtin

2018-08-18 Thread Paul Sebastian Ungureanu
On Wed, Aug 15, 2018 at 10:41 PM, Thomas Gummerer wrote: >> Subject: stash: implement the "list" command in the builtin > > Nit: The previous commit messages all have the format "stash: convert > to builtin", maybe follow the same pattern here? At first, the subject of the commit matched the

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

Re: [RFC PATCH 5/6] sha1-name: Teach `get_oid_with_context[_1]()` to be gentle

2018-07-18 Thread Paul-Sebastian Ungureanu
Hello, This points us back to "only-to-die" which was "gently" before 2e83b66c ("fix overslow :/no-such-string-ever-existed diagnostics", 2011-05-10). I think we have to keep them both, as only-to-die means more than just being not gentle, and we cannot revert the renaming

Re: [RFC PATCH 0/6] Add gentle alternative for `get_oid()`

2018-07-18 Thread Paul-Sebastian Ungureanu
Hello, On 17.07.2018 20:45, Duy Nguyen wrote: Since get_oid() callers must handle failure when it returns non-zero, I would say "gently" is already implied by get_oid() and we could just convert those die() to error() or warning(). Unless some of those die() are very special that we need to

[RFC PATCH 2/6] tree-walk: Add three new gentle helpers

2018-07-17 Thread Paul-Sebastian Ungureanu
, no additional changes will be needed. Signed-off-by: Paul-Sebastian Ungureanu --- sha1-name.c | 2 +- tree-walk.c | 108 +++- tree-walk.h | 3 +- 3 files changed, 94 insertions(+), 19 deletions(-) diff --git a/sha1-name.c b/sha1-name.c index 60d9ef3c7

[RFC PATCH 3/6] refs.c: Teach `read_ref_at()` to accept `GET_OID_GENTLY` flag

2018-07-17 Thread Paul-Sebastian Ungureanu
This commit introduces a way to call `read_ref_at()` without exiting on failure. Signed-off-by: Paul-Sebastian Ungureanu --- refs.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/refs.c b/refs.c index 0eb379f93..4a470158e 100644 --- a/refs.c +++ b/refs.c @@ -932,6 +932,8 @@ int

[RFC PATCH 1/6] sha1-name: Add `GET_OID_GENTLY` flag

2018-07-17 Thread Paul-Sebastian Ungureanu
here `function1() -> function2()` means that `function1()` might call `function2()` at some point. Signed-off-by: Paul-Sebastian Ungureanu --- cache.h | 1 + 1 file changed, 1 insertion(+) diff --git a/cache.h b/cache.h index d49092d94..cb8803e2f 100644 --- a/cache.h +++ b/cache.h @@ -1314,6

[RFC PATCH 4/6] sha1-name: Teach `get_oid_basic()` to be gentle

2018-07-17 Thread Paul-Sebastian Ungureanu
After teaching `read_ref_at()` we need to teach `get_oid_basic()` that `read_ref_at()` might not call `exit()`, but report an error through the return value. Signed-off-by: Paul-Sebastian Ungureanu --- sha1-name.c | 16 1 file changed, 12 insertions(+), 4 deletions(-) diff

Re: [GSoC] GSoC with git, week 11

2018-07-17 Thread Paul-Sebastian Ungureanu
Hello, On 17.07.2018 21:41, Alban Gruin wrote: Hi, I published a new blog post about last week: https://blog.pa1ch.fr/posts/2018/07/17/en/gsoc2018-week11.html Cheers, Alban Great entry! Here I am too, with two updates on the blog: * The weekly blog.

Re: [GSoC] GSoC with git, week 12

2018-07-24 Thread Paul-Sebastian Ungureanu
Hello, On 24.07.2018 21:55, Alban Gruin wrote: Hi, I published a new blog post here: https://blog.pa1ch.fr/posts/2018/07/24/en/gsoc2018-week12.html Cheers, Alban Great! Mine is also up: https://ungps.github.io/2018/07/22/week-12/ Best, Paul

Re: [RFC PATCH 2/6] tree-walk: Add three new gentle helpers

2018-07-18 Thread Paul-Sebastian Ungureanu
Hello, On 17.07.2018 21:55, Junio C Hamano wrote: I wonder if the GENTLY option should apply to update_tree_entry() the same way as it would to the other codepaths that currently die to express "we were handed this string by the caller and told to give back object ID the string represents, and

[RFC PATCH 6/6] sha1-name: Add gentle alternative for `get_oid()`

2018-07-17 Thread Paul-Sebastian Ungureanu
Add `get_oid_gently()` to be a gentle alternative to `get_oid()`. Signed-off-by: Paul-Sebastian Ungureanu --- cache.h | 1 + sha1-name.c | 6 ++ 2 files changed, 7 insertions(+) diff --git a/cache.h b/cache.h index cb8803e2f..36e196202 100644 --- a/cache.h +++ b/cache.h @@ -1321,6

[RFC PATCH 5/6] sha1-name: Teach `get_oid_with_context[_1]()` to be gentle

2018-07-17 Thread Paul-Sebastian Ungureanu
This commit makes `get_oid_with_context()` and `get_oid_with_context_1()` to recognize the `GET_OID_GENTLY` flag. The `gentle` flag does not imply `quiet` and we might need to reconsider whether we should display any message if `GET_OID_GENTLY` is given. Signed-off-by: Paul-Sebastian Ungureanu

[RFC PATCH 0/6] Add gentle alternative for `get_oid()`

2018-07-17 Thread Paul-Sebastian Ungureanu
, `git stash` spawns a child process to avoid `get_oid()` to die. If this series turns out to be good enough to be accepted, do I need to wait until it gets merged in `master` to use it in the other project mentioned before? Thanks, Paul Paul-Sebastian Ungureanu (6): sha1-name: Add `GET_OID_GENTLY

[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 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 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 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 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

[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 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 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

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

Re: [GSoC] GSoC with git, week 10

2018-07-13 Thread Paul-Sebastian Ungureanu
Hello, I am back with a new (and updated) blog entry, in which I talked more about the bugs I mentioned in the previous post. https://ungps.github.io/ Best regards, Paul

Re: [GSoC] GSoC with git, week 10

2018-07-12 Thread Paul-Sebastian Ungureanu
Hello, Sorry for late notification, my blog is up too. https://prertik.github.io/post/week-10 Good job! I also forgot to post it here, although the blog entry was available since days ago. I am sorry for that! https://ungps.github.io/ P.S: Since the moment I wrote that text, there are

Re: [GSoC][PATCH v3] Make options that expect object ids less chatty if id is invalid

2018-03-06 Thread Paul-Sebastian Ungureanu
Hello Junio, Thank you for reviewing my code. I appreciate it. I made the changes here [1]. On Mon, 2018-03-05 at 16:19 -0800, Junio C Hamano wrote: > Taking these together, I _think_ this patch is moving things in the > right direction, in that it allows callers of parse_options_step() > to

[GSoC][PATCH v4] Make options that expect object ids less chatty if id is invalid

2018-03-06 Thread Paul-Sebastian Ungureanu
tains", "git branch --contains", "git branch --points-at", "git for-each-ref --contains" and many more. Signed-off-by: Paul-Sebastian Ungureanu <ungureanupaulsebast...@gmail.com> --- builtin/blame.c | 1 + builtin/shortlog.c| 1

  1   2   >