Lines 420–426 at 140 (were 420–426 at 139)
420420 return this.#layoutResolved(path, complete); 423− #layoutResolved(path: string, complete: boolean, nodes?: Iterable<number>): FileState {
423+ #attributes(path: string): FileAttrs { 424424 const graph = this.graph; 425425 // For each attribute, the highest-priority setter in the set wins. 426426 const setters = new Map<string, { id: AtomId; value: string | null }>(); Lines 433–449 at 140 (were 433–438 at 139)
437+ exists: setters.get("exists")?.value === "1", 438+ exec: setters.get("exec")?.value === "1", 439+ link: setters.get("link")?.value ?? null, 440+ blob: setters.get("blob")?.value ?? null, 444+ #layoutResolved(path: string, complete: boolean, nodes?: Iterable<number>): FileState { 445+ const graph = this.graph; 446+ const attrs = this.#attributes(path); 436447 const seq: number[] = []; 437448 const vis: number[] = []; 438449 const deletedBy = new Map<number, readonly number[]>(); Lines 464–470 at 140 (were 453–464 at 139)
453464 } else vis.push(n); 454465 if (complete) seq.push(n); 456− const attrs: FileAttrs = {
457− exists: setters.get("exists")?.value === "1",
458− exec: setters.get("exec")?.value === "1",
459− link: setters.get("link")?.value ?? null,
460− blob: setters.get("blob")?.value ?? null,
461− };
462468 return { attrs, complete, seq: Int32Array.from(seq), vis: Int32Array.from(vis), deletedBy }; Lines 502–514 at 140 (were 496–508 at 139)
497503 /** Whether the file exists in this projection (has a visible line). */ 498504 hasFile(path: string): boolean { 499− const f = this.#file(path);
500− return f.vis.length > 0 || f.attrs.exists || f.attrs.link !== null || f.attrs.blob !== null;
505+ const attrs = this.attrs(path); 506+ return attrs.exists || attrs.link !== null || attrs.blob !== null || this.#file(path).vis.length > 0; 503509 /** A file's attributes: kept while empty, executable, a link's target. */ 504510 attrs(path: string): FileAttrs { 505− return this.#file(path).attrs;
511+ return this.#files.get(path)?.attrs ?? this.#attributes(path); 508514 /** The projected text of a file ("" if it has no visible lines). */