* Used to set up core.excludesfile and .git/info/exclude lists. */
| 1304 | * Used to set up core.excludesfile and .git/info/exclude lists. |
| 1305 | */ |
| 1306 | static void add_patterns_from_file_1(struct dir_struct *dir, const char *fname, |
| 1307 | struct oid_stat *oid_stat) |
| 1308 | { |
| 1309 | struct pattern_list *pl; |
| 1310 | /* |
| 1311 | * catch setup_standard_excludes() that's called before |
| 1312 | * dir->untracked is assigned. That function behaves |
| 1313 | * differently when dir->untracked is non-NULL. |
| 1314 | */ |
| 1315 | if (!dir->untracked) |
| 1316 | dir->internal.unmanaged_exclude_files++; |
| 1317 | pl = add_pattern_list(dir, EXC_FILE, fname); |
| 1318 | if (add_patterns(fname, "", 0, pl, NULL, 0, oid_stat) < 0) |
| 1319 | die(_("cannot use %s as an exclude file"), fname); |
| 1320 | } |
| 1321 | |
| 1322 | void add_patterns_from_file(struct dir_struct *dir, const char *fname) |
| 1323 | { |
no test coverage detected