Merge branch 'jk/maint-ls-files-other' into jk/fix-ls-files-other
* jk/maint-ls-files-other: refactor handling of "other" files in ls-files and status Conflicts: read-cache.c
This commit is contained in:
15
wt-status.c
15
wt-status.c
@ -277,20 +277,9 @@ static void wt_status_print_untracked(struct wt_status *s)
|
||||
|
||||
read_directory(&dir, ".", "", 0, NULL);
|
||||
for(i = 0; i < dir.nr; i++) {
|
||||
/* check for matching entry, which is unmerged; lifted from
|
||||
* builtin-ls-files:show_other_files */
|
||||
struct dir_entry *ent = dir.entries[i];
|
||||
int pos = cache_name_pos(ent->name, ent->len);
|
||||
struct cache_entry *ce;
|
||||
if (0 <= pos)
|
||||
die("bug in wt_status_print_untracked");
|
||||
pos = -pos - 1;
|
||||
if (pos < active_nr) {
|
||||
ce = active_cache[pos];
|
||||
if (ce_namelen(ce) == ent->len &&
|
||||
!memcmp(ce->name, ent->name, ent->len))
|
||||
continue;
|
||||
}
|
||||
if (!cache_name_is_other(ent->name, ent->len))
|
||||
continue;
|
||||
if (!shown_header) {
|
||||
s->workdir_untracked = 1;
|
||||
wt_status_print_untracked_header(s);
|
||||
|
||||
Reference in New Issue
Block a user