bin/git-bre

Wed, 22 Jun 2016 13:48:16 -0400

author
Meredith Howard <mhoward@roomag.org>
date
Wed, 22 Jun 2016 13:48:16 -0400
changeset 340
974da7d3659c
parent 338
296f4b036ae3
child 342
41f152d6ab1b
permissions
-rwxr-xr-x

Add viewdoc, set up

#!/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
    echo \'$file\'
  done
)

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

mercurial