* [PATCH] {diff,merge}tool: rename helpers to remove them from tab-completion
@ 2009-04-02 11:38 David Aguilar
2009-04-02 20:04 ` Markus Heidelberg
0 siblings, 1 reply; 2+ messages in thread
From: David Aguilar @ 2009-04-02 11:38 UTC (permalink / raw)
To: gitster; +Cc: git, David Aguilar
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@gmail.com>
---
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
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [PATCH] {diff,merge}tool: rename helpers to remove them from tab-completion
2009-04-02 11:38 [PATCH] {diff,merge}tool: rename helpers to remove them from tab-completion David Aguilar
@ 2009-04-02 20:04 ` Markus Heidelberg
0 siblings, 0 replies; 2+ messages in thread
From: Markus Heidelberg @ 2009-04-02 20:04 UTC (permalink / raw)
To: David Aguilar; +Cc: gitster, git
David Aguilar, 02.04.2009:
> diff --git a/Makefile b/Makefile
[..]
> 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
This conflicts with commit 496c021 (Add a script to edit/inspect notes)
in 'pu', which seems to be just merged today. If you build your patches
on top of 'da/difftool' (99511d8) instead of 'pu', then these conflicts
won't arise and avoid hassle.
In fact I already applied all your patches on top 'da/difftool' and not
'pu' all the time, until now.
Thanks for your work on this
Markus
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-04-02 20:06 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-04-02 11:38 [PATCH] {diff,merge}tool: rename helpers to remove them from tab-completion David Aguilar
2009-04-02 20:04 ` Markus Heidelberg
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).