[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

[PATCH 13/26] bisect--helper: retire `--bisect-clean-state` subcommand

2019-02-24 Thread Pranit Bauva via GitGitGadget
From: Pranit Bauva The `bisect-clean-state` subcommand is no longer used in the shell script while the C code uses `bisect_clean_state()` thus remove the subcommand. Mentored-by: Lars Schneider Mentored-by: Christian Couder Signed-off-by: Pranit Bauva Signed-off-by: Tanushree Tumane

[PATCH 20/26] bisect--helper: `bisect_replay` shell function in C

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

[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 26/26] bisect--helper: retire `--check-and-set-terms` subcommand

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

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

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")) >> +

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

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

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

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

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

[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

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

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

Re: feature request: user email config per domain

2017-02-22 Thread Pranit Bauva
inside the repo will get the first preference and then the global ~/.gitconfig. This will work for you assuming that you have different repos for your company and for your open source work. Will this solve your problem? Regards, Pranit Bauva

Re: [PATCH 3/3] show-branch: use skip_prefix to drop magic numbers

2017-02-14 Thread Pranit Bauva
> } > } > Did you purposely miss the one in line number 278 of builtin/show-branch.c because I think you only touched up the parts which were related to "refs/" but didn't explicitly mention it in the commit message? if (starts_with(pretty_str, "[PATC

Re: [PATCH] fixup! bisect--helper: `bisect_next_check` & bisect_voc shell function in C

2017-02-13 Thread Pranit Bauva
ob) > - free(good_glob); > - if (!bad_syn) > - free(bad_syn); > - if (!good_syn) > - free(good_syn); > + free(bad_ref); > + free(good_glob); > + free(bad_syn); > + free(good_syn); > return retval; > } This helps a lot ;) Thanks! Regards, Pranit Bauva

Re: [PATCH] fixup! bisect--helper: `bisect_next_check` & bisect_voc shell function in C

2017-02-10 Thread Pranit Bauva
f you send another iteration of the patch series), please squash > this fix in. > > Signed-off-by: Johannes Schindelin Thanks for making this fix! :) I will squash it in. Regards, Pranit Bauva

Re: GSoC 2017: application open, deadline = February 9, 2017

2017-02-09 Thread Pranit Bauva
be able to help with actual project ideas but I will try. I will do it within a week or so. Regards, Pranit Bauva

Re: git-scm.com status report

2017-02-05 Thread Pranit Bauva
hink it would be more appropriate to use git-scm.org domain. We can forward all .com requests to .org and try to move all reference we know about, to .org. What do you all think? Regards, Pranit Bauva

Re: [PATCH/RFC] WIP: log: allow "-" as a short-hand for "previous branch"

2017-02-05 Thread Pranit Bauva
re not recognized */ > -- It is highly recommended to follow the pre existing style of code and commits. In the micro project list, I think it is mentioned that this similar thing is implemented in git-merge so you should try and dig the commit history of that file to find the similar change. If you do this, then you will find out that there is a very short and sweet way to do it. I won't directly point out the commit. strbuf API should be used when you need to modify the contents of the string. I think you have a little confusion. If you declare the string as, const char *str = "foo"; then, you can also do, str = "bar"; But you can't do, str[1] = 'z'; I hope you get what I am saying, if not, search for it. Regards, Pranit Bauva

Re: feature request: add -q to "git branch"

2017-02-04 Thread Pranit Bauva
Hey Kevin, Sorry for the previous message. On Sun, Feb 5, 2017 at 2:47 AM, Pranit Bauva wrote: > Hey Kevin, > > On Fri, Feb 3, 2017 at 11:59 PM, Kevin Layer wrote: >> It should be possible to quietly create a branch. I think `git branch` is already quiet. Are you seeing

Re: feature request: add -q to "git branch"

2017-02-04 Thread Pranit Bauva
Hey Kevin, On Fri, Feb 3, 2017 at 11:59 PM, Kevin Layer wrote: > It should be possible to quietly create a branch. > > Thanks. > > Kevin

Re: [PATCH v3] parse-remote: remove reference to unused op_prep

2017-02-04 Thread Pranit Bauva
t;i18n: git-parse-remote.sh: mark strings for translation", > 2016-04-19), the argument is no longer used. Remove it. > > Signed-off-by: Siddharth Kannan This looks good to me! Thanks :) Regards, Pranit Bauva

Re: [PATCH v2] parse-remote: Remove reference to unused op_prep

2017-02-04 Thread Pranit Bauva
Hey SIddharth, > Subject: parse-remote: Remove reference to unused op_prep ^ Minor nit: after the colon, we generally don't use the word starting with an uppercase letter which I think can be figured out when you run `git log -p git-parse-remote.sh` On Sa

Re: [PATCH] git-parse-remote.sh: Remove op_prep argument

2017-02-03 Thread Pranit Bauva
Hey Siddharth, On Fri, Feb 3, 2017 at 11:58 PM, Siddharth Kannan wrote: > - Remove the third argument of error_on_missing_default_upstream that is no > longer required > - FIXME to remove this argument was added in commit 045fac5845 This is not exactly correct. Well, this is the commit you get

SoC Microprojects 2017

2017-01-26 Thread Pranit Bauva
(SMTP blocked by institute proxy) but I have included it as a link[1]. And here is the PR[2]. [1]: https://patch-diff.githubusercontent.com/raw/git/git.github.io/pull/219.patch [2]: https://github.com/git/git.github.io/pull/219 Regards, Pranit Bauva

Re: [PATCH] tag: add tag.createReflog option

2017-01-24 Thread Pranit Bauva
Hey Cornelius, On Wed, Jan 25, 2017 at 5:49 AM, wrote: > From: Cornelius Weig > > Git does not create a history for tags, in contrast to common > expectation to simply version everything. This can be changed by using > the `--create-reflog` flag when creating the tag. However, a config > option

Re: [PATCH] blame: add option to print tips (--tips)

2017-01-24 Thread Pranit Bauva
Hey Junio, On Tue, Jan 24, 2017 at 12:06 AM, Junio C Hamano wrote: > Pranit Bauva writes: > >> We can probably make it useful with some extended efforts. I use >> git-blame and I sometimes find that I don't need things like the name >> of the author, time, timezo

Re: [PATCH] blame: add option to print tips (--tips)

2017-01-23 Thread Pranit Bauva
the effort. I personally find this `format` feature useful. Regards, Pranit Bauva

[PATCH v4 1/2] don't use test_must_fail with grep

2017-01-08 Thread Pranit Bauva
test_must_fail should only be used for testing git commands. To test the failure of other commands use `!`. Reported-by: Stefan Beller Signed-off-by: Pranit Bauva --- t/t3510-cherry-pick-sequence.sh | 6 +++--- t/t5504-fetch-receive-strict.sh | 2 +- t/t5516-fetch-push.sh| 2

[PATCH v4 2/2] t9813: avoid using pipes

2017-01-08 Thread Pranit Bauva
The exit code of the upstream in a pipe is ignored thus we should avoid using it. By writing out the output of the git command to a file, we can test the exit codes of both the commands. Signed-off-by: Pranit Bauva --- t/t9813-git-p4-preserve-users.sh | 8 1 file changed, 4 insertions

Re: [PATCH] don't use test_must_fail with grep

2017-01-08 Thread Pranit Bauva
v3 while > queuing, or I may forget about it after looking at other topics ;-) > in which case you may want to send v4 with the fix? Yeah sure! No problem! :) Regards, Pranit Bauva

Re: [PATCH v3 2/2] t9813: avoid using pipes

2017-01-04 Thread Pranit Bauva
Hey Luke, On Wed, Jan 4, 2017 at 2:41 PM, Luke Diamand wrote: > On 3 January 2017 at 19:57, Pranit Bauva wrote: >> The exit code of the upstream in a pipe is ignored thus we should avoid >> using it. By writing out the output of the git command to a file, we can >> test t

[PATCH v3 1/2] don't use test_must_fail with grep

2017-01-03 Thread Pranit Bauva
test_must_fail should only be used for testing git commands. To test the failure of other commands use `!`. Reported-by: Stefan Beller Signed-off-by: Pranit Bauva --- t/t3510-cherry-pick-sequence.sh | 6 +++--- t/t5504-fetch-receive-strict.sh | 2 +- t/t5516-fetch-push.sh| 2

[PATCH v3 2/2] t9813: avoid using pipes

2017-01-03 Thread Pranit Bauva
The exit code of the upstream in a pipe is ignored thus we should avoid using it. By writing out the output of the git command to a file, we can test the exit codes of both the commands. Signed-off-by: Pranit Bauva --- t/t9813-git-p4-preserve-users.sh | 8 1 file changed, 4 insertions

Re: [PATCH v2 2/2] t9813: avoid using pipes

2017-01-03 Thread Pranit Bauva
Hey Stefan, On Tue, Jan 3, 2017 at 11:28 PM, Stefan Beller wrote: > On Mon, Jan 2, 2017 at 10:45 AM, Pranit Bauva wrote: >> The exit code of the upstream in a pipe is ignored thus we should avoid >> using it. > > for commands under test, i.e. git things. Other parts

Re: [PATCH] diff: add interhunk context config option

2017-01-02 Thread Pranit Bauva
context = diff_interhunk_context_default; > options->ws_error_highlight = ws_error_highlight_default; > DIFF_OPT_SET(options, RENAME_EMPTY); On a first look, it seems that we can overwrite the default config values by using a different command line argument which is good. Also, tests are missing. It seems that t/t4032 might be a good place to add those tests. Rest all is quite good! :) Regards, Pranit Bauva

[PATCH v2 2/2] t9813: avoid using pipes

2017-01-02 Thread Pranit Bauva
The exit code of the upstream in a pipe is ignored thus we should avoid using it. By writing out the output of the git command to a file, we can test the exit codes of both the commands. Signed-off-by: Pranit Bauva --- t/t9813-git-p4-preserve-users.sh | 8 1 file changed, 4 insertions

[PATCH v2 1/2] don't use test_must_fail with grep

2017-01-02 Thread Pranit Bauva
test_must_fail should only be used for testing git commands. To test the failure of other commands use `!`. Reported-by: Stefan Beller Signed-off-by: Pranit Bauva --- t/t3510-cherry-pick-sequence.sh | 6 +++--- t/t5504-fetch-receive-strict.sh | 2 +- t/t5516-fetch-push.sh| 2

Re: [PATCH] don't use test_must_fail with grep

2017-01-02 Thread Pranit Bauva
> git p4 commit >actual 2>&1 && > ! grep "git author.*does not match" actual && > > -- Hannes This seems better! Since I am at it, I can remove the traces of pipes in an another patch. Regards, Pranit Bauva

Re: [PATCH v15 15/27] bisect--helper: `bisect_next` and `bisect_auto_next` shell function in C

2017-01-01 Thread Pranit Bauva
erify the next bisection state then find the >>>> next bisection state"), BISECT_AUTO_NEXT), >>> >>> The next bisection *state* is found? >> >> checkout is more appropriate. I don't remember why I used "find". > > "checkout the next bisection commit" maybe? Seems better. Thanks! Regards, Pranit Bauva

[PATCH] don't use test_must_fail with grep

2016-12-31 Thread Pranit Bauva
test_must_fail should only be used for testing git commands. To test the failure of other commands use `!`. Reported-by: Stefan Beller Signed-off-by: Pranit Bauva --- t/t3510-cherry-pick-sequence.sh | 6 +++--- t/t5504-fetch-receive-strict.sh | 2 +- t/t5516-fetch-push.sh| 2

Re: [PATCH v15 15/27] bisect--helper: `bisect_next` and `bisect_auto_next` shell function in C

2016-12-31 Thread Pranit Bauva
Hey Stephan, On Tue, Nov 22, 2016 at 3:05 AM, Stephan Beyer wrote: > Hi Pranit, > > in this mail I review the "second part" of your patch: the transition of > bisect_next and bisect_auto_next to C. > > On 10/14/2016 04:14 PM, Pranit Bauva wrote: >> diff --git a/

Re: [PATCH v15 15/27] bisect--helper: `bisect_next` and `bisect_auto_next` shell function in C

2016-12-31 Thread Pranit Bauva
d confusion about how to split the commits, but then I then decided to dump it all together so that it compiles (I was finding it difficult to split into meaningful parts which also compiled). > However, I was reviewing this superficially, to be honest. This mail > skips the next and autonext

Re: [PATCH v2] am: add am.signoff add config variable

2016-12-29 Thread Pranit Bauva
e idiomatic way? > > I just found out that "test_must_fail grep ..." is a common > idiom, so what about: Is there any particular reason to use "grep" instead of "test_cmp"? To check for non-zero error code, you can always use "! test_cmp". Regards, Pranit Bauva

Re: [PATCH v15 08/27] bisect--helper: `is_expected_rev` & `check_expected_revs` shell function in C

2016-12-16 Thread Pranit Bauva
Hey Stephan, On Thu, Nov 17, 2016 at 5:17 AM, Stephan Beyer wrote: > Hi, > > On 10/14/2016 04:14 PM, Pranit Bauva wrote: >> diff --git a/builtin/bisect--helper.c b/builtin/bisect--helper.c >> index d84ba86..c542e8b 100644 >> --- a/builtin/bisect--helper.c >&g

Re: [PATCH v15 08/27] bisect--helper: `is_expected_rev` & `check_expected_revs` shell function in C

2016-12-16 Thread Pranit Bauva
Hey Stephan, On Wed, Dec 7, 2016 at 1:03 AM, Pranit Bauva wrote: >> I don't understand why the return value is int and not void. To avoid a >> "return 0;" line when calling this function? > > Initially I thought I would be using the return value but now I >

Re: [PATCH v15 19/27] bisect--helper: `bisect_state` & `bisect_head` shell function in C

2016-12-07 Thread Pranit Bauva
Hey Stephan, On Wed, Dec 7, 2016 at 5:24 AM, Stephan Beyer wrote: > Hi Pranit, > > On 12/06/2016 11:40 PM, Pranit Bauva wrote: >> On Tue, Nov 22, 2016 at 5:42 AM, Stephan Beyer wrote: >>> On 10/14/2016 04:14 PM, Pranit Bauva wrote: >>>> +static int bisect_sta

Re: [PATCH v15 12/27] bisect--helper: `get_terms` & `bisect_terms` shell function in C

2016-12-07 Thread Pranit Bauva
Hey Stephan, On Wed, Dec 7, 2016 at 4:35 AM, Stephan Beyer wrote: > Hey Pranit, > > On 12/06/2016 10:14 PM, Pranit Bauva wrote: >>>> + >>>> + if (argc == 0) { >>>> + printf(_("Your current terms are %s for the old state\nand &q

Re: [PATCH v15 23/27] bisect--helper: `bisect_replay` shell function in C

2016-12-06 Thread Pranit Bauva
e to leak memory... but Git is rather written > as a scripting tool than a genuine library, so perhaps many people here > do not care about it as long as it works... Thanks for taking out your time to review my series extremely carefully. I will try to post a v16 next week probably. > On 10/

Re: [PATCH v15 10/27] bisect--helper: `check_and_set_terms` shell function in C

2016-12-06 Thread Pranit Bauva
Hey Stephan, On Fri, Nov 18, 2016 at 1:55 AM, Stephan Beyer wrote: > Hi Pranit, > > On 10/14/2016 04:14 PM, Pranit Bauva wrote: >> diff --git a/builtin/bisect--helper.c b/builtin/bisect--helper.c >> index 3f19b68..c6c11e3 100644 >> --- a/builtin/bisect--helper.c >&g

Re: [PATCH v15 22/27] bisect--helper: `bisect_log` shell function in C

2016-12-06 Thread Pranit Bauva
Hey Stephan, On Fri, Nov 18, 2016 at 3:17 AM, Stephan Beyer wrote: > Hi, > > On 10/14/2016 04:14 PM, Pranit Bauva wrote: >> diff --git a/builtin/bisect--helper.c b/builtin/bisect--helper.c >> index 493034c..c18ca07 100644 >> --- a/builtin/bisect--helper.c >&g

Re: [PATCH v15 19/27] bisect--helper: `bisect_state` & `bisect_head` shell function in C

2016-12-06 Thread Pranit Bauva
Hey Stephan, On Tue, Nov 22, 2016 at 5:42 AM, Stephan Beyer wrote: > Hi, > > On 10/14/2016 04:14 PM, Pranit Bauva wrote: >> Reimplement the `bisect_state` shell function in C and also add a >> subcommand `--bisect-state` to `git-bisect--helper` to call it from >>

Re: [PATCH v15 09/27] bisect--helper: `bisect_write` shell function in C

2016-12-06 Thread Pranit Bauva
Hey Stephan, On Thu, Nov 17, 2016 at 3:10 PM, Stephan Beyer wrote: > Hi, > > I've only got some minors to mention here ;) > > On 10/14/2016 04:14 PM, Pranit Bauva wrote: >> diff --git a/builtin/bisect--helper.c b/builtin/bisect--helper.c >> index c542e8b..3f19b6

Re: [PATCH v15 12/27] bisect--helper: `get_terms` & `bisect_terms` shell function in C

2016-12-06 Thread Pranit Bauva
Hey Stephan, On Fri, Nov 18, 2016 at 3:02 AM, Stephan Beyer wrote: > Hi, > > On 10/14/2016 04:14 PM, Pranit Bauva wrote: >> diff --git a/builtin/bisect--helper.c b/builtin/bisect--helper.c >> index 317d671..6a5878c 100644 >> --- a/builtin/bisect--helper.c >&g

Re: [PATCH v15 18/27] bisect--helper: `bisect_autostart` shell function in C

2016-12-06 Thread Pranit Bauva
Hey Stephan, On Mon, Nov 21, 2016 at 1:45 AM, Stephan Beyer wrote: > Hi, > > On 10/14/2016 04:14 PM, Pranit Bauva wrote: >> diff --git a/builtin/bisect--helper.c b/builtin/bisect--helper.c >> index 502bf18..1767916 100644 >> --- a/builtin/bisect--helper.c >&g

  1   2   3   4   5   6   7   >