Skip to content

v1.10.0

Choose a tag to compare

@thomasbachem thomasbachem released this 28 Oct 04:43
· 42 commits to main since this release

git-edit 1.10.0 resolves by itself far more of the stops a replay hits – in every fold and squash, and now in placements, moves and edits – and fixes a flaw in 1.8 and 1.9 that could land a fold's change on the wrong line.

Highlights

  • Stops resolve themselves where your own change says how. Each line your change replaces is followed through every later commit's own change to where it stands at the stop – and where it could stand in two places, the run pauses
  • A move takes the moved commit's lines past each commit it crosses. Each crossed commit keeps its own edits, those right beside the moved lines too, and its edits to the moved lines themselves land with the moved commit, named – where 1.9.0 paused at each such crossing
  • Tags edit.followTag names follow a rewrite – a release's cut marker, say, moves to what the rewrite made of its commit, and --undo puts it back. A signed tag, or one whose counterpart is only a guess, stays where it was, named
  • A fold flaw in 1.8 and 1.9 is fixed. A fold put its change wherever the stopped commit held the old text exactly once – so where a later commit had rewritten that line and written the same text elsewhere, it landed on the wrong line while reporting ok. Runs that printed "Made the edits in …" or "Made the fold's line replacements in …" worked that way, and where their files repeat lines, the commits' diffs are worth a look
  • -s=auto squashes each fixup!, amend! or squash! commit into the one it names, all in one replay. Bare, it takes the pending ones you landed – by your GIT_EDIT_ACTOR label, or all unlabeled ones without one – and --status lists who landed each
  • A pause holds only its own branch – runs on other branches go ahead beside it

Upgrading from 1.9.0

  • --patch, --put and --tree folds, squashes and every resume now resolve their stops too. GIT_EDIT_NO_SELF_RESOLVE=1 leaves every stop to you
  • Some stops 1.9.0 resolved now pause – where a line or its words could pair as well with another of the same text, or across a commit that rewrote the file as git diff -B reads it. More pause on git before 2.50, whose --minimal diff isn't exact
  • --onto and --land leave out the commits their triage lists as already upstream, however upstream changed them since. 1.9.0 replayed such a commit – stopping where upstream rewrote a line, or bringing back a part it reverted
  • A pause counts its remaining steps and names only those touching a conflicted file – --status lists them all
  • A placement refused for building on a later commit's change says so, and --status offers only --abort for a refused replay
  • Where a crossed commit rewrote moved lines together with older ones – a rewrapped paragraph, say – the whole hunk goes with the moved commit while the moved lines are at least half of it, named, and the move pauses otherwise. Lines a crossed commit inserted stay with it, between two moved lines too
  • A move carrying a crossed commit's edits amends the commit taking them in, running prepare-commit-msg and post-commit once more for it

New

  • amend! and squash! markers count in a squash without --text: An amend! message replaces its target's, and a squash! one's body is added
  • A stop where a later commit rewrapped a replaced line resolves by the line's changed words
  • edit.<path>.lockfile and edit.<path>.installCmd check a commit below a dependency upgrade on its own install, not on the one an edit.worktreeLink link holds
  • GIT_EDIT_ACTOR_NAME – a session's title, say – names a pause's owner beside its label
  • git edit -h maps config keys and usage words – <sha>, fixup, tier – to their entries
  • Where a fold's own step needs a line a later commit wrote, it names that commit
  • A stale SHA's error line names its counterpart, and a squash refused at its tip names the commits behind it

Faster

  • A resume over a large sweep checks each stop's paths in one batch – a 230-file resume took 29 s instead of 371 s
  • Resuming a squash refused at its tip, with nothing changed, refuses at once rather than after minutes of checks

Fixed since 1.9.0

What a run lands

  • On git 2.56, resuming a replay refused where git had dropped a pick that came out empty, reading it as taken out by hand
  • A drop or squash that left its commits in the branch – a todo edit matching nothing, a rebase begun by hand from the run's own base – said "squashed into …" while reporting ok. It now refuses
  • A fold resolving its own stops failed when TMPDIR held a space, and ran a $(…) it held
  • With rerere.enabled=false, a run could forget conflict resolutions another run still in progress had recorded

What it tells you

  • --status read a rebase begun by hand, or a replay finished there, as a conflict without files
  • On older git, --status printed each remaining step's subject twice
  • A paused squash was named by the newest commit it was given, not the ones it squashes into
  • A run blocked by your own pause read as if another session held it
  • --onto printed "fatal: ambiguous argument" for a branch named like a folder
  • A file conflicting with a landing a rewrite replaced read as predating it – it now names the git diff to read before --base
brew install thomasbachem/tap/git-edit

Or brew upgrade git-edit where it is already installed, or pull the repo if its folder is on your PATH.