* [PATCH] Use "-script" postfix for scripts
@ 2005-08-12 13:28 Johannes Schindelin
2005-08-12 15:32 ` Junio C Hamano
0 siblings, 1 reply; 9+ messages in thread
From: Johannes Schindelin @ 2005-08-12 13:28 UTC (permalink / raw
To: git
For consistency reasons, the names of all scripts should end in "-script".
Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
---
This may be a bit controversial (people might find it unnecessary).
Subject to discussion.
---
Makefile | 15 ++++++++-------
git-cherry-script | 0
git-clone-dumb-http-script | 0
git-clone-script | 2 +-
git-rebase-script | 4 ++--
git-request-pull-script | 4 ++--
git-shortlog-script | 0
git-whatchanged-script | 0
8 files changed, 13 insertions(+), 12 deletions(-)
rename git-cherry => git-cherry-script (100%)
rename git-clone-dumb-http => git-clone-dumb-http-script (100%)
rename git-shortlog => git-shortlog-script (100%)
rename git-whatchanged => git-whatchanged-script (100%)
5cc55f08d874b61f1067857c7310fac325504ec8
diff --git a/Makefile b/Makefile
--- a/Makefile
+++ b/Makefile
@@ -58,15 +58,16 @@ SPARSE_FLAGS?=-D__BIG_ENDIAN__ -D__power
SCRIPTS=git git-apply-patch-script git-merge-one-file-script git-prune-script \
- git-pull-script git-tag-script git-resolve-script git-whatchanged \
- git-fetch-script git-status-script git-commit-script \
- git-log-script git-shortlog git-cvsimport-script git-diff-script \
- git-reset-script git-add-script git-checkout-script git-clone-script \
- gitk git-cherry git-rebase-script git-relink-script git-repack-script \
+ git-pull-script git-tag-script git-resolve-script \
+ git-whatchanged-script git-fetch-script git-status-script \
+ git-commit-script git-log-script git-shortlog-script \
+ git-cvsimport-script git-diff-script git-reset-script git-add-script \
+ git-checkout-script git-clone-script gitk git-cherry-script \
+ git-rebase-script git-relink-script git-repack-script \
git-format-patch-script git-sh-setup-script git-push-script \
git-branch-script git-parse-remote git-verify-tag-script \
- git-ls-remote-script git-clone-dumb-http git-rename-script \
- git-request-pull-script git-bisect-script
+ git-ls-remote-script git-clone-dumb-http-script \
+ git-rename-script git-request-pull-script git-bisect-script
SCRIPTS += git-count-objects-script
# SCRIPTS += git-send-email-script
diff --git a/git-cherry b/git-cherry-script
similarity index 100%
rename from git-cherry
rename to git-cherry-script
diff --git a/git-clone-dumb-http b/git-clone-dumb-http-script
similarity index 100%
rename from git-clone-dumb-http
rename to git-clone-dumb-http-script
diff --git a/git-clone-script b/git-clone-script
--- a/git-clone-script
+++ b/git-clone-script
@@ -89,7 +89,7 @@ yes,yes)
rsync $quiet -avz --ignore-existing "$repo/refs/" "$D/.git/refs/"
;;
http://*)
- git-clone-dumb-http "$repo" "$D"
+ git-clone-dumb-http-script "$repo" "$D"
case "$?" in
2)
echo "Somebody should define smarter http server protocol" >&2
diff --git a/git-rebase-script b/git-rebase-script
--- a/git-rebase-script
+++ b/git-rebase-script
@@ -7,7 +7,7 @@
usage="usage: $0 "'<upstream> [<head>]
-Uses output from git-cherry to rebase local commits to the new head of
+Uses output from git-cherry-script to rebase local commits to the new head of
upstream tree.'
case "$#,$1" in
@@ -36,7 +36,7 @@ trap "rm -rf $tmp-*" 0 1 2 3 15
>$fail
-git-cherry $upstream $ours |
+git-cherry-script $upstream $ours |
while read sign commit
do
case "$sign" in
diff --git a/git-request-pull-script b/git-request-pull-script
--- a/git-request-pull-script
+++ b/git-request-pull-script
@@ -24,12 +24,12 @@ headrev=`git-rev-parse --verify $head^0`
echo "The following changes since commit $baserev:"
git log --max-count=1 --pretty=short "$baserev" |
-git-shortlog | sed -e 's/^\(.\)/ \1/'
+git-shortlog-script | sed -e 's/^\(.\)/ \1/'
echo "are found in the git repository at:"
echo
echo " $url"
echo
-git log $baserev..$headrev | git-shortlog ;
+git log $baserev..$headrev | git-shortlog-script ;
git diff $baserev..$headrev | git-apply --stat --summary
diff --git a/git-shortlog b/git-shortlog-script
similarity index 100%
rename from git-shortlog
rename to git-shortlog-script
diff --git a/git-whatchanged b/git-whatchanged-script
similarity index 100%
rename from git-whatchanged
rename to git-whatchanged-script
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] Use "-script" postfix for scripts
2005-08-12 13:28 [PATCH] Use "-script" postfix for scripts Johannes Schindelin
@ 2005-08-12 15:32 ` Junio C Hamano
2005-08-12 16:00 ` Johannes Schindelin
2005-08-12 21:55 ` Linus Torvalds
0 siblings, 2 replies; 9+ messages in thread
From: Junio C Hamano @ 2005-08-12 15:32 UTC (permalink / raw
To: Johannes Schindelin; +Cc: git
Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:
> For consistency reasons, the names of all scripts should end in "-script".
>
> This may be a bit controversial (people might find it unnecessary).
> Subject to discussion.
I have never liked the original -script name convention. It
only meant that they are implemented as scripts (as opposed to
those on the $(PROG) Makefile variable), but the end users who
end up typing their names from the command line, and to a lesser
degree the people who use them in their scripts, should not care
how they are implemented to begin with.
And to cope with long names and make things look a bit more
familiar to CVS migrants, "git" wrapper was invented to supply
the -script suffix to grok "git whatever", but just in case if
something was _not_ implemented as a script, it ends up needing
to try "git-whatever" in addition to "git-whatever-script". The
patch alleviates the "git" problem for "git-whatchanged" and
friends whose names currently do not end with -script, but it
still does not help "git apply", for example. I like the
general direction of making things consistent, but I wonder if
we can become consistent by losing -script suffix, not adding to
the ones that lack it.
And as you imply, this kind of change inevitable breaks people's
scripts. But I do agree with you that we should do something
about it, so it may be better to break them sooner rather than
later, as long as we make sure we break them just once.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] Use "-script" postfix for scripts
2005-08-12 15:32 ` Junio C Hamano
@ 2005-08-12 16:00 ` Johannes Schindelin
2005-08-12 21:55 ` Linus Torvalds
1 sibling, 0 replies; 9+ messages in thread
From: Johannes Schindelin @ 2005-08-12 16:00 UTC (permalink / raw
To: Junio C Hamano; +Cc: git
hI,
On Fri, 12 Aug 2005, Junio C Hamano wrote:
> Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:
>
> > For consistency reasons, the names of all scripts should end in "-script".
> >
> > This may be a bit controversial (people might find it unnecessary).
> > Subject to discussion.
>
> I have never liked the original -script name convention.
Okay. I'm all for dropping the "-script" postfix.
Ciao,
Dscho
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] Use "-script" postfix for scripts
2005-08-12 15:32 ` Junio C Hamano
2005-08-12 16:00 ` Johannes Schindelin
@ 2005-08-12 21:55 ` Linus Torvalds
2005-08-12 22:27 ` Ryan Anderson
1 sibling, 1 reply; 9+ messages in thread
From: Linus Torvalds @ 2005-08-12 21:55 UTC (permalink / raw
To: Junio C Hamano; +Cc: Johannes Schindelin, git
On Fri, 12 Aug 2005, Junio C Hamano wrote:
>
> I have never liked the original -script name convention. It
> only meant that they are implemented as scripts (as opposed to
> those on the $(PROG) Makefile variable), but the end users who
> end up typing their names from the command line, and to a lesser
> degree the people who use them in their scripts, should not care
> how they are implemented to begin with.
Well, end users _don't_ care, since they are supposed to use just a simple
"git xxx".
The advantage with "git-xxx-script" is for git developers: at least yours
truly does "grep xyz *.c" all the time, and the "grep abc *-script" is
entirely analogous to that. That's where the "-script" ending comes from:
it really helps pick out the stuff you can grep from (as opposed to the
stuff that got compiled and isn't greppable).
Sure, I could have called it ".sh" instead to make it look even more like
a shell script thing, but I actually think "-script" describes any
scripting language - shell, perl, you name it..
Linus
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] Use "-script" postfix for scripts
2005-08-12 21:55 ` Linus Torvalds
@ 2005-08-12 22:27 ` Ryan Anderson
2005-08-13 8:57 ` Junio C Hamano
0 siblings, 1 reply; 9+ messages in thread
From: Ryan Anderson @ 2005-08-12 22:27 UTC (permalink / raw
To: Linus Torvalds; +Cc: Junio C Hamano, Johannes Schindelin, git
On Fri, Aug 12, 2005 at 02:55:01PM -0700, Linus Torvalds wrote:
>
> Sure, I could have called it ".sh" instead to make it look even more like
> a shell script thing, but I actually think "-script" describes any
> scripting language - shell, perl, you name it..
See, for example, the history on git-rename-script for why this is good.
--
Ryan Anderson
sometimes Pug Majere
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] Use "-script" postfix for scripts
2005-08-12 22:27 ` Ryan Anderson
@ 2005-08-13 8:57 ` Junio C Hamano
2005-08-13 16:35 ` Linus Torvalds
2005-08-13 22:25 ` Ryan Anderson
0 siblings, 2 replies; 9+ messages in thread
From: Junio C Hamano @ 2005-08-13 8:57 UTC (permalink / raw
To: Ryan Anderson; +Cc: Linus Torvalds, Johannes Schindelin, git
Ryan Anderson <ryan@michonline.com> writes:
> See, for example, the history on git-rename-script for why this is good.
Why do you think it is a good example? What happens when next
time somebody rewrites it in C?
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] Use "-script" postfix for scripts
2005-08-13 8:57 ` Junio C Hamano
@ 2005-08-13 16:35 ` Linus Torvalds
2005-08-13 22:25 ` Ryan Anderson
1 sibling, 0 replies; 9+ messages in thread
From: Linus Torvalds @ 2005-08-13 16:35 UTC (permalink / raw
To: Junio C Hamano; +Cc: Ryan Anderson, Johannes Schindelin, git
On Sat, 13 Aug 2005, Junio C Hamano wrote:
> Ryan Anderson <ryan@michonline.com> writes:
> > See, for example, the history on git-rename-script for why this is good.
>
> Why do you think it is a good example? What happens when next
> time somebody rewrites it in C?
We'll call the C version "rename.c", and the program gets to be called
"git-rename", and "git rename" continues to work perfectly fine, so users
won't be affected in the least.
And "grep ... *.c" and "grep ... *-script" also still work right.
That sounds like a good outcome to me.
Linus
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] Use "-script" postfix for scripts
2005-08-13 8:57 ` Junio C Hamano
2005-08-13 16:35 ` Linus Torvalds
@ 2005-08-13 22:25 ` Ryan Anderson
2005-08-13 22:28 ` Petr Baudis
1 sibling, 1 reply; 9+ messages in thread
From: Ryan Anderson @ 2005-08-13 22:25 UTC (permalink / raw
To: Junio C Hamano; +Cc: Linus Torvalds, Johannes Schindelin, git
On Sat, Aug 13, 2005 at 01:57:22AM -0700, Junio C Hamano wrote:
> Ryan Anderson <ryan@michonline.com> writes:
>
> > See, for example, the history on git-rename-script for why this is good.
>
> Why do you think it is a good example? What happens when next
> time somebody rewrites it in C?
Well, I was really responding to the comment about "-script" being
better than ".sh", as trying ".sh", ".pl", ".php", etc, would rapidly
be annoying.
Honestly, I think the biggest argument against the "-script" suffix is
related to man-page usage: It requires significant knowledge of the Git
project to figure out what name variant to use to find the man page.
(There are other problems with man pages, but I'll address those
seperately now that they have occurred to me.)
--
Ryan Anderson
sometimes Pug Majere
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] Use "-script" postfix for scripts
2005-08-13 22:25 ` Ryan Anderson
@ 2005-08-13 22:28 ` Petr Baudis
0 siblings, 0 replies; 9+ messages in thread
From: Petr Baudis @ 2005-08-13 22:28 UTC (permalink / raw
To: Ryan Anderson; +Cc: Junio C Hamano, Linus Torvalds, Johannes Schindelin, git
Dear diary, on Sun, Aug 14, 2005 at 12:25:12AM CEST, I got a letter
where Ryan Anderson <ryan@michonline.com> told me that...
> Honestly, I think the biggest argument against the "-script" suffix is
> related to man-page usage: It requires significant knowledge of the Git
> project to figure out what name variant to use to find the man page.
.oO(Hey, tcl has own man section as well!)
--
Petr "Pasky" Baudis
Stuff: http://pasky.or.cz/
If you want the holes in your knowledge showing up try teaching
someone. -- Alan Cox
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2005-08-13 22:28 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-08-12 13:28 [PATCH] Use "-script" postfix for scripts Johannes Schindelin
2005-08-12 15:32 ` Junio C Hamano
2005-08-12 16:00 ` Johannes Schindelin
2005-08-12 21:55 ` Linus Torvalds
2005-08-12 22:27 ` Ryan Anderson
2005-08-13 8:57 ` Junio C Hamano
2005-08-13 16:35 ` Linus Torvalds
2005-08-13 22:25 ` Ryan Anderson
2005-08-13 22:28 ` Petr Baudis
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
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 read-only IMAP folder(s) and NNTP newsgroup(s).