Skip to contentSkip to conversation

git-mergetool: de-bashify function declarations

PATCH In review Jeff King 1 participant 2 messages Jun 15, 2016

lore
Share & tools
lore

Jeff King

author
#0 lore raw

PATCH 1/1 git-mergetool: de-bashify function declarations

---
Works fine otherwise for me using dash as /bin/sh...

 git-mergetool.sh |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)
git-mergetool.sh +5 -5
index 7942fd0..68b35d3 100755
@@ -14,19 +14,19 @@ SUBDIRECTORY_OK=Yes
 require_work_tree
 
 # Returns true if the mode reflects a symlink
-function is_symlink () {
+is_symlink () {
     test "$1" = 120000
 }
 
-function local_present () {
+local_present () {
     test -n "$local_mode"
 }
 
-function remote_present () {
+remote_present () {
     test -n "$remote_mode"
 }
 
-function base_present () {
+base_present () {
     test -n "$base_mode"
 }
 
@@ -39,7 +39,7 @@ cleanup_temp_files () {
     fi
 }
 
-function describe_file () {
+describe_file () {
     mode="$1"
     branch="$2"
     file="$3"
Signature · 1 line
1.5.1.rc2.638.g85e08-dirty
author
#1 lore raw

git-mergetool.sh SUBDIRECTORY_OK=Yes · line 19

Quoted 5 lines · Jeff King

# Returns true if the mode reflects a symlink

git-mergetool.sh +1 -1
-function is_symlink () {
+is_symlink () {
     test "$1" = 120000
 }

Oops, looks like Ted already fixed this, but it just hasn't been pulled yet. Sorry for the noise.

-Peff