Revision 6e96e88ae43e8c78ec0066b0ee87d53987b14098 authored by Junio C Hamano on 27 August 2018, 21:33:42 UTC, committed by Junio C Hamano on 27 August 2018, 21:33:42 UTC
"git help --config" (which is used in command line completion)
missed the configuration variables not described in the main
config.txt file but are described in another file that is included
by it, which has been corrected.

* nd/complete-config-vars:
  generate-cmdlist.sh: collect config from all config.txt files
2 parent s 7ae96e3 + eb90ea7
Raw File
cygwin.c
#include "../git-compat-util.h"
#include "../cache.h"

int cygwin_offset_1st_component(const char *path)
{
	const char *pos = path;
	/* unc paths */
	if (is_dir_sep(pos[0]) && is_dir_sep(pos[1])) {
		/* skip server name */
		pos = strchr(pos + 2, '/');
		if (!pos)
			return 0; /* Error: malformed unc path */

		do {
			pos++;
		} while (*pos && pos[0] != '/');
	}
	return pos + is_dir_sep(*pos) - path;
}
back to top