# Middly infuriating brackets in patches

**URL:** <https://discourse.pijul.org/t/middly-infuriating-brackets-in-patches/320>\
**Category:** Question\
**Created:** [April 24, 2019, 8:31pm UTC](https://discourse.pijul.org/t/middly-infuriating-brackets-in-patches/320 "2019-04-24T20:31:16Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![nbrr](https://avatars.discourse-cdn.com/v4/letter/n/a4c791/32.png) [@nbrr](https://discourse.pijul.org/u/nbrr)\
**Post date:** [April 24, 2019, 8:31pm UTC](https://discourse.pijul.org/t/middly-infuriating-brackets-in-patches/320/1 "2019-04-24T20:31:16Z")

</div>

I’ve been experimenting with pijul for a few of days, and there is this one thing buzzing me. I have seen [this](https://nest.pijul.com/nbrr/test:master/patches/8AgwYAqbAgCdzFDfxu8a94JAJFCvny5v3YcScGuwLbEryBtsJuT6WMu5334pTAa3mQaaVrCxXqU7waewKaMooV6u) happen several times. When I insert lines in several parts of my code, functions in particular, the patch often records an addition of a closing bracket followed my new code without the closing bracket. I would rather have a cleaner patch that records my new code without this dangling bracket. I’ve been able to “fix” it by recording the code inserted “before” separately from the code inserted “after” in the file to obtain satisfying patches so far. This is quite a minor issue, but has anyone given any thought about this?

---

<div class="post-metadata">

**Author:** ![pmeunier](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.pijul.org/pmeunier/32/4_2.png) [@pmeunier](https://discourse.pijul.org/u/pmeunier)\
**Post date:** [April 24, 2019, 8:51pm UTC](https://discourse.pijul.org/t/middly-infuriating-brackets-in-patches/320/2 "2019-04-24T20:51:12Z")

</div>

`pijul record --patience` is supposed to solve this.

---

<div class="post-metadata">

**Author:** ![acvio](https://avatars.discourse-cdn.com/v4/letter/a/41988e/32.png) [@acvio](https://discourse.pijul.org/u/acvio)\
**Post date:** [May 1, 2026, 10:50am UTC](https://discourse.pijul.org/t/middly-infuriating-brackets-in-patches/320/3 "2026-05-01T10:50:25Z")

</div>

I’ve come across instances where `pijul diff`, `pijul diff --patience` and `pijul diff --histogram` all produce diffs with wrong brackets somewhere in the diff. Can these diffs be manually edited to remove the brackets from the top of the diff and place them at the bottom, or will this result in incorrect results, maybe because the top of the editable diff representation is anchored on a line number or something?
