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

Re: [PATCH v3 0/2] Make git-svn work with gitdir links

From
Junio C Hamano <gitster@pobox.com>
Date
Jan 21, 2013, 22:08 UTC
Message-ID
<7vfw1ufauc.fsf@alter.siamese.dyndns.org>
In-Reply-To
<2931F4CC43E4406DBB878482C2F0E4F4@PhilipOakley>
"Philip Oakley" <philipoakley@iee.org> writes:
Show 26 quoted lines
> From: "Joachim Schmitz" <jojo@schmitz-digital.de>
> Sent: Monday, January 21, 2013 2:19 PM
>> Junio C Hamano wrote:
>>> Barry Wardell <barry.wardell@gmail.com> writes:
> [...]
>>> Thanks for your persistence ;-) As this is a pretty old topic, I'll
>>> give two URLs for people who are interested to view the previous
>>> threads:
>>>
>>>    http://thread.gmane.org/gmane.comp.version-control.git/192133
>>>    http://thread.gmane.org/gmane.comp.version-control.git/192127
>>>
>>> You would want to mark it as test_expect_failure in the first patch
>>> and then flip it to text_expect_success in the second patch where
>>> you fix the breakage?  Otherwise, after applying the first patch,
>>> the testsuite will break needlessly.
>>
>> I'd just apply them the other way round, 1st fix the problem, 2nd
>> add a test for it
>
> Isn't it a case of, 1st demonstrate the problem with a test, and then
> 2nd  fix the problem.
>
> Those less principled could could simply "fix" a non-existent problem
> merely to get themselves into the change log, or worse, even if one
> may fix-test under the hood.

For a small/trivial fix, fixing the code and protecting the fix from future breakages by adding tests that expect success in a single commit is the most sensible thing to do. People who are interested, and people who are auditing, can locally revert only the code change to see the new tests fail fairly easily in such a case.

For a more involved series, it is easier to demonstrate a breakage by adding tests that expect failure in the first commit, and then in subsequent commits, to fix a class of bugs in the code and flipping expect_failure into expect_success for the tests that the updated code in the commit fixes.

For this particular topic, squashing the two patches into a single commit may probably be the more appropriate between the two.

Thanks.
Previous: Philip OakleyNext: Eric Wong
Message 9 of 15 in “git-svn: Simplify calculation of GIT_DIR”
  1. git-svn: Simplify calculation of GIT_DIRBarry Wardell, Mar 3, 2012
  2. Eric WongMar 8, 2012
  3. 0/2 Make git-svn work with gitdir linksBarry Wardell, Jan 21, 2013
  4. 1/2 git-svn: Add test for git-svn repositories with a gitdir linkBarry Wardell, Jan 21, 2013
  5. 2/2 git-svn: Simplify calculation of GIT_DIRBarry Wardell, Jan 21, 2013
  6. Junio C HamanoJan 21, 2013
  7. Joachim SchmitzJan 21, 2013
  8. Philip OakleyJan 21, 2013
  9. Junio C HamanoJan 21, 2013
  10. Eric WongJan 23, 2013
  11. Junio C HamanoJan 23, 2013
  12. Barry WardellJan 23, 2013
  13. Junio C HamanoJan 24, 2013
  14. Eric WongJan 24, 2013
  15. Eric WongJan 24, 2013

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.