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

Re: Git Test Coverage Report (October 11)

From
Torsten Bögershausen <tboegi@web.de>
Date
Oct 23, 2019, 17:00 UTC
Message-ID
<20191023170049.hnzb22iiflrigyfs@tb-raspi4>
In-Reply-To
<c863c09b-f0ed-19c6-356e-12a3ecbc08b9@gmail.com>
On Fri, Oct 11, 2019 at 09:33:11AM -0400, Derrick Stolee wrote:
Show 5 quoted lines
> Here is today's test coverage report. The usual report format is
> available online [1], [2]. The report listed below is a new format
> that groups lines by the commit that introduced them [3]. Thanks
> Peff for the feedback on that idea.
>
[]
Show 5 quoted lines
>
> Torsten Bögershausen	ebb8d2c9 mingw: support UNC in git clone file://server/share/repo
> connect.c
> ebb8d2c9 921) path = host - 2; /* include the leading "//" */
>

I actually looked into this one, and my understanding is that the code path makes only sense for windows and is only tested on Windows in t5500. (Linux/Unix/POSIX don't use UNC path names starting with "//" )

How can we avoid those "not covered by test" warnings?
One solution could be to use

#ifndef has_dos_drive_prefix #define has_dos_drive_prefix(a) 0 #endif

in git-compat-util.h and hope that the compiler is smart enough to optimize away that line of code.

Another way could be to have #ifdefs in connect.c, so that it is clear "this is Windows only".

Or make a comment for the "cover report" saying "not covered".
Are there any good or better thoughts on this ?
Previous: Jeff KingNext: Derrick Stolee
Message 3 of 6 in “Git Test Coverage Report (October 11)”
  1. Derrick StoleeOct 11, 2019
  2. Jeff KingOct 17, 2019
  3. Torsten BögershausenOct 23, 2019
  4. Derrick StoleeOct 23, 2019
  5. Torsten BögershausenOct 24, 2019
  6. Derrick StoleeOct 24, 2019

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.