equal
deleted
inserted
replaced
16 { |
16 { |
17 type Edit = (Option[Command], Option[Command]) |
17 type Edit = (Option[Command], Option[Command]) |
18 |
18 |
19 sealed case class Blob( |
19 sealed case class Blob( |
20 name: Document.Node.Name, |
20 name: Document.Node.Name, |
|
21 src_path: Path, |
21 content: Option[(SHA1.Digest, Symbol.Text_Chunk)]) |
22 content: Option[(SHA1.Digest, Symbol.Text_Chunk)]) |
22 |
23 |
23 type Blobs_Info = (List[Exn.Result[Blob]], Int) |
24 type Blobs_Info = (List[Exn.Result[Blob]], Int) |
24 val no_blobs: Blobs_Info = (Nil, -1) |
25 val no_blobs: Blobs_Info = (Nil, -1) |
25 |
26 |
439 case _ => |
440 case _ => |
440 val (files, index) = span.loaded_files(syntax) |
441 val (files, index) = span.loaded_files(syntax) |
441 val blobs = |
442 val blobs = |
442 files.map(file => |
443 files.map(file => |
443 (Exn.capture { |
444 (Exn.capture { |
444 val name = Document.Node.Name(resources.append(node_name, Path.explode(file))) |
445 val src_path = Path.explode(file) |
|
446 val name = Document.Node.Name(resources.append(node_name, src_path)) |
445 val content = get_blob(name).map(blob => (blob.bytes.sha1_digest, blob.chunk)) |
447 val content = get_blob(name).map(blob => (blob.bytes.sha1_digest, blob.chunk)) |
446 Blob(name, content) |
448 Blob(name, src_path, content) |
447 }).user_error) |
449 }).user_error) |
448 (blobs, index) |
450 (blobs, index) |
449 } |
451 } |
450 } |
452 } |
451 } |
453 } |