[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

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

2015-06-22 Thread Matthieu Moy
Antoine Delaite antoine.dela...@ensimag.grenoble-inp.fr writes: 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

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

2015-06-11 Thread Matthieu Moy
Antoine Delaite antoine.dela...@ensimag.grenoble-inp.fr writes: - if (!strcmp(refname, bad)) { + char good_prefix[256]; + strcpy(good_prefix, name_good); + strcat(good_prefix, -); You are silently adding a restriction here: name_good must be small enough to fit in a 256-bytes

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