threads / patch / 7480

patchgit-mergetool: de-bashify function declarations

Subject: [PATCH] git-mergetool: de-bashify function declarations

## tl;dr

2 messages between Mar 30, 2007 and Mar 30, 2007. Diffs are folded; open one to read it.

replies: 1people: 1as markdown or json

Jeff King· Mar 30, 2007, 03:26 UTC · lore
Signed-off-by: Jeff King <peff@peff.net>
---
Works fine otherwise for me using dash as /bin/sh...
 git-mergetool.sh |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)
Show changes to git-mergetool.sh +5 −5
diff --git a/git-mergetool.sh b/git-mergetool.sh
index 7942fd0..68b35d3 100755
--- a/git-mergetool.sh
+++ b/git-mergetool.sh
@@ -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"
-- 
1.5.1.rc2.638.g85e08-dirty
Jeff King· Mar 30, 2007, 04:03 UTC · re: Jeff King · lore

Re: [PATCH] git-mergetool: de-bashify function declarations

On Thu, Mar 29, 2007 at 11:26:45PM -0400, Jeff King wrote:
Show 5 quoted lines
>  # Returns true if the mode reflects a symlink
> -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

← back to recent threads