Merge branch 'jk/open-dotgitx-with-nofollow'
It does not make sense to make ".gitattributes", ".gitignore" and ".mailmap" symlinks, as they are supposed to be usable from the object store (think: bare repositories where HEAD:.mailmap etc. are used). When these files are symbolic links, we used to read the contents of the files pointed by them by mistake, which has been corrected. * jk/open-dotgitx-with-nofollow: mailmap: do not respect symlinks for in-tree .mailmap exclude: do not respect symlinks for in-tree .gitignore attr: do not respect symlinks for in-tree .gitattributes exclude: add flags parameter to add_patterns() attr: convert "macro_ok" into a flags field add open_nofollow() helper
This commit is contained in:
@ -64,7 +64,7 @@ static int sparse_checkout_list(int argc, const char **argv)
|
||||
pl.use_cone_patterns = core_sparse_checkout_cone;
|
||||
|
||||
sparse_filename = get_sparse_checkout_filename();
|
||||
res = add_patterns_from_file_to_list(sparse_filename, "", 0, &pl, NULL);
|
||||
res = add_patterns_from_file_to_list(sparse_filename, "", 0, &pl, NULL, 0);
|
||||
free(sparse_filename);
|
||||
|
||||
if (res < 0) {
|
||||
@ -321,7 +321,7 @@ static int sparse_checkout_init(int argc, const char **argv)
|
||||
memset(&pl, 0, sizeof(pl));
|
||||
|
||||
sparse_filename = get_sparse_checkout_filename();
|
||||
res = add_patterns_from_file_to_list(sparse_filename, "", 0, &pl, NULL);
|
||||
res = add_patterns_from_file_to_list(sparse_filename, "", 0, &pl, NULL, 0);
|
||||
|
||||
/* If we already have a sparse-checkout file, use it. */
|
||||
if (res >= 0) {
|
||||
@ -483,7 +483,7 @@ static void add_patterns_cone_mode(int argc, const char **argv,
|
||||
existing.use_cone_patterns = core_sparse_checkout_cone;
|
||||
|
||||
if (add_patterns_from_file_to_list(sparse_filename, "", 0,
|
||||
&existing, NULL))
|
||||
&existing, NULL, 0))
|
||||
die(_("unable to load existing sparse-checkout patterns"));
|
||||
free(sparse_filename);
|
||||
|
||||
@ -507,7 +507,7 @@ static void add_patterns_literal(int argc, const char **argv,
|
||||
{
|
||||
char *sparse_filename = get_sparse_checkout_filename();
|
||||
if (add_patterns_from_file_to_list(sparse_filename, "", 0,
|
||||
pl, NULL))
|
||||
pl, NULL, 0))
|
||||
die(_("unable to load existing sparse-checkout patterns"));
|
||||
free(sparse_filename);
|
||||
add_patterns_from_input(pl, argc, argv);
|
||||
|
Reference in New Issue
Block a user