From: Junio C Hamano Date: Wed, 28 Nov 2018 04:12:36 GMT Subject: Re: [PATCH v1/RFC 1/1] 'git clone C:\cygwin\home\USER\repo' is working (again) Message-ID: In-Reply-To: Johannes Schindelin writes: > It takes a little folding and knotting of the brain to understand that > this `!skip_dos_drive_prefix(&pos)` has *nothing* to do with the comment > `unc paths` nor with the test whether the paths starts with two directory > separators. > > As a consequence, I would highly suggest to turn this into: > > if (skip_dos_drive_prefix(&pos)) > ; /* absolute path with DOS drive prefix */ > /* unc paths */ > else if (is_dir_sep(pos[0]) && is_dir_sep(pos[1])) { > > That makes the code a lot easier to understand, and as a consequence a lot > harder to mess up in the future. Excellent. With or without "unc paths" comment, the separation does make the logic more clear.