[PATCH v12 2/5] test-parse-options: print quiet as integer

2016-04-02 Thread Pranit Bauva
Current implementation of parse-options.c treats OPT__QUIET() as integer and not boolean and thus it is more appropriate to print it as integer to avoid confusion. Signed-off-by: Pranit Bauva --- t/t0040-parse-options.sh | 26 +- test-parse-options.c | 2 +- 2 files

[PATCH v12 3/5] parse-options.c: make OPTION_COUNTUP respect "unspecified" values

2016-04-02 Thread Pranit Bauva
is not negative. To test this behavior "verbose" is set to "unspecified" while quiet is set to 0 which will test the new behavior with all sets of values. Helped-by: Jeff King Helped-by: Eric Sunshine Helped-by: Junio C Hamano Signed-off-by: Pranit Bauva --- The

[PATCH v12 4/5] t7507-commit-verbose: improve test coverage by testing number of diffs

2016-04-02 Thread Pranit Bauva
here it is important to be able to exactly determine how many diffs were present. Helped-by: Eric Sunshine Signed-off-by: Pranit Bauva --- Previous version of this patch: - [v11] : $gmane/28820 - [v10]: $gmane/288820 Changes this version wrt previous one: Include the triple dash which

[PATCH v12 1/5] t0040-test-parse-options.sh: fix style issues

2016-04-02 Thread Pranit Bauva
Signed-off-by: Pranit Bauva --- Changes wrt previous version (v11): - This patch is a split up of patch 1/4 v11 as requested by Junio. - This patch uses the backslash with EOF as suggested by Junio for 2 tests namely "detect possible typos" --- t/t0040-parse-optio

[PATCH v12 5/5] commit: add a commit.verbose config variable

2016-04-02 Thread Pranit Bauva
Add commit.verbose configuration variable as a convenience for those who always prefer --verbose. Helped-by: Junio C Hamano Helped-by: Eric Sunshine Signed-off-by: Pranit Bauva --- The previous version of the patch are: - [v11] $gmane/288820 - [v10] $gmane/288820 - [v9] $gmane/288820

Re: [PATCH v12 1/5] t0040-test-parse-options.sh: fix style issues

2016-04-04 Thread Pranit Bauva
On Mon, Apr 4, 2016 at 2:30 AM, Eric Sunshine wrote: > On Sat, Apr 2, 2016 at 7:33 PM, Pranit Bauva wrote: >> Signed-off-by: Pranit Bauva >> --- >> diff --git a/t/t0040-parse-options.sh b/t/t0040-parse-options.sh >> @@ -7,7 +7,7 @@ test_description='our own optio

Re: [PATCH v12 1/5] t0040-test-parse-options.sh: fix style issues

2016-04-04 Thread Pranit Bauva
On Mon, Apr 4, 2016 at 11:00 PM, Eric Sunshine wrote: > On Mon, Apr 4, 2016 at 8:45 AM, Pranit Bauva wrote: >> Okay I will do the change. I was previously unaware about the use of >> '\' before EOF. I googled it now. But I am still confused about its >> us

Re: Feature request: config option for default git commit -v

2016-04-05 Thread Pranit Bauva
test revision of the patch is at http://thread.gmane.org/gmane.comp.version-control.git/288820 Thanks, Pranit Bauva -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH v12 2/5] test-parse-options: print quiet as integer

2016-04-05 Thread Pranit Bauva
[+cc:Duy Nguyen, Jonathan Nieder] On Mon, Apr 4, 2016 at 3:00 AM, Eric Sunshine wrote: > On Sat, Apr 2, 2016 at 7:33 PM, Pranit Bauva wrote: >> Current implementation of parse-options.c treats OPT__QUIET() as integer >> and not boolean and thus it is more appropriate to prin

Re: [PATCH v12 3/5] parse-options.c: make OPTION_COUNTUP respect "unspecified" values

2016-04-05 Thread Pranit Bauva
On Mon, Apr 4, 2016 at 4:40 AM, Eric Sunshine wrote: > On Sat, Apr 2, 2016 at 7:33 PM, Pranit Bauva wrote: >> The reason to make it respect "unspecified" values is to give the >> ability to differentiate whether `--option` or `--no-option` was >> specified at all.

Re: [PATCH v12 4/5] t7507-commit-verbose: improve test coverage by testing number of diffs

2016-04-05 Thread Pranit Bauva
On Mon, Apr 4, 2016 at 5:32 AM, Eric Sunshine wrote: > On Sat, Apr 2, 2016 at 7:33 PM, Pranit Bauva wrote: >> Make the fake "editor" store output of grep in a file so that we can >> see how many diffs were contained in the message and use them in >> individual

Re: [PATCH v12 5/5] commit: add a commit.verbose config variable

2016-04-05 Thread Pranit Bauva
On Tue, Apr 5, 2016 at 4:59 AM, Eric Sunshine wrote: > On Sun, Apr 3, 2016 at 8:58 PM, Eric Sunshine wrote: >> The fact that the 32 new tests are nearly identical suggests strongly >> that the testing should instead either be table-driven or be done via >> for-loops to systematically cover all ca

Re: What's cooking in git.git (Apr 2016, #03; Thu, 7)

2016-04-07 Thread Pranit Bauva
On Fri, Apr 8, 2016 at 12:31 AM, Junio C Hamano wrote: > Here are the topics that have been cooking. Commits prefixed with > '-' are only in 'pu' (proposed updates) while commits prefixed with > '+' are in 'next'. The ones marked with '.' do not appear in any of > the integration branches, but I

[PATCH v13 1/6] t0040-test-parse-options.sh: fix style issues

2016-04-09 Thread Pranit Bauva
Signed-off-by: Pranit Bauva --- Changes wrt previous version (v12): - Use '\' when interpolation isn't required --- t/t0040-parse-options.sh | 76 1 file changed, 38 insertions(+), 38 deletions(-) diff --git a/t/t0040-parse-optio

[PATCH v13 2/6] test-parse-options: print quiet as integer

2016-04-09 Thread Pranit Bauva
Current implementation of parse-options.c treats OPT__QUIET() as integer and not boolean and thus it is more appropriate to print it as integer to avoid confusion. Signed-off-by: Pranit Bauva --- t/t0040-parse-options.sh | 26 +- test-parse-options.c | 2 +- 2 files

[PATCH v13 3/6] t0040-parse-options: improve test coverage

2016-04-09 Thread Pranit Bauva
Include tests to check for multiple levels of quiet and to check if the '--no-quiet' option sets it to 0. Signed-off-by: Pranit Bauva --- t/t0040-parse-options.sh | 37 + 1 file changed, 37 insertions(+) diff --git a/t/t0040-parse-options.sh b/t/t

[PATCH v13 6/6] commit: add a commit.verbose config variable

2016-04-09 Thread Pranit Bauva
Add commit.verbose configuration variable as a convenience for those who always prefer --verbose. Helped-by: Junio C Hamano Helped-by: Eric Sunshine Signed-off-by: Pranit Bauva --- The previous version of the patch are: - [v12] $gmane/288820 - [v11] $gmane/288820 - [v10] $gmane/288820

[PATCH v13 5/6] t7507-commit-verbose: improve test coverage by testing number of diffs

2016-04-09 Thread Pranit Bauva
easy substitute. Helped-by: Eric Sunshine Signed-off-by: Pranit Bauva --- Previous version of this patch: - [v12] : $gmane/288820 - [v11] : $gmane/288820 - [v10]: $gmane/288820 Changes this version wrt previous one: Change the commit message as suggested by Eric --- t/t7507-commit-verbose

[PATCH v13 4/6] parse-options.c: make OPTION_COUNTUP respect "unspecified" values

2016-04-09 Thread Pranit Bauva
l test the new behavior with all sets of values. Helped-by: Jeff King Helped-by: Eric Sunshine Helped-by: Junio C Hamano Signed-off-by: Pranit Bauva --- The discussion about this patch: [1] : http://thread.gmane.org/gmane.comp.version-control.git/289027 Previous version of the patch: [v11] : ht

Re: [PATCH v13 6/6] commit: add a commit.verbose config variable

2016-04-12 Thread Pranit Bauva
On Wed, Apr 13, 2016 at 2:54 AM, Junio C Hamano wrote: > Hmph, isn't this already in 'next', hence we cannot accept a > replacement patch? Yes, this is already in 'next'. This was going to be merged in the third cycle after 2.8 but on my request, you delayed it. So this is an update on the patch.

Re: [PATCH v13 2/6] test-parse-options: print quiet as integer

2016-04-12 Thread Pranit Bauva
On Wed, Apr 13, 2016 at 3:03 AM, Junio C Hamano wrote: > Pranit Bauva writes: > >> Current implementation of parse-options.c treats OPT__QUIET() as integer >> and not boolean and thus it is more appropriate to print it as integer >> to avoid confusion. > > There is

Re: [PATCH v13 6/6] commit: add a commit.verbose config variable

2016-04-12 Thread Pranit Bauva
On Wed, Apr 13, 2016 at 3:48 AM, Junio C Hamano wrote: > Junio C Hamano writes: > >> Junio C Hamano writes: >> >>> Hmph, isn't this already in 'next', hence we cannot accept a >>> replacement patch? >> >> As a one-time measure, I'll revert the previous one >> >> 50f0d20d (commit: add a commit.ve

[PATCH v14 6/6] commit: add a commit.verbose config variable

2016-04-12 Thread Pranit Bauva
Add commit.verbose configuration variable as a convenience for those who always prefer --verbose. Helped-by: Junio C Hamano Helped-by: Eric Sunshine Signed-off-by: Pranit Bauva --- The previous version of the patch are: - [v12] $gmane/288820 - [v11] $gmane/288820 - [v10] $gmane/288820

[PATCH v14 4/6] parse-options.c: make OPTION_COUNTUP respect "unspecified" values

2016-04-12 Thread Pranit Bauva
l test the new behavior with all sets of values. Helped-by: Jeff King Helped-by: Eric Sunshine Helped-by: Junio C Hamano Signed-off-by: Pranit Bauva --- The discussion about this patch: [1] : http://thread.gmane.org/gmane.comp.version-control.git/289027 Previous version of the patch: [v11] : ht

[PATCH v14 2/6] test-parse-options: print quiet as integer

2016-04-12 Thread Pranit Bauva
We would want to see how multiple --quiet options affect the value of the underlying variable (we may want "--quiet --quiet" to still be 1, or we may want to see the value incremented to 2). Show the value as integer to allow us to inspect it. Signed-off-by: Pranit Bauva --- t/t

[PATCH v14 1/6] t0040-test-parse-options.sh: fix style issues

2016-04-12 Thread Pranit Bauva
Signed-off-by: Pranit Bauva --- Changes wrt previous version (v12): - Use '\' when interpolation isn't required --- t/t0040-parse-options.sh | 76 1 file changed, 38 insertions(+), 38 deletions(-) diff --git a/t/t0040-parse-optio

[PATCH v14 5/6] t7507-commit-verbose: improve test coverage by testing number of diffs

2016-04-12 Thread Pranit Bauva
is an easy substitute and also helps in maintaining the consistency. Helped-by: Eric Sunshine Signed-off-by: Pranit Bauva --- Previous version of this patch: - [v12] : $gmane/288820 - [v11] : $gmane/288820 - [v10]: $gmane/288820 Changes this version wrt previous one: Change the commit message a

[PATCH v14 3/6] t0040-parse-options: improve test coverage

2016-04-12 Thread Pranit Bauva
Include tests to check for multiple levels of quiet and to check if the '--no-quiet' option sets it to 0. Signed-off-by: Pranit Bauva --- t/t0040-parse-options.sh | 37 + 1 file changed, 37 insertions(+) diff --git a/t/t0040-parse-options.sh b/t/t

Re: [PATCH v14 4/6] parse-options.c: make OPTION_COUNTUP respect "unspecified" values

2016-04-13 Thread Pranit Bauva
On Wed, Apr 13, 2016 at 11:26 AM, Eric Sunshine wrote: > On Tue, Apr 12, 2016 at 7:02 PM, Pranit Bauva wrote: >> OPT_COUNTUP() merely increments the counter upon --option, and resets it >> to 0 upon --no-option, which means that there is no "unspecified" value &

Re: [PATCH v14 3/6] t0040-parse-options: improve test coverage

2016-04-13 Thread Pranit Bauva
On Wed, Apr 13, 2016 at 10:56 AM, Eric Sunshine wrote: > On Tue, Apr 12, 2016 at 7:02 PM, Pranit Bauva wrote: >> Include tests to check for multiple levels of quiet and to check if the >> '--no-quiet' option sets it to 0. >> >> Signed-off-by: Pranit Bauva

Re: [PATCH v14 5/6] t7507-commit-verbose: improve test coverage by testing number of diffs

2016-04-13 Thread Pranit Bauva
On Wed, Apr 13, 2016 at 11:33 AM, Eric Sunshine wrote: > On Tue, Apr 12, 2016 at 7:02 PM, Pranit Bauva wrote: >> Make the fake "editor" store output of grep in a file so that we can >> see how many diffs were contained in the message and use them in >> individual

Re: [PATCH v14 6/6] commit: add a commit.verbose config variable

2016-04-13 Thread Pranit Bauva
On Wed, Apr 13, 2016 at 11:44 AM, Eric Sunshine wrote: > On Tue, Apr 12, 2016 at 7:02 PM, Pranit Bauva wrote: > >> +test_expect_success 'status does not verbose without --verbose' ' >> + git status >actual && >> + ! grep "^diff

Re: [PATCH v14 4/6] parse-options.c: make OPTION_COUNTUP respect "unspecified" values

2016-04-13 Thread Pranit Bauva
On Wed, Apr 13, 2016 at 11:03 PM, Eric Sunshine wrote: > On Wed, Apr 13, 2016 at 4:39 AM, Pranit Bauva wrote: >> On Wed, Apr 13, 2016 at 11:26 AM, Eric Sunshine >> wrote: >>> On Tue, Apr 12, 2016 at 7:02 PM, Pranit Bauva >>> wrote: >>>> +test_e

Re: What's cooking in git.git (Apr 2016, #06; Thu, 21)

2016-04-21 Thread Pranit Bauva
> configuration variable and act as if "--verbose" option was > given from the command line. > > Is this going to be rerolled? > ($gmane/291382) The changes weren't that big enough and I had my end semester exams coming so I decided not to re-roll it. If you think con

Re: What's cooking in git.git (Apr 2016, #06; Thu, 21)

2016-04-23 Thread Pranit Bauva
u can expect the patches in around 1 week. I will once again clarify with Eric about the tests since there was quite misunderstanding. Regards, Pranit Bauva -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

GSoC Project Selected | Incremental Rewrite of git bisect

2016-04-23 Thread Pranit Bauva
Hey everyone, I am Pranit Bauva studying Mining Engineering at Indian Institute of Technology, Kharagpur. I have applied for Google Summer of Code 2016 under Git organization and my project[1], "Incremental Rewrite of git bisect has been selected under the guidance of mentors namely Chri

Re: [PATCH v14 3/6] t0040-parse-options: improve test coverage

2016-04-25 Thread Pranit Bauva
On Wed, Apr 13, 2016 at 10:57 PM, Eric Sunshine wrote: > On Wed, Apr 13, 2016 at 4:59 AM, Pranit Bauva wrote: >> On Wed, Apr 13, 2016 at 10:56 AM, Eric Sunshine >> wrote: >>> On Tue, Apr 12, 2016 at 7:02 PM, Pranit Bauva >>> wrote: >>>> +te

Re: [PATCH v14 3/6] t0040-parse-options: improve test coverage

2016-04-27 Thread Pranit Bauva
On Wed, Apr 27, 2016 at 11:25 PM, Eric Sunshine wrote: > On Mon, Apr 25, 2016 at 2:40 PM, Pranit Bauva wrote: >> On Wed, Apr 13, 2016 at 10:57 PM, Eric Sunshine >> wrote: >>> Each of these patches should have a single conceptual purpose. It >>> seems, from t

[PATCH v15 1/7] t0040-test-parse-options.sh: fix style issues

2016-04-30 Thread Pranit Bauva
Signed-off-by: Pranit Bauva --- Changes wrt previous version (v12): - Use '\' when interpolation isn't required Signed-off-by: Pranit Bauva --- t/t0040-parse-options.sh | 76 1 file changed, 38 insertions(+), 38 deletions(-)

[PATCH v15 3/7] t0040-parse-options: improve test coverage

2016-04-30 Thread Pranit Bauva
Include tests to check for multiple levels of quiet and to check if the '--no-quiet' option sets it to 0. Signed-off-by: Pranit Bauva --- Link to v14: - $gmane/20 Changes wrt v14: - Change the test to use '-q -q -q --no-quiet' instead of just '--no-quiet&#x

[PATCH v15 4/7] parse-options.c: make OPTION_COUNTUP respect "unspecified" values

2016-04-30 Thread Pranit Bauva
l test the new behavior with all sets of values. Helped-by: Jeff King Helped-by: Eric Sunshine Helped-by: Junio C Hamano Signed-off-by: Pranit Bauva --- The discussion about this patch: [1] : http://thread.gmane.org/gmane.comp.version-control.git/289027 Previous version of the patch: [v14] : ht

[PATCH v15 2/7] test-parse-options: print quiet as integer

2016-04-30 Thread Pranit Bauva
We would want to see how multiple --quiet options affect the value of the underlying variable (we may want "--quiet --quiet" to still be 1, or we may want to see the value incremented to 2). Show the value as integer to allow us to inspect it. Signed-off-by: Pranit Bauva --- t/t

[PATCH v15 5/7] t7507-commit-verbose: improve test coverage by testing number of diffs

2016-04-30 Thread Pranit Bauva
. Also use write_script() to create the fake "editor". Helped-by: Eric Sunshine Signed-off-by: Pranit Bauva --- Previous version of this patch: - [v12] : $gmane/288820 - [v11] : $gmane/288820 - [v10]: $gmane/288820 Changes this version wrt previous one: Change the commit message as

[PATCH v15 7/7] t/t7507: tests for broken behavior of status

2016-04-30 Thread Pranit Bauva
an cause git-status to display a verbose output even when it isn't supposed to. Signed-off-by: Pranit Bauva --- This is a split off from the previous patch 6/6 as suggested by Eric Sunshine. Signed-off-by: Pranit Bauva --- t/t7507-commit-verbose.sh | 10 ++ 1 file changed, 10

[PATCH v15 6/7] commit: add a commit.verbose config variable

2016-04-30 Thread Pranit Bauva
Add commit.verbose configuration variable as a convenience for those who always prefer --verbose. Helped-by: Junio C Hamano Helped-by: Eric Sunshine Signed-off-by: Pranit Bauva --- The previous version of the patch are: - [v12] $gmane/288820 - [v11] $gmane/288820 - [v10] $gmane/288820

Re: [PATCH v15 7/7] t/t7507: tests for broken behavior of status

2016-05-02 Thread Pranit Bauva
On Tue, May 3, 2016 at 4:37 AM, Junio C Hamano wrote: > Pranit Bauva writes: > >> Variable named 'verbose' in builtin/commit.c is consumed by git-status >> and git-commit so if a new verbose related behavior is introduced in >> git-commit, then it should not

Re: What's cooking in git.git (Mar 2017, #02; Fri, 3)

2017-03-05 Thread Pranit Bauva
d its way into "next". (There were also recent discussions > on other bisect strategies [3] and it's probably only a matter of time > until a new big patchset on bisect--helper comes up...) I am sorry I haven't found much time on it. I actually came across a bug and haven't been able to fix that so I had just not worked on it then. I almost forgot that you too had a patch series and this series is important for you. I will start working on this and send a re-roll soon. Regards, Pranit Bauva

[PATCH v16 2/6] bisect--helper: rewrite `check_term_format` shell function in C

2017-09-28 Thread Pranit Bauva
will be introduced for write_terms(). Helped-by: Johannes Schindelein Mentored-by: Lars Schneider Mentored-by: Christian Couder Signed-off-by: Pranit Bauva --- builtin/bisect--helper.c | 60 +++- git-bisect.sh| 31

[PATCH v16 1/6] bisect--helper: use OPT_CMDMODE instead of OPT_BOOL

2017-09-28 Thread Pranit Bauva
d-by: Lars Schneider Mentored-by: Christian Couder Signed-off-by: Pranit Bauva --- Hey, It has been a long time since this series appeared on the mailing list. The previous version v15[1] is now split into many parts and I am sending the first part right now, will focus on getting this merged and

[PATCH v16 3/6] bisect--helper: `write_terms` shell function in C

2017-09-28 Thread Pranit Bauva
implementation will be called by some other method. Mentored-by: Lars Schneider Mentored-by: Christian Couder Signed-off-by: Pranit Bauva --- builtin/bisect--helper.c | 36 +--- git-bisect.sh| 22 +++--- 2 files changed, 36 insertions(+), 22

[PATCH v16 4/6] bisect--helper: `bisect_clean_state` shell function in C

2017-09-28 Thread Pranit Bauva
Signed-off-by: Pranit Bauva --- bisect.c | 42 ++ bisect.h | 2 ++ builtin/bisect--helper.c | 10 +- git-bisect.sh| 26 +++--- 4 files changed, 56 insertions(+), 24 deletions(-) diff --git

[PATCH v16 6/6] bisect--helper: `is_expected_rev` & `check_expected_revs` shell function in C

2017-09-28 Thread Pranit Bauva
ting test suite. As more functions are ported, this subcommand would be retired but its implementation will be called by some other method. Helped-by: Eric Sunshine Mentored-by: Lars Schneider Mentored-by: Christian Couder Signed-off-by: Pranit Bauva --- builtin/bisect--helper.c

[PATCH v16 5/6] t6030: explicitly test for bisection cleanup

2017-09-28 Thread Pranit Bauva
Add test to explicitly check that 'git bisect reset' is working as expected. This is already covered implicitly by the test suite. Mentored-by: Lars Schneider Mentored-by: Christian Couder Signed-off-by: Pranit Bauva --- I faced this problem while converting `bisect_clean_state` and

Re: [PATCH v16 1/6] bisect--helper: use OPT_CMDMODE instead of OPT_BOOL

2017-09-29 Thread Pranit Bauva
Hey Stephan, On Sat, Sep 30, 2017 at 12:24 AM, Stephan Beyer wrote: > > Hi Pranit, > > On 09/29/2017 08:49 AM, Pranit Bauva wrote: > > It has been a long time since this series appeared on the mailing list. > > The previous version v15[1] is now split into many parts

Re: [PATCH v16 1/6] bisect--helper: use OPT_CMDMODE instead of OPT_BOOL

2017-10-02 Thread Pranit Bauva
N_("update BISECT_HEAD instead of checking out the > current commit")), > OPT_END() > @@ -140,17 +111,14 @@ int cmd_bisect__helper(int argc, const char **argv, > const char *prefix) > return bisect_next_all(prefix, no_checkout); > case WRITE_TERMS: > if (argc != 2) > - return error(_("--write-terms requires two > arguments")); > + die(_("--write-terms requires two arguments")); > return write_terms(argv[0], argv[1]); > case BISECT_CLEAN_STATE: > if (argc != 0) > - return error(_("--bisect-clean-state requires no > arguments")); > + die(_("--bisect-clean-state requires no arguments")); > return bisect_clean_state(); > - case CHECK_EXPECTED_REVS: > - check_expected_revs(argv, argc); > - return 0; > default: > - return error("BUG: unknown subcommand '%d'", cmdmode); > + die("BUG: unknown subcommand '%d'", cmdmode); I will keep the return rather than die since Christian and I had a few conversations long back. Regards, Pranit Bauva www.bauva.com

Re: [PATCH v16 1/6] bisect--helper: use OPT_CMDMODE instead of OPT_BOOL

2017-10-02 Thread Pranit Bauva
Hey Junio, On Tue, Oct 3, 2017 at 9:21 AM, Junio C Hamano wrote: > Ramsay Jones writes: > >> On 02/10/17 14:44, Pranit Bauva wrote: >> [snip] >>>... >> Yes, I also meant to tidy that up by removing some, now >> redundant, initialisation later in that fun

[PATCH v16 Part II 8/8] t6030: make various test to pass GETTEXT_POISON tests

2017-10-27 Thread Pranit Bauva
Signed-off-by: Pranit Bauva --- t/t6030-bisect-porcelain.sh | 120 ++-- 1 file changed, 60 insertions(+), 60 deletions(-) diff --git a/t/t6030-bisect-porcelain.sh b/t/t6030-bisect-porcelain.sh index 55835ee4a4715..f9e61c6540e57 100755 --- a/t/t6030-bisect

[PATCH v16 Part II 4/8] bisect--helper: `check_and_set_terms` shell function in C

2017-10-27 Thread Pranit Bauva
-by: Pranit Bauva --- builtin/bisect--helper.c | 41 - git-bisect.sh| 36 2 files changed, 44 insertions(+), 33 deletions(-) diff --git a/builtin/bisect--helper.c b/builtin/bisect--helper.c index 6295f53c850a8

[PATCH v16 Part II 3/8] wrapper: move is_empty_file() and rename it as is_empty_or_missing_file()

2017-10-27 Thread Pranit Bauva
is_empty_file() can help to refactor a lot of code. This will be very helpful in porting "git bisect" to C. Suggested-by: Torsten Bögershausen Mentored-by: Lars Schneider Mentored-by: Christian Couder Signed-off-by: Pranit Bauva --- builtin/am.c | 20 ++-- cache.h

[PATCH v16 Part II 2/8] bisect--helper: `bisect_write` shell function in C

2017-10-27 Thread Pranit Bauva
() to set the values of members in `struct bisect_terms`. Helped-by: Ramsay Jones Mentored-by: Lars Schneider Mentored-by: Christian Couder Signed-off-by: Pranit Bauva --- builtin/bisect--helper.c | 107 +-- git-bisect.sh| 25 ++- 2

[PATCH v16 Part II 6/8] bisect--helper: `get_terms` & `bisect_terms` shell function in C

2017-10-27 Thread Pranit Bauva
are ported, this subcommand will be retired but its implementation will be called by some other methods. Also use error() to report "no terms defined" and accordingly change the test in t6030. Mentored-by: Lars Schneider Mentored-by: Christian Couder Signed-off-by: Pranit Bauva --

[PATCH v16 Part II 1/8] bisect--helper: `bisect_reset` shell function in C

2017-10-27 Thread Pranit Bauva
Signed-off-by: Pranit Bauva --- Hey, This is the part 2 of the initial series[1] on bisect re-write. When I submitted my patches of the part 1 of the bisect series, Ramsay informed that he has been working on my previous patches and pointed me to his patches. I have incorporated his changes into

[PATCH v16 Part II 7/8] bisect--helper: `bisect_start` shell function partially in C

2017-10-27 Thread Pranit Bauva
`bisect_append_log_quoted` to keep things short and crisp. Helped-by: Ramsay Jones Helped-by: Stephan Beyer Mentored-by: Lars Schneider Mentored-by: Christian Couder Signed-off-by: Pranit Bauva --- builtin/bisect--helper.c | 228 ++- git-bisect.sh| 132

[PATCH v16 Part II 5/8] bisect--helper: `bisect_next_check` shell function in C

2017-10-27 Thread Pranit Bauva
by: Christian Couder Signed-off-by: Pranit Bauva --- builtin/bisect--helper.c | 91 +++- git-bisect.sh| 60 +++ 2 files changed, 94 insertions(+), 57 deletions(-) diff --git a/builtin/bisect--helper.c b/buil

Re: [PATCH v16 Part II 1/8] bisect--helper: `bisect_reset` shell function in C

2017-10-27 Thread Pranit Bauva
Hey, I forgot to mention. One can find the travis build here[1] which is passing. [1]: https://travis-ci.org/git/git/builds/293725346 Regards, Pranit Bauva

Re: [PATCH v16 Part II 1/8] bisect--helper: `bisect_reset` shell function in C

2017-10-30 Thread Pranit Bauva
Hey Junio, On Fri, Oct 27, 2017 at 11:10 PM, Junio C Hamano wrote: > Pranit Bauva writes: > >> +static int bisect_reset(const char *commit) >> +{ >> + struct strbuf branch = STRBUF_INIT; >> + >> + if (!commit) { >> + if (strbuf_rea

Re: [PATCH v16 Part II 1/8] bisect--helper: `bisect_reset` shell function in C

2017-10-30 Thread Pranit Bauva
t for > > printf(_("We are not bisecting.\n")); > return 0; > > but please also express it with these two lines. (Or what is the point > of returning a non-zero value only in the case when nothing could be > printed?) I was just being a little lazy I suppose. I will stick to doing it in two lines and avoiding fancy things. Regards, Pranit Bauva

Re: [PATCH v16 Part II 7/8] bisect--helper: `bisect_start` shell function partially in C

2017-10-30 Thread Pranit Bauva
nged from > "unrecognised option: '$arg'" > to > "unrecognised option: '%s'" > anyway, it does not result in further work for the translators to > correct it to > "unrecognized option: '%s'" Yeah Sure! Regards, Pranit Bauva

Re: [PATCH v16 Part II 6/8] bisect--helper: `get_terms` & `bisect_terms` shell function in C

2017-10-30 Thread Pranit Bauva
Hey Stephan, On Mon, Oct 30, 2017 at 10:04 PM, Stephan Beyer wrote: > On 10/27/2017 05:06 PM, Pranit Bauva wrote: >> diff --git a/builtin/bisect--helper.c b/builtin/bisect--helper.c >> index 0f9c3e63821b8..ab0580ce0089a 100644 >> --- a/builtin/bisect--helper.c >> +++

Re: [PATCH v16 Part II 2/8] bisect--helper: `bisect_write` shell function in C

2017-10-30 Thread Pranit Bauva
Hey Martin, On Fri, Oct 27, 2017 at 10:58 PM, Martin Ågren wrote: > On 27 October 2017 at 17:06, Pranit Bauva wrote: >> +static void free_terms(struct bisect_terms *terms) >> +{ >> + if (!terms->term_good) >> + free((void *) terms->term_good)

Re: [PATCH v16 Part II 2/8] bisect--helper: `bisect_write` shell function in C

2017-10-30 Thread Pranit Bauva
Hey Junio, On Fri, Oct 27, 2017 at 11:49 PM, Junio C Hamano wrote: > Pranit Bauva writes: > >> - bisect_write "$state" "$rev" >> + git bisect--helper --bisect-write "$state" "$rev" "$TERM_GOOD" >&g

Re: [PATCH v16 Part II 5/8] bisect--helper: `bisect_next_check` shell function in C

2017-10-30 Thread Pranit Bauva
Hey Martin, On Fri, Oct 27, 2017 at 11:05 PM, Martin Ågren wrote: > On 27 October 2017 at 17:06, Pranit Bauva wrote: >> + /* >> +* have bad (or new) but not good (or old). We could bisect >> +* although

Re: [PATCH v16 Part II 6/8] bisect--helper: `get_terms` & `bisect_terms` shell function in C

2017-10-30 Thread Pranit Bauva
Hey Martin, On Sat, Oct 28, 2017 at 1:34 AM, Martin Ågren wrote: > On 27 October 2017 at 17:06, Pranit Bauva wrote: >> + for (i = 0; i < argc; i++) { >> + if (!strcmp(argv[i], "--term-good")) >> +

[PATCH v17 1/7] bisect--helper: `bisect_reset` shell function in C

2019-01-02 Thread Pranit Bauva via GitGitGadget
From: Pranit Bauva Reimplement `bisect_reset` shell function in C and add a `--bisect-reset` subcommand to `git bisect--helper` to call it from git-bisect.sh . Using `bisect_reset` subcommand is a temporary measure to port shell functions to C so as to use the existing test suite. As more

[PATCH v17 3/7] wrapper: move is_empty_file() and rename it as is_empty_or_missing_file()

2019-01-02 Thread Pranit Bauva via GitGitGadget
From: Pranit Bauva is_empty_file() can help to refactor a lot of code. This will be very helpful in porting "git bisect" to C. Suggested-by: Torsten Bögershausen Mentored-by: Lars Schneider Mentored-by: Christian Couder Signed-off-by: Pranit Bauva --- builtin

[PATCH v17 2/7] bisect--helper: `bisect_write` shell function in C

2019-01-02 Thread Pranit Bauva via GitGitGadget
From: Pranit Bauva Reimplement the `bisect_write` shell function in C and add a `bisect-write` subcommand to `git bisect--helper` to call it from git-bisect.sh Using `--bisect-write` subcommand is a temporary measure to port shell function in C so as to use the existing test suite. As more

[PATCH v17 4/7] bisect--helper: `check_and_set_terms` shell function in C

2019-01-02 Thread Pranit Bauva via GitGitGadget
From: Pranit Bauva Reimplement the `check_and_set_terms` shell function in C and add `check-and-set-terms` subcommand to `git bisect--helper` to call it from git-bisect.sh Using `--check-and-set-terms` subcommand is a temporary measure to port shell function in C so as to use the existing test

[PATCH v17 7/7] bisect--helper: `bisect_start` shell function partially in C

2019-01-02 Thread Pranit Bauva via GitGitGadget
From: Pranit Bauva Reimplement the `bisect_start` shell function partially in C and add `bisect-start` subcommand to `git bisect--helper` to call it from git-bisect.sh . The last part is not converted because it calls another shell function. `bisect_start` shell function will be completed after

[PATCH v17 6/7] bisect--helper: `get_terms` & `bisect_terms` shell function in C

2019-01-02 Thread Pranit Bauva via GitGitGadget
From: Pranit Bauva Reimplement the `get_terms` and `bisect_terms` shell function in C and add `bisect-terms` subcommand to `git bisect--helper` to call it from git-bisect.sh . Using `--bisect-terms` subcommand is a temporary measure to port shell function in C so as to use the existing test

[PATCH v17 5/7] bisect--helper: `bisect_next_check` shell function in C

2019-01-02 Thread Pranit Bauva via GitGitGadget
From: Pranit Bauva Reimplement `bisect_next_check` shell function in C and add `bisect-next-check` subcommand to `git bisect--helper` to call it from git-bisect.sh . `bisect_voc` shell function is no longer useful now and is replaced by using a char *[] of "new|bad" and "g

[PATCH 04/26] bisect.c: libify `exit_if_skipped_commits` to `error_if_skipped...`

2019-02-24 Thread Pranit Bauva via GitGitGadget
From: Pranit Bauva Since we want to get rid of git-bisect.sh it would be necessary to convert those exit() calls to return statements so that errors can be reported. Emulate try catch in C by converting `exit()` to `return `. Follow POSIX conventions to return to indicate error. Modify

[PATCH 06/26] bisect.c: libify `check_merge_bases` and its dependents.

2019-02-24 Thread Pranit Bauva via GitGitGadget
From: Pranit Bauva Since we want to get rid of git-bisect.sh it would be necessary to convert those exit() calls to return statements so that errors can be reported. Emulate try catch in C by converting `exit()` to `return `. Follow POSIX conventions to return to indicate error. Turn `exit

[PATCH 05/26] bisect.c: libify `bisect_checkout` and its dependants

2019-02-24 Thread Pranit Bauva via GitGitGadget
From: Pranit Bauva Since we want to get rid of git-bisect.sh it would be necessary to convert those exit() calls to return statements so that errors can be reported. Emulate try catch in C by converting `exit()` to `return `. Follow POSIX conventions to return to indicate error. Turn `exit

[PATCH 11/26] bisect--helper: Finish `bisect_start()` conversion

2019-02-24 Thread Pranit Bauva via GitGitGadget
From: Pranit Bauva With the conversion of `bisect_auto_next()` in previous commit, `bisect_start()` has been successfully ported to C. Add the subcommands to `git bisect--helper` and call it from git-bisect.sh. Remove `bisect_start()` shell method and call `git bisect--helper --bisect-start

[PATCH 08/26] bisect.c: libify `handle_bad_merge_base` and its dependants

2019-02-24 Thread Pranit Bauva via GitGitGadget
From: Pranit Bauva Since we want to get rid of git-bisect.sh it would be necessary to convert those exit() calls to return statements so that errors can be reported. Emulate try catch in C by converting `exit()` to `return `. Follow POSIX conventions to return to indicate error. Turn `exit

[PATCH 12/26] bisect--helper: dequote arguments in `bisect-start`

2019-02-24 Thread Pranit Bauva via GitGitGadget
From: Pranit Bauva As more and more calls are happening to the subcommands in `git bisect--helper`, more specifically when `bisect_start $rev` is converted to `git bisect--helper --bisect-start $rev` it is necessary to dequote the arguments because of shell to C conversion. Mentored-by

[PATCH 09/26] bisect.c: libify `bisect_next_all` and its dependants

2019-02-24 Thread Pranit Bauva via GitGitGadget
From: Pranit Bauva Since we want to get rid of git-bisect.sh it would be necessary to convert those exit() calls to return statements so that errors can be reported. Emulate try catch in C by converting `exit()` to `return `. Follow POSIX conventions to return to indicate error. Turn `exit

[PATCH 07/26] bisect.c: libify `check_good_are_ancestors_of_bad` and its dependents

2019-02-24 Thread Pranit Bauva via GitGitGadget
From: Pranit Bauva Since we want to get rid of git-bisect.sh it would be necessary to convert those exit() calls to return statements so that errors can be reported. Emulate try catch in C by converting `exit()` to `return `. Follow POSIX conventions to return to indicate error. Turn `exit

[PATCH 22/26] bisect--helper: retire `--bisect-autostart` subcommand

2019-02-24 Thread Pranit Bauva via GitGitGadget
From: Pranit Bauva The `--bisect-autostart` subcommand is no longer used in the shell script and the function `bisect_autostart()` is called from the C implementation. Mentored-by: Lars Schneider Mentored-by: Christian Couder Mentored-by: Johannes Schindelin Signed-off-by: Pranit Bauva

[PATCH 23/26] bisect--helper: retire `--bisect-auto-next` subcommand

2019-02-24 Thread Pranit Bauva via GitGitGadget
From: Pranit Bauva The `--bisect-auto-next` subcommand is no longer used in the shell script and the function `bisect_auto_next()` is called from the C implementation. Mentored-by: Lars Schneider Mentored-by: Christian Couder Mentored-by: Johannes Schindelin Signed-off-by: Pranit Bauva

[PATCH 19/26] bisect--helper: `bisect_log` shell function in C

2019-02-24 Thread Pranit Bauva via GitGitGadget
From: Pranit Bauva Reimplement the `bisect_log()` shell function in C and also add `--bisect-log` subcommand to `git bisect--helper` to call it from git-bisect.sh . Using `--bisect-log` subcommand is a temporary measure to port shell function to C so as to use the existing test suite. As more

[PATCH 17/26] bisect--helper: retire `--check-expected-revs` subcommand

2019-02-24 Thread Pranit Bauva via GitGitGadget
From: Pranit Bauva The `--check-expected-revs` subcommand is no longer used in the shell script and the function `check_expected_revs()` is called from the C implementation of `bisect_next()`. Mentored-by: Lars Schneider Mentored-by: Christian Couder Mentored-by: Johannes Schindelin Signed

[PATCH 10/26] bisect--helper: `bisect_next` and `bisect_auto_next` shell function in C

2019-02-24 Thread Pranit Bauva via GitGitGadget
From: Pranit Bauva Reimplement the `bisect_next()` and the `bisect_auto_next()` shell function in C and add the subcommands to `git bisect--helper` to call it from git-bisect.sh . Using `--bisect-next` and `--bisect-auto-start` subcommands is a temporary measure to port shell function to C so

[PATCH 21/26] bisect--helper: retire `--bisect-write` subcommand

2019-02-24 Thread Pranit Bauva via GitGitGadget
From: Pranit Bauva The `--bisect-write` subcommand is no longer used in the shell script and the function `bisect_write()` is called from the C implementation. Mentored-by: Lars Schneider Mentored-by: Christian Couder Mentored-by: Johannes Schindelin Signed-off-by: Pranit Bauva Signed-off

[PATCH 14/26] bisect--helper: retire `--next-all` subcommand

2019-02-24 Thread Pranit Bauva via GitGitGadget
From: Pranit Bauva The `--next-all` subcommand is no longer used in the shell script and the function `bisect_next_all()` is called from the C implementation of `bisect_next()`. Mentored-by: Lars Schneider Mentored-by: Christian Couder Signed-off-by: Pranit Bauva Signed-off-by: Tanushree

[PATCH 16/26] bisect--helper: `bisect_state` & `bisect_head` shell function in C

2019-02-24 Thread Pranit Bauva via GitGitGadget
From: Pranit Bauva Reimplement the `bisect_state()` shell function in C and also add a subcommand `--bisect-state` to `git-bisect--helper` to call it from git-bisect.sh . Using `--bisect-state` subcommand is a temporary measure to port shell function to C so as to use the existing test suite

[PATCH 18/26] bisect--helper: retire `--write-terms` subcommand

2019-02-24 Thread Pranit Bauva via GitGitGadget
From: Pranit Bauva The `--write-terms` subcommand is no longer used in the shell script and the function `write_terms()` is called from the C implementation of `set_terms()` and `bisect_start()`. Mentored-by: Lars Schneider Mentored-by: Christian Couder Mentored-by: Johannes Schindelin

[PATCH 24/26] bisect--helper: remove the dequote in bisect_start()

2019-02-24 Thread Pranit Bauva via GitGitGadget
From: Pranit Bauva Dequoting the arguments was introduced in 25b48b5c to port the function `bisect_next()` but after the `bisect_replay()` porting, the dequoting is carried out itself when it passes the arguments to `bisect_start()` in a simpler way thus dequoting again isn't required. So r

[PATCH 25/26] bisect--helper: `bisect_skip` shell function in C

2019-02-24 Thread Pranit Bauva via GitGitGadget
From: Pranit Bauva Reimplement the `bisect_skip()` shell function in C and also add `bisect-skip` subcommand to `git bisect--helper` to call it from git-bisect.sh Using `--bisect-skip` subcommand is a temporary measure to port shell function to C so as to use the existing test suite. As more

[PATCH 15/26] bisect--helper: `bisect_autostart` shell function in C

2019-02-24 Thread Pranit Bauva via GitGitGadget
From: Pranit Bauva Reimplement the `bisect_autostart()` shell function in C and add the C implementation from `bisect_next()` which was previously left uncovered. Also add a subcommand `--bisect-autostart` to `git bisect--helper` be called from `bisect_state()` from git-bisect.sh . Using

<    1   2   3   4   5   6   7   >