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

Re: [PATCH v15 01/16] test: add test cases for relative_path

From
Jiang Xin <worldhello.net@gmail.com>
Date
Jun 27, 2013, 01:00 UTC
Message-ID
<CANYiYbESfNyNpiV=Ho_fxfQ6CxR5j3nGfKw_va8jq_5T72uPfA@mail.gmail.com>
In-Reply-To
<7vehbowyv4.fsf@alter.siamese.dyndns.org>
2013/6/27 Junio C Hamano <gitster@pobox.com>
Show 11 quoted lines
>
> Jiang Xin <worldhello.net@gmail.com> writes:
>
> > Add subcommand "relative_path" in test-path-utils, and add test cases
> > in t0060.
> >
> > Johannes tested this commit on Windows, and found that some relative_path
>
> "this commit", or "an earlier version of this patch"?  I am guessing
> it is the latter (if so, I can easily amend locally without a need
> for rerolling).

Sorry, my English. I should say: Johannes helped to test these test cases on Windows, and found that ...

Show 21 quoted lines
>
> > tests should be skipped on Windows. This is because the bash on Windows
> > rewrites arguments of regular Windows programs, such as git and the
> > test helpers, if the arguments look like absolute POSIX paths. As a
> > consequence, the actual tests performed are not what the tests scripts
> > expect.
> >
> > The tests that need *not* be skipped are those where the two paths passed
> > to 'test-path-utils relative_path' have the same prefix and the result is
> > expected to be a relative path. This is because the rewriting changes
> > "/a/b" to "D:/Src/MSysGit/a/b", and when both inputs are extended the same
> > way, this just cancels out in the relative path computation.
> >
> > Signed-off-by: Jiang Xin <worldhello.net@gmail.com>
> > Signed-off-by: Johannes Sixt <j6t@kdbg.org>
> > Signed-off-by: Junio C Hamano <gitster@pobox.com>
>
> I somehow lost track, but does the above list of sign-offs reflect
> the origins of the changes contained in this patch, or is the second
> one meant to be helped-by or something (if so, I can easily amend
> locally without a need for rerolling)?

Johannes offered a nice patch based on the last one of this patch series. I move his patch right after the first patch (patch 01: test: add test cases for relative_path). But I think as a cooking topic, it should not has a commit to fix another. So I squash Johannes' commit to the previous commit, and add his signed-off-by.

-- Jiang Xin

Previous: Junio C HamanoNext: Jiang Xin
Message 4 of 25 in “Interactive git clean”
  1. 00/16 Interactive git cleanJiang Xin, Jun 25, 2013
  2. 01/16 test: add test cases for relative_pathJiang Xin, Jun 25, 2013
  3. Junio C HamanoJun 26, 2013
  4. Jiang XinJun 27, 2013
  5. 02/16 path.c: refactor relative_path(), not only strip prefixJiang Xin, Jun 25, 2013
  6. Junio C HamanoJun 26, 2013
  7. Jiang XinJun 27, 2013
  8. 03/16 quote.c: substitute path_relative with relative_pathJiang Xin, Jun 25, 2013
  9. Junio C HamanoJun 26, 2013
  10. 04/16 Refactor quote_path_relative, remove unused paramsJiang Xin, Jun 25, 2013
  11. Junio C HamanoJun 26, 2013
  12. Jiang XinJun 27, 2013
  13. 05/16 Refactor write_name_quoted_relative, remove unused paramsJiang Xin, Jun 25, 2013
  14. 06/16 git-clean: refactor git-clean into two phasesJiang Xin, Jun 25, 2013
  15. 07/16 git-clean: add support for -i/--interactiveJiang Xin, Jun 25, 2013
  16. 08/16 git-clean: show items of del_list in columnsJiang Xin, Jun 25, 2013
  17. 09/16 git-clean: add colors to interactive git-cleanJiang Xin, Jun 25, 2013
  18. 10/16 git-clean: use a git-add-interactive compatible UIJiang Xin, Jun 25, 2013
  19. 11/16 git-clean: add filter by pattern interactive actionJiang Xin, Jun 25, 2013
  20. 12/16 git-clean: add select by numbers interactive actionJiang Xin, Jun 25, 2013
  21. 13/16 git-clean: add ask each interactive actionJiang Xin, Jun 25, 2013
  22. 14/16 git-clean: add documentation for interactive git-cleanJiang Xin, Jun 25, 2013
  23. 15/16 test: add t7301 for git-clean--interactiveJiang Xin, Jun 25, 2013
  24. 16/16 test: run testcases with POSIX absolute paths on WindowsJiang Xin, Jun 25, 2013
  25. Junio C HamanoJun 26, 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.