git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH 1/2] git-bisect.sh : create a file if the bisection is in old/new mode, named "BISECT_OLDNEWMODE", so it can easily be seen outside the program without having to read BISECT_TERMS. This will have to be changed in further versions if new terms are introduced.

From
Matthieu Moy <matthieu.moy@grenoble-inp.fr>
Date
Jun 8, 2015, 11:48 UTC
Message-ID
<vpq616yctf3.fsf@anie.imag.fr>
In-Reply-To
<CAPig+cQnrKEx_=WHw5gjA9SVtDObXWOJ3augZbhvNUuD8o19aA@mail.gmail.com>
Eric Sunshine <sunshine@sunshineco.com> writes:
> On Fri, Jun 5, 2015 at 12:34 PM, Louis Stuber
> <stuberl@ensimag.grenoble-inp.fr> wrote:
>> git-bisect.sh :
No space before : in english.
Show 7 quoted lines
>> create a file if the bisection is in old/new mode, named
>> "BISECT_OLDNEWMODE", so it can easily be seen outside the program
>> without having to read BISECT_TERMS. This will have to be changed in
>> further versions if new terms are introduced.
>
> Documentation/SubmittingPatches contains instructions for how to write
> a good commit message.
For french-speaking people, and Ensimag students in particular, I'd add
  http://ensiwiki.ensimag.fr/index.php/%C3%89crire_de_bons_messages_de_commit_avec_Git
> Also, wrap the commit message to 70-72 columns.

As much as possible, the summary line should even be shorter (so that "git log --oneline" fits on a 80-chars terminal).

> This commit message doesn't do a very good job of explaining the
> problem this change is trying to solve or justifying why this solution
> is preferable.

Actually, the commit message explains one reason why this is not a good solution: the idea of having $GIT_DIR/BISECT_TERMS was to keep the solution generic.

Had the initial codebase been better factored, this patch series would have been really trivial, but we hardcoded "good" and "bad" in many places, and now changing it is hard. Introducing BISECT_TERMS is a step forward, it avoids hardcoding the terms here and there in the code. To me, introducing BISECT_OLDNEWMODE is a step backward, it's one more place where we hardcode the terms.

> Justification is particularly important considering the
> ominous-sounding final sentence of the commit message (which itself
> seems to imply that this is not a very good change).
Ah, indeed, we're saying the same thing.
>> -                               echo "old" >>"$GIT_DIR/BISECT_TERMS"
>> +                               echo "old" >>"$GIT_DIR/BISECT_TERMS" &&
>> +                               echo "" > "$GIT_DIR/BISECT_OLDNEWMODE"
No space after > (noted by Eric elsewhere)
-- 
Matthieu Moy
http://www-verimag.imag.fr/~moy/
Previous: Eric SunshineNext: Christian Couder
Message 5 of 8 in “git-bisect.sh : create a file if the bisection is in old/new mode, named "BISECT_OLDNEWMODE", so it can easily be seen outside the program without having to read BISECT_TERMS. This will have to be changed in further versions if new terms are introduced.”
  1. 1/2 git-bisect.sh : create a file if the bisection is in old/new mode, named "BISECT_OLDNEWMODE", so it can easily be seen outside the program without having to read BISECT_TERMS. This will have to be changed in further versions if new terms are introduced.Louis Stuber, Jun 5, 2015
  2. 2/2 Fix git rev-list --bisect and git bisect visualize when the bisection is done in old/new mode.Louis Stuber, Jun 5, 2015
  3. Eric SunshineJun 5, 2015
  4. Eric SunshineJun 5, 2015
  5. Matthieu MoyJun 8, 2015
  6. Christian CouderJun 5, 2015
  7. Louis-Alexandre StuberJun 7, 2015
  8. Matthieu MoyJun 8, 2015

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.