# `Juggernaut.Plan.Hunks`
[🔗](https://github.com/holsee/juggernaut/blob/v0.4.0/lib/juggernaut/plan/hunks.ex#L1)

Changed lines from `git diff -U0` output, and which function clauses they touch
(design notes §3 `--since`, plan I11).

Only the new side of each hunk counts: `@@ -a,b +c,d @@` changes lines `c..c+d-1` of
the new file. A hunk that only deletes (`d = 0`) touches the lines on both sides of
the deletion (`c` and `c + 1`), so removing code inside a clause selects that clause.
A deleted file (`+++ /dev/null`) has no lines. A header whose new side is not
`c` or `c,d` (digits) adds nothing.

# `t`

```elixir
@type t() :: %{required(String.t()) =&gt; MapSet.t(pos_integer())}
```

# `parse`

```elixir
@spec parse(String.t()) :: t()
```

Changed lines per file (paths as git prints them after `b/`, unquoted).

# `touched?`

```elixir
@spec touched?(Range.t(), MapSet.t(pos_integer())) :: boolean()
```

Whether any of `changed` lies in `range`.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
