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

Re: [BUG] assertion failure in builtin-mv.c with "git mv -k"

From
Michael J Gruber <git@drmicha.warpmail.net>
Date
Jan 15, 2009, 10:53 UTC
Message-ID
<496F15B4.2040104@drmicha.warpmail.net>
In-Reply-To
<7vbpu91zjf.fsf@gitster.siamese.dyndns.org>

Junio C Hamano venit, vidit, dixit 14.01.2009 20:02: ...

Show 16 quoted lines
> If "git mv" did not have adequate test coverage, then please add a test
> script with both expect_success (for cases that should have been there
> when somebody worked on "git mv" originally), and expect_failure to expose
> the bug you found in your first patch.  Again, the second patch would
> update the code and flip expect_failure to expect_success.
> 
> I see there is t7001-mv and even though it claims to concentrate on its
> operation from subdirectory, it has tests for more basic modes of the
> operation.
> 
> So my recommendation would be to have a single patch that:
> 
>  (1) retitles t7001;
>  (2) adds your new -k tests to it; and
>  (3) adds the 1-liner fix.
> 

Sorry to bother you again, even after your detailed reply, but I'm a bit confused in multiple ways (I guess that makes for multiple bits...). First, you replied to my post, not my patch v2, but (time-wise) after my patch v2, so I'm not sure whether your reply applies to v2 as well or that one is OK.

Second, I took the title of t7001 to mean "mv into subdir" or "mv in and out subdir" in order to distiguish it from "mv oldname newname", albeit in English that leaves room from improvement.

Third, various parts of that test are in vastly different styles, and I haven't found any test writing directions other than "follow what is there", which leaves several alternatives. (Some use the test-lib repo, some create their own underneath, some make assumptions about the contents of "$TEST_DIRECTORY"/../.)

Fourth, t7001-mv is missing any test for "mv -k", and 2 of my 3 additional tests cover cases which work (pass) without the fix, which is why I kept it separate, being unrelated. Following all your arguments lead to the conclusion I should squash 2+3 (fix + mark expect_pass) - until I read your conclusion, which says squash all.

I'm happy to follow any variant ("1+2+3", "1 2+3", "1 2 3", in increasing order of preference) so there's no need to discuss or explain this further, just tell me "do x" ;)

Cheers, Michael

Previous: Junio C HamanoNext: Junio C Hamano
Message 7 of 14 in “[BUG] assertion failure in builtin-mv.c with "git mv -k"”
  1. Matthieu MoyJan 14, 2009
  2. Michael J GruberJan 14, 2009
  3. Johannes SchindelinJan 14, 2009
  4. Michael J GruberJan 14, 2009
  5. Jeff KingJan 14, 2009
  6. Junio C HamanoJan 14, 2009
  7. Michael J GruberJan 15, 2009
  8. Junio C HamanoJan 15, 2009
  9. Matthieu MoyJan 16, 2009
  10. 0/3 Add test cases for "git mv -k" and fix a known breakage.Michael J Gruber, Jan 14, 2009
  11. 1/3 add test cases for "git mv -k"Michael J Gruber, Jan 14, 2009
  12. 2/3 fix handling of multiple untracked files for git mv -kMichael J Gruber, Jan 14, 2009
  13. 3/3 mark fixed breakage as expect pass for "git mv -k" multiple filesMichael J Gruber, Jan 14, 2009
  14. fix handling of multiple untracked files for git mv -kMichael J Gruber, Jan 14, 2009

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.