[PATCH v3 3/6] bisect: simplify the addition of new bisect terms

2015-06-22 Thread Antoine Delaite
We create a file BISECT_TERMS in the repository .git to be read during a bisection. The fonctions to be changed if we add new terms are quite few. In git-bisect.sh : check_and_set_terms bisect_voc Signed-off-by: Antoine Delaite antoine.dela...@ensimag.grenoble-inp.fr Signed-off

[PATCH v3 2/6] bisect: replace hardcoded bad|good by variables

2015-06-22 Thread Antoine Delaite
To add new tags like old/new and have keywords less confusing, the first step is to avoid hardcoding the keywords. The default mode is still bad/good. Signed-off-by: Antoine Delaite antoine.dela...@ensimag.grenoble-inp.fr Signed-off-by: Louis Stuber stub...@ensimag.grenoble-inp.fr Signed-off

[PATCH v3 6/6] bisect: allows any terms set by user

2015-06-22 Thread Antoine Delaite
Introduction of the git bisect terms function. The user can set its own terms. It will work exactly like before. The terms must be set before the start. Signed-off-by: Antoine Delaite antoine.dela...@ensimag.grenoble-inp.fr Signed-off-by: Louis Stuber stub...@ensimag.grenoble-inp.fr

[PATCH v3 5/6] revision: fix rev-list --bisect in old/new mode

2015-06-22 Thread Antoine Delaite
and can be refs/bisect/new (old) now). Signed-off-by: Louis Stuber stub...@ensimag.grenoble-inp.fr Signed-off-by: Antoine Delaite antoine.dela...@ensimag.grenoble-inp.fr --- revision.c | 16 ++-- 1 files changed, 14 insertions(+), 2 deletions(-) diff --git a/revision.c b/revision.c

[PATCH v3 4/6] bisect: add the terms old/new

2015-06-22 Thread Antoine Delaite
://comments.gmane.org/gmane.comp.version-control.git/271343 ( v2 5/7-7/7 ) Signed-off-by: Antoine Delaite antoine.dela...@ensimag.grenoble-inp.fr Signed-off-by: Louis Stuber stub...@ensimag.grenoble-inp.fr Signed-off-by: Valentin Duperray valentin.duper...@ensimag.imag.fr Signed-off-by: Franck

[PATCH v3 1/6] bisect: correction of typo

2015-06-22 Thread Antoine Delaite
Signed-off-by: Antoine Delaite antoine.dela...@ensimag.grenoble-inp.fr --- bisect.c|2 +- t/t6030-bisect-porcelain.sh |2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/bisect.c b/bisect.c index 03d5cd9..5b8357d 100644 --- a/bisect.c +++ b/bisect.c

[PATCH v2 2/7] bisect: replace hardcoded bad|good by variables

2015-06-22 Thread Antoine Delaite
Matthieu Moy matthieu@grenoble-inp.fr wrote: Being an acceptable ref name is a constraint you have to check (Junio already mentionned check-ref-format). I think quoting variables makes sense too I don't get how 'git check-ref-format' works exactly. It says it needs at least one slash in

[PATCH v2 7/7] bisect: allows any terms set by user

2015-06-17 Thread Antoine Delaite
Matthieu Moy matthieu@grenoble-inp.fr writes: # terms_defined is 0 when the user did not define the terms explicitely # yet. This is the case when running 'git bisect start bad_rev good_rev' # before we see an explicit reference to a term. terms_defined=0 The thing is: 'git bisect

[PATCH v2 7/7] bisect: allows any terms set by user

2015-06-16 Thread Antoine Delaite
Matthieu Moy matthieu@grenoble-inp.fr writes: I would say for the current bisection, i.e. $ git bisect start $ git bisect terms foo bar # Scope starts here ... The first 'bar' commit is deadbeef. # Scope ends here $ git bisect terms foo bar You need to start by git bisect start Do

[PATCH v2 7/7] bisect: allows any terms set by user

2015-06-16 Thread Antoine Delaite
Matthieu Moy matthieu@grenoble-inp.fr writes: # terms_defined is 0 when the user did not define the terms explicitely # yet. This is the case when running 'git bisect start bad_rev good_rev' # before we see an explicit reference to a term. terms_defined=0 The thing is: 'git bisect reset git

[PATCH v2 7/7] bisect: allows any terms set by user

2015-06-14 Thread Antoine Delaite
Matthieu Moy matthieu@grenoble-inp.fr writes: +if test -s $GIT_DIR/TERMS_DEFINED +then +terms_defined=1 +get_terms +rm -rf $GIT_DIR/TERMS_DEFINED I don't understand why you need to delete this file. I did not review

[PATCH v2 7/7] bisect: allows any terms set by user

2015-06-14 Thread Antoine Delaite
This message's goal is to explained where am I on the bisect functions. -git bisect replay now work with any terms. -I took account of most of the last reviews (coding style, double sed ...) -'git bisect terms' without arguments now display the current terms -bisect_terms : if a bisection

[PATCH v2 7/7] bisect: allows any terms set by user

2015-06-14 Thread Antoine Delaite
Louis Stuber louis--alexandre.stu...@ensimag.grenoble-inp.fr writes: Matthieu Moy matthieu@grenoble-inp.fr writes: Modifying in PATCH 7 some code that you introduced in PATCH 3 is suspicious. Is there any reason you did not name the variable terms_defined in the first place? (i.e.

[PATCH 4/4] bisect: add the terms old/new

2015-06-10 Thread Antoine Delaite
Hi, thanks for the review, (sorry if you received this twice) Junio C Hamano gits...@pobox.com writes: Just throwing a suggestion. You could perhaps add a new verb to be used before starting to do anything, e.g. $ git bisect terms new old Yes it would be nice and should not be hard

[PATCH 3/4] bisect: simplify the add of new bisect terms

2015-06-10 Thread Antoine Delaite
Hi, Thanks for the review ! (sorry if you received this twice) Christian Couder christian.cou...@gmail.com wrote : + name_bad = bad; + name_good = good; + } else { + strbuf_getline(str, fp, '\n'); + name_bad = strbuf_detach(str, NULL); + strbuf_getline(str, fp, '\n'); +

[PATCH 2/4] bisect: replace hardcoded bad|good by variables

2015-06-10 Thread Antoine Delaite
Hi, Thanks for the review, (sorry if you received this twice) Matthieu Moy matthieu@grenoble-inp.fr wrote: +static const char *name_bad; +static const char *name_good; Same remark as PATCH 2. After the discussion you had with Christian I think we will keep name_bad/good for now.

[PATCH v2 3/7] bisect: simplify the addition of new bisect terms

2015-06-10 Thread Antoine Delaite
We create a file BISECT_TERMS in the repository .git to be read during a bisection. The fonctions to be changed if we add new terms are quite few. In git-bisect.sh : check_and_set_terms bisect_voc In bisect.c : handle_bad_merge_base Signed-off-by: Antoine Delaite

[PATCH v2 2/7] bisect: replace hardcoded bad|good by variables

2015-06-10 Thread Antoine Delaite
To add new tags like old/new and have keywords less confusing, the first step is to avoid hardcoding the keywords. The default mode is still bad/good. Signed-off-by: Antoine Delaite antoine.dela...@ensimag.grenoble-inp.fr Signed-off-by: Louis Stuber stub...@ensimag.grenoble-inp.fr Signed-off

[PATCH v2 4/7] bisect: add the terms old/new

2015-06-10 Thread Antoine Delaite
/182398 discussion around bisect yes/no or old/new. - http://thread.gmane.org/gmane.comp.version-control.git/199758 last discussion and reviews Signed-off-by: Antoine Delaite antoine.dela...@ensimag.grenoble-inp.fr Signed-off-by: Louis Stuber stub

[PATCH v2 5/7] bisect: change read_bisect_terms parameters

2015-06-10 Thread Antoine Delaite
From: Louis Stuber stub...@ensimag.grenoble-inp.fr The function reads BISECT_TERMS and stores it at the adress given in parameters (instead of global variables name_bad and name_good). This allows to use the function outside bisect.c. Signed-off-by: Antoine Delaite antoine.dela

[PATCH v2 7/7] bisect: allows any terms set by user

2015-06-10 Thread Antoine Delaite
Introduction of the git bisect terms function. The user can set its own terms. List of known commands not available : `git bisect replay` `git bisect terms term1 term2 then git bisect start bad_rev good_rev` Signed-off-by: Antoine Delaite antoine.dela...@ensimag.grenoble-inp.fr Signed-off

[PATCH v2 6/7] revision: fix rev-list --bisect in old/new mode

2015-06-10 Thread Antoine Delaite
and can be refs/bisect/new (old) now). Signed-off-by: Louis Stuber stub...@ensimag.grenoble-inp.fr Signed-off-by: Antoine Delaite antoine.dela...@ensimag.grenoble-inp.fr --- revision.c | 16 ++-- 1 files changed, 14 insertions(+), 2 deletions(-) diff --git a/revision.c b/revision.c

Re: [PATCH 3/4] bisect: simplify the add of new bisect terms

2015-06-09 Thread Antoine Delaite
Hi, Thanks for the review, Junio C Hamano gits...@pobox.com writes: /* + * The terms used for this bisect session are stocked in + * BISECT_TERMS: it can be bad/good or new/old. + * We read them and stock them to adapt the messages + * accordingly. Default is bad/good. + */

[PATCH 4/4] bisect: add the terms old/new

2015-06-08 Thread Antoine Delaite
/182398 discussion around bisect yes/no or old/new. - http://thread.gmane.org/gmane.comp.version-control.git/199758 last discussion and reviews Signed-off-by: Antoine Delaite antoine.dela...@ensimag.grenoble-inp.fr Signed-off-by: Louis Stuber stub

[PATCH 2/4] bisect: replace hardcoded bad|good by variables

2015-06-08 Thread Antoine Delaite
To add new tags like old/new and have keywords less confusing, the first step is to avoid hardcoding the keywords. The default mode is still bad/good. Signed-off-by: Antoine Delaite antoine.dela...@ensimag.grenoble-inp.fr Signed-off-by: Louis Stuber stub...@ensimag.grenoble-inp.fr Signed-off

[PATCH 1/4] bisect : correction of typo

2015-06-08 Thread Antoine Delaite
--- bisect.c| 2 +- t/t6030-bisect-porcelain.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/bisect.c b/bisect.c index 10f5e57..de92953 100644 --- a/bisect.c +++ b/bisect.c @@ -743,7 +743,7 @@ static void handle_bad_merge_base(void)

[PATCH 3/4] bisect: simplify the add of new bisect terms

2015-06-08 Thread Antoine Delaite
We create a file BISECT_TERMS in the repository .git to be read during a bisection. The fonctions to be changed if we add new terms are quite few. In git-bisect.sh : check_and_set_terms bisect_voc In bisect.c : handle_bad_merge_base Signed-off-by: Antoine Delaite

[WIP PATCH 1/3] git bisect old/new

2015-06-04 Thread Antoine Delaite
to find fix. - http://thread.gmane.org/gmane.comp.version-control.git/182398 discussion around bisect yes/no or old/new. - http://thread.gmane.org/gmane.comp.version-control.git/199758 last discussion and reviews Signed-off-by: Antoine Delaite

[PATCH 3/3] bisect: fix indentation

2015-06-04 Thread Antoine Delaite
From: Christian Couder chrisc...@tuxfamily.org Signed-off-by: Antoine Delaite antoine.dela...@ensimag.grenoble-inp.fr --- bisect.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/bisect.c b/bisect.c index 68417bb..87a5f6d 100644 --- a/bisect.c +++ b/bisect.c

[PATCH 2/3] bisect: use name_(bad|good) instead of bisect_(bad|good)

2015-06-04 Thread Antoine Delaite
From: Christian Couder chrisc...@tuxfamily.org Signed-off-by: Antoine Delaite antoine.dela...@ensimag.grenoble-inp.fr --- bisect.c | 35 +-- 1 file changed, 17 insertions(+), 18 deletions(-) diff --git a/bisect.c b/bisect.c index d6c19fd..68417bb 100644

GIT BISECT old/new (fix/unfixed)

2015-06-01 Thread Antoine Delaite
Hi, git bisect old/new is an alternative to good/bad, which can be confusing to use in some situations. A work on it was done a few years ago, it is partially working but there are a lot of issues. We based on Christian Couder's github: https://github.com/chriscool/git/commits/boldnew2