We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 047fe29 commit 301dc26Copy full SHA for 301dc26
src/config_file.c
@@ -1254,8 +1254,16 @@ static int strip_comments(char *line, int in_quotes)
1254
static int included_path(git_buf *out, const char *dir, const char *path)
1255
{
1256
/* From the user's home */
1257
- if (path[0] == '~' && path[1] == '/')
1258
- return git_sysdir_find_global_file(out, &path[1]);
+ int result;
+ if (path[0] == '~' && path[1] == '/') {
1259
+ result = git_sysdir_find_global_file(out, &path[1]);
1260
+ if (result == GIT_ENOTFOUND) {
1261
+ git_buf_sets(out, &path[1]);
1262
+ return 0;
1263
+ }
1264
+
1265
+ return result;
1266
1267
1268
return git_path_join_unrooted(out, path, dir, NULL);
1269
}
0 commit comments