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

Re: [PATCH 2/2] t3600: amend test 46 to check for '.gitmodules' modification

From
Philippe Blain <levraiphilippeblain@gmail.com>
Date
Feb 18, 2021, 20:21 UTC
Message-ID
<288ab1ad-d5e8-ab30-e0c2-a3e5f21d05a6@gmail.com>
In-Reply-To
<20210218184931.83613-3-periperidip@gmail.com>
Le 2021-02-18 à 13:49, Shourya Shukla a écrit :
Show 6 quoted lines
> Following commit e5a439dc71 (rm: changes in the '.gitmodules' are
> staged after using '--cached', 2021-02-18), amend test 46 of the script
> to ensure that the test also checks for '.gitmodules' modification after
> a 'git rm --cached <submodule>' i.e., the entry of the submodule in
> question is removed from the file.
> 

You can't reference your previous commit by hash, since it has not yet made its way to Git's master branch. Usually what is done in that case is writing "In the previous commit, we fixed *** so that *** now does ***. Change *** accordingly" or something like this.

However, in the present case the changes to the test should be squashed into the changes to the code, if not the tests are broken when they are run on patch 1/2. In this project *all* commits of a topic branch should pass the test suite before the topic is merged, not just the tip commit.

Regarding the changes themselves, they should be tweaked along with patch 1/2 to test the correct behaviour (not modifying the working tree copy of '.gitmodules'.

Previous: Shourya ShuklaNext: Shourya Shukla
Message 10 of 20 in “rm: changes in the '.gitmodules' are staged after using '--cached'”
  1. Shourya ShuklaFeb 18, 2021
  2. 1/2 rm: changes in the '.gitmodules' are staged after using '--cached'Shourya Shukla, Feb 18, 2021
  3. Philippe BlainFeb 18, 2021
  4. Philippe BlainFeb 18, 2021
  5. Shourya ShuklaFeb 19, 2021
  6. Junio C HamanoFeb 18, 2021
  7. Shourya ShuklaFeb 19, 2021
  8. Junio C HamanoFeb 20, 2021
  9. 2/2 t3600: amend test 46 to check for '.gitmodules' modificationShourya Shukla, Feb 18, 2021
  10. Philippe BlainFeb 18, 2021
  11. 0/1 rm: stage submodule removal from '.gitmodules'Shourya Shukla, Feb 22, 2021
  12. 1/1 rm: stage submodule removal from '.gitmodules' when using '--cached'Shourya Shukla, Feb 22, 2021
  13. Junio C HamanoFeb 22, 2021
  14. Shourya ShuklaMar 5, 2021
  15. Junio C HamanoMar 5, 2021
  16. Junio C HamanoFeb 22, 2021
  17. Shourya ShuklaMar 7, 2021
  18. Junio C HamanoMar 7, 2021
  19. Shourya ShuklaMar 9, 2021
  20. Junio C HamanoMar 9, 2021

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.