bin/git-bre

Fri, 08 Jul 2016 23:39:52 -0400

author
Meredith Howard <mhoward@roomag.org>
date
Fri, 08 Jul 2016 23:39:52 -0400
changeset 346
88a2e08ce673
parent 342
41f152d6ab1b
permissions
-rwxr-xr-x

Remove Test::Pretty

#!/bin/sh
set -eu

# git-bre:  "branch edit", run $EDITOR with a list of all files touched in this
# branch compared to upstream.  Any args are passed to the editor, before the
# file list.

CHANGED=$(
  git diff --name-only @{u}.. | while read file
  do
    printf "\'$file\' "
  done
)

eval "exec $EDITOR $@ ${CHANGED:?[No files to edit]}"

mercurial