Skip to content

Instantly share code, notes, and snippets.

@farhaven
Created November 29, 2024 11:04
Show Gist options
  • Save farhaven/e5bd0de3f4499e7f63b218ef773ae228 to your computer and use it in GitHub Desktop.
Save farhaven/e5bd0de3f4499e7f63b218ef773ae228 to your computer and use it in GitHub Desktop.
A tool I use for managing Git conflicts in Acme.
#!/bin/sh
TOPLEVEL=$(git rev-parse --show-toplevel)
git status | plumb -i -d edit -a 'filename=+Conflict'
git status --porcelain | \
awk -v TL="$TOPLEVEL" '/^UU/{ print TL "/" $2 }' | \
xargs -n1 plumb -d edit -a 'addr=/^=======/'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment