Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit dd19eea

Browse files
committed
make marker easier to change
1 parent 2a4fb1a commit dd19eea

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

‎git-ptt‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ force=
1010
remote=$(git config --get --default origin ptt.remote)
1111
query_only=0
1212
shortlen=10
13+
marker=x-branch
1314

1415
while getopts qfr: ch; do
1516
case $ch in
@@ -35,10 +36,10 @@ shift $(( OPTIND - 1 ))
3536
set -eu
3637

3738
for rev in $(git rev-list "$@" | tac ); do
38-
target=($(git show $rev -q --format="%(trailers:key=x-branch,valueonly=true)"))
39+
target=($(git show $rev -q --format="%(trailers:key=${marker},valueonly=true)"))
3940

4041
if (( ${#target[*]} > 1 )); then
41-
echo "ERROR: multiple x-branch directives in $rev." >&2
42+
echo "ERROR: multiple ${marker} directives in $rev." >&2
4243
exit 1
4344
elif (( ${#target[*]} == 0 )); then
4445
continue

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /