tarlatan
    Preparing search index...

    Function checkAttributeSources

    • Judges the reading of one revision and repository (plan B11c, contract). Succeeds with the revision when every .gitattributes entry is a regular blob of blank and comment lines, info/attributes is absent or an empty regular file, core.attributesFile is unset (exit 1), and the includeif. listing matched nothing (exit 1). Otherwise fails, listing every refusal in source order: with AttributeSourcesRefused when any source that was read is refused, and with AttributeSourcesUnread when every refusal is a failed read (owner ruling on B11c and R01, 2026-11-20). A blank line holds only spaces and tabs and at most a final CR; a comment line begins with # at its first character, so an indented # is refused. A line of the root .gitattributes (path exactly .gitattributes) also passes when it equals one of allowance.rootLines after its terminator is removed: the \n, and one CR before it. A last line with no \n has no terminator, so its CR stays (decision M09, option a).

      Parameters

      • reading: {
            attributesFile: { exitCode: number; stderr: string; stdout: string };
            conditionalIncludes: { exitCode: number; stderr: string; stdout: string };
            infoAttributes: {
                path: string;
                reading: FileAbsent | FileFound | FileUnreadable;
            };
            revision: string & Brand<"Revision">;
            tree: TreeNotListed | TreeUndecodable | TreeListed;
        }
      • allowance: { rootLines: readonly string[] }

      Returns Result<
          string & Brand<"Revision">,
          AttributeSourcesRefused | AttributeSourcesUnread,
      >