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

Re: [PATCH 1/3] t4150-am: refactor and clean common setup

From
Eric Sunshine <sunshine@sunshineco.com>
Date
May 28, 2015, 19:18 UTC
Message-ID
<CAPig+cTdVZKrGM+8eSopCkUYxK08WB3ZriFOcbd+8Zkf2Y27nA@mail.gmail.com>
In-Reply-To
<CAPig+cQ_PrY8=-iP-FJm_HZ+XKOVoc4NfDu6rtuBj8zfM5oG+w@mail.gmail.com>
On Thu, May 28, 2015 at 3:09 PM, Eric Sunshine <sunshine@sunshineco.com> wrote:
> On Tue, May 26, 2015 at 5:32 PM, Remi Lespinet
> <remi.lespinet@ensimag.grenoble-inp.fr> wrote:
>> +setup_temporary_branch () {
>> +       tmp_name=${2-"temporary"}

I forgot to mention the broken &&-chain here. Although the missing && doesn't actively hurt the function today, someone may someday insert code above the 'tmp_name=' line without noticing the lack of &&, and the test won't notice a failure in that newly added code. Thus, it's better to keep the &&-chain intact throughout.

Show 5 quoted lines
>> +       git reset --hard &&
>> +       rm -fr .git/rebase-apply &&
>> +       test_when_finished "git checkout $1 && git branch -D $tmp_name" &&
>> +       git checkout -b "$tmp_name" "$1"
>> +}
Previous: Eric Sunshine
Message 11 of 11 in “t4150-am: refactor and clean common setup”
  1. 1/3 t4150-am: refactor and clean common setupRemi Lespinet, May 26, 2015
  2. 2/3 t4150-am: refactor am -3 testsRemi Lespinet, May 26, 2015
  3. 3/3 git-am: add am.threeWay config variableRemi Lespinet, May 26, 2015
  4. Paul TanMay 28, 2015
  5. Junio C HamanoMay 28, 2015
  6. Matthieu MoyMay 28, 2015
  7. Paul TanMay 28, 2015
  8. Eric SunshineMay 28, 2015
  9. 1/3 t4150-am: refactor and clean common setupRemi LESPINET, May 29, 2015
  10. Eric SunshineMay 28, 2015
  11. Eric SunshineMay 28, 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.