[PATCH] {diff,merge}tool: rename helpers to remove them from tab-completion

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Users should never run difftool-helper or mergetool-lib directly,
so rename them to *--helper and *--lib.  This keeps the helper
scripts from showing up when using bash tab completion.

Signed-off-by: David Aguilar <davvid@xxxxxxxxx>
---

This is based on the 'pu' branch + the patches
I sent out earlier.


 .gitignore                                         |    4 ++--
 ...it-mergetool-lib.txt => git-mergetool--lib.txt} |   10 +++++-----
 Makefile                                           |    4 ++--
 command-list.txt                                   |    2 +-
 git-difftool-helper.sh => git-difftool--helper.sh  |    6 +++---
 git-difftool.perl                                  |    6 +++---
 git-mergetool-lib.sh => git-mergetool--lib.sh      |    2 +-
 git-mergetool.sh                                   |    2 +-
 8 files changed, 18 insertions(+), 18 deletions(-)
 rename Documentation/{git-mergetool-lib.txt => git-mergetool--lib.txt} (82%)
 rename git-difftool-helper.sh => git-difftool--helper.sh (96%)
 rename git-mergetool-lib.sh => git-mergetool--lib.sh (98%)

diff --git a/.gitignore b/.gitignore
index 75c154a..757c7f0 100644
--- a/.gitignore
+++ b/.gitignore
@@ -36,7 +36,7 @@ git-diff-files
 git-diff-index
 git-diff-tree
 git-difftool
-git-difftool-helper
+git-difftool--helper
 git-describe
 git-fast-export
 git-fast-import
@@ -80,7 +80,7 @@ git-merge-recursive
 git-merge-resolve
 git-merge-subtree
 git-mergetool
-git-mergetool-lib
+git-mergetool--lib
 git-mktag
 git-mktree
 git-name-rev
diff --git a/Documentation/git-mergetool-lib.txt b/Documentation/git-mergetool--lib.txt
similarity index 82%
rename from Documentation/git-mergetool-lib.txt
rename to Documentation/git-mergetool--lib.txt
index 7377774..ffda66b 100644
--- a/Documentation/git-mergetool-lib.txt
+++ b/Documentation/git-mergetool--lib.txt
@@ -1,13 +1,13 @@
-git-mergetool-lib(1)
-====================
+git-mergetool--lib(1)
+=====================
 
 NAME
 ----
-git-mergetool-lib - Common git merge tool shell scriptlets
+git-mergetool--lib - Common git merge tool shell scriptlets
 
 SYNOPSIS
 --------
-'. "$(git --exec-path)/git-mergetool-lib"'
+'. "$(git --exec-path)/git-mergetool--lib"'
 
 DESCRIPTION
 -----------
@@ -16,7 +16,7 @@ This is not a command the end user would want to run.  Ever.
 This documentation is meant for people who are studying the
 Porcelain-ish scripts and/or are writing new ones.
 
-The 'git-mergetool-lib' scriptlet is designed to be sourced (using
+The 'git-mergetool--lib' scriptlet is designed to be sourced (using
 `.`) by other shell scripts to set up functions for working
 with git merge tools.
 
diff --git a/Makefile b/Makefile
index 086f9e7..3e56274 100644
--- a/Makefile
+++ b/Makefile
@@ -277,14 +277,14 @@ TEST_PROGRAMS =
 
 SCRIPT_SH += git-am.sh
 SCRIPT_SH += git-bisect.sh
-SCRIPT_SH += git-difftool-helper.sh
+SCRIPT_SH += git-difftool--helper.sh
 SCRIPT_SH += git-filter-branch.sh
 SCRIPT_SH += git-lost-found.sh
 SCRIPT_SH += git-merge-octopus.sh
 SCRIPT_SH += git-merge-one-file.sh
 SCRIPT_SH += git-merge-resolve.sh
 SCRIPT_SH += git-mergetool.sh
-SCRIPT_SH += git-mergetool-lib.sh
+SCRIPT_SH += git-mergetool--lib.sh
 SCRIPT_SH += git-parse-remote.sh
 SCRIPT_SH += git-pull.sh
 SCRIPT_SH += git-quiltimport.sh
diff --git a/command-list.txt b/command-list.txt
index 922c815..fd66395 100644
--- a/command-list.txt
+++ b/command-list.txt
@@ -69,7 +69,7 @@ git-merge-file                          plumbingmanipulators
 git-merge-index                         plumbingmanipulators
 git-merge-one-file                      purehelpers
 git-mergetool                           ancillarymanipulators
-git-mergetool-lib                       purehelpers
+git-mergetool--lib                      purehelpers
 git-merge-tree                          ancillaryinterrogators
 git-mktag                               plumbingmanipulators
 git-mktree                              plumbingmanipulators
diff --git a/git-difftool-helper.sh b/git-difftool--helper.sh
similarity index 96%
rename from git-difftool-helper.sh
rename to git-difftool--helper.sh
index d174b34..602cd4f 100755
--- a/git-difftool-helper.sh
+++ b/git-difftool--helper.sh
@@ -1,13 +1,13 @@
 #!/bin/sh
-# git-difftool-helper is a GIT_EXTERNAL_DIFF-compatible diff tool launcher.
+# git-difftool--helper is a GIT_EXTERNAL_DIFF-compatible diff tool launcher.
 # This script is typically launched by using the 'git difftool'
 # convenience command.
 #
 # Copyright (c) 2009 David Aguilar
 
-# Load common functions from git-mergetool-lib
+# Load common functions from git-mergetool--lib
 TOOL_MODE=diff
-. git-mergetool-lib
+. git-mergetool--lib
 
 # difftool.prompt controls the default prompt/no-prompt behavior
 # and is overridden with $GIT_DIFFTOOL*_PROMPT.
diff --git a/git-difftool.perl b/git-difftool.perl
index 985dfe0..948ff7f 100755
--- a/git-difftool.perl
+++ b/git-difftool.perl
@@ -2,11 +2,11 @@
 # Copyright (c) 2009 David Aguilar
 #
 # This is a wrapper around the GIT_EXTERNAL_DIFF-compatible
-# git-difftool-helper script.
+# git-difftool--helper script.
 #
 # This script exports GIT_EXTERNAL_DIFF and GIT_PAGER for use by git.
 # GIT_DIFFTOOL_NO_PROMPT, GIT_DIFFTOOL_PROMPT, and GIT_DIFF_TOOL
-# are exported for use by git-difftool-helper.
+# are exported for use by git-difftool--helper.
 #
 # Any arguments that are unknown to this script are forwarded to 'git diff'.
 
@@ -30,7 +30,7 @@ sub setup_environment
 {
 	$ENV{PATH} = "$DIR:$ENV{PATH}";
 	$ENV{GIT_PAGER} = '';
-	$ENV{GIT_EXTERNAL_DIFF} = 'git-difftool-helper';
+	$ENV{GIT_EXTERNAL_DIFF} = 'git-difftool--helper';
 }
 
 sub exe
diff --git a/git-mergetool-lib.sh b/git-mergetool--lib.sh
similarity index 98%
rename from git-mergetool-lib.sh
rename to git-mergetool--lib.sh
index 197533e..91d5453 100644
--- a/git-mergetool-lib.sh
+++ b/git-mergetool--lib.sh
@@ -1,4 +1,4 @@
-# git-mergetool-lib is a library for common merge tool functions
+# git-mergetool--lib is a library for common merge tool functions
 diff_mode() {
 	test $TOOL_MODE = "diff"
 }
diff --git a/git-mergetool.sh b/git-mergetool.sh
index 16562bd..401c107 100755
--- a/git-mergetool.sh
+++ b/git-mergetool.sh
@@ -13,7 +13,7 @@ SUBDIRECTORY_OK=Yes
 OPTIONS_SPEC=
 TOOL_MODE=merge
 . git-sh-setup
-. git-mergetool-lib
+. git-mergetool--lib
 require_work_tree
 
 # Returns true if the mode reflects a symlink
-- 
1.6.2.1.469.gdffc1

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux