Fri, 08 Jul 2016 23:39:52 -0400
Remove Test::Pretty
338
296f4b036ae3
move git-bre into a real command with better filename safety
Meredith Howard <mhoward@roomag.org>
parents:
diff
changeset
|
1 | #!/bin/sh |
296f4b036ae3
move git-bre into a real command with better filename safety
Meredith Howard <mhoward@roomag.org>
parents:
diff
changeset
|
2 | set -eu |
296f4b036ae3
move git-bre into a real command with better filename safety
Meredith Howard <mhoward@roomag.org>
parents:
diff
changeset
|
3 | |
296f4b036ae3
move git-bre into a real command with better filename safety
Meredith Howard <mhoward@roomag.org>
parents:
diff
changeset
|
4 | # git-bre: "branch edit", run $EDITOR with a list of all files touched in this |
296f4b036ae3
move git-bre into a real command with better filename safety
Meredith Howard <mhoward@roomag.org>
parents:
diff
changeset
|
5 | # branch compared to upstream. Any args are passed to the editor, before the |
296f4b036ae3
move git-bre into a real command with better filename safety
Meredith Howard <mhoward@roomag.org>
parents:
diff
changeset
|
6 | # file list. |
296f4b036ae3
move git-bre into a real command with better filename safety
Meredith Howard <mhoward@roomag.org>
parents:
diff
changeset
|
7 | |
296f4b036ae3
move git-bre into a real command with better filename safety
Meredith Howard <mhoward@roomag.org>
parents:
diff
changeset
|
8 | CHANGED=$( |
296f4b036ae3
move git-bre into a real command with better filename safety
Meredith Howard <mhoward@roomag.org>
parents:
diff
changeset
|
9 | git diff --name-only @{u}.. | while read file |
296f4b036ae3
move git-bre into a real command with better filename safety
Meredith Howard <mhoward@roomag.org>
parents:
diff
changeset
|
10 | do |
342
41f152d6ab1b
fix newlines in CHANGED
Meredith Howard <mhoward@roomag.org>
parents:
338
diff
changeset
|
11 | printf "\'$file\' " |
338
296f4b036ae3
move git-bre into a real command with better filename safety
Meredith Howard <mhoward@roomag.org>
parents:
diff
changeset
|
12 | done |
296f4b036ae3
move git-bre into a real command with better filename safety
Meredith Howard <mhoward@roomag.org>
parents:
diff
changeset
|
13 | ) |
296f4b036ae3
move git-bre into a real command with better filename safety
Meredith Howard <mhoward@roomag.org>
parents:
diff
changeset
|
14 | |
296f4b036ae3
move git-bre into a real command with better filename safety
Meredith Howard <mhoward@roomag.org>
parents:
diff
changeset
|
15 | eval "exec $EDITOR $@ ${CHANGED:?[No files to edit]}" |