Git development
 help / color / mirror / Atom feed
* [PATCH] git-rebase.sh: Unchain the git-COMMAND into git COMMAND
@ 2008-02-04 20:25 Jari Aalto
  2008-02-04 20:53 ` Johannes Schindelin
  0 siblings, 1 reply; 4+ messages in thread
From: Jari Aalto @ 2008-02-04 20:25 UTC (permalink / raw)
  To: git

Change the commadns to use new style 'git COMMAND', without the dash.
Use better syntax in output displayed to user that suggests to use
--continue|--abort commands.

Signed-off-by: Jari Aalto <jari.aalto AT cante.net>
---
 git-rebase.sh |   16 ++++++++--------
 1 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/git-rebase.sh b/git-rebase.sh
index bdcea0e..37ba8a8 100755
--- a/git-rebase.sh
+++ b/git-rebase.sh
@@ -21,7 +21,7 @@ Note that if <branch> is not specified on the command line, the
 currently checked out branch is used.  You must be in the top
 directory of your project to start (or continue) a rebase.
 
-Example:       git-rebase master~1 topic
+Example:       git rebase master~1 topic
 
         A---B---C topic                   A'\''--B'\''--C'\'' topic
        /                   -->           /
@@ -63,7 +63,7 @@ continue_merge () {
 	cmt=`cat "$dotest/current"`
 	if ! git diff-index --quiet HEAD --
 	then
-		if ! git-commit -C "$cmt"
+		if ! git commit -C "$cmt"
 		then
 			echo "Commit failed, please do not call \"git commit\""
 			echo "directly, but instead do one of the following: "
@@ -94,7 +94,7 @@ call_merge () {
 	eval GITHEAD_$cmt='"${cmt_name##refs/heads/}~$(($end - $msgnum))"'
 	eval GITHEAD_$hd='$(cat "$dotest/onto_name")'
 	export GITHEAD_$cmt GITHEAD_$hd
-	git-merge-$strategy "$cmt^" -- "$hd" "$cmt"
+	git merge-$strategy "$cmt^" -- "$hd" "$cmt"
 	rv=$?
 	case "$rv" in
 	0)
@@ -111,7 +111,7 @@ call_merge () {
 		;;
 	*)
 		die "Unknown exit code ($rv) from command:" \
-			"git-merge-$strategy $cmt^ -- HEAD $cmt"
+			"git merge-$strategy $cmt^ -- HEAD $cmt"
 		;;
 	esac
 }
@@ -279,7 +279,7 @@ else
 	if test -d "$dotest"
 	then
 		die "previous dotest directory $dotest still exists." \
-			'try git-rebase < --continue | --abort >'
+			'try git rebase {--continue|--abort}'
 	fi
 fi
 
@@ -315,7 +315,7 @@ fi
 case "$#" in
 2)
 	branch_name="$2"
-	git-checkout "$2" || usage
+	git checkout "$2" || usage
 	;;
 *)
 	if branch_name=`git symbolic-ref -q HEAD`
@@ -363,7 +363,7 @@ esac
 
 # Rewind the head to "$onto"; this saves our current head in ORIG_HEAD.
 echo "First, rewinding head to replay your work on top of it..."
-git-reset --hard "$onto"
+git reset --hard "$onto"
 
 # If the $onto is a proper descendant of the tip of the branch, then
 # we just fast forwarded.
@@ -387,7 +387,7 @@ then
 	exit $ret
 fi
 
-# start doing a rebase with git-merge
+# start doing a rebase with "git merge"
 # this is rename-aware if the recursive (default) strategy is used
 
 mkdir -p "$dotest"
-- 
1.5.4-rc5.GIT-dirty


-- 
Welcome to FOSS revolution: we fix and modify until it shines

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] git-rebase.sh: Unchain the git-COMMAND into git COMMAND
  2008-02-04 20:25 [PATCH] git-rebase.sh: Unchain the git-COMMAND into git COMMAND Jari Aalto
@ 2008-02-04 20:53 ` Johannes Schindelin
  2008-02-05 14:01   ` Jari Aalto
  0 siblings, 1 reply; 4+ messages in thread
From: Johannes Schindelin @ 2008-02-04 20:53 UTC (permalink / raw)
  To: Jari Aalto; +Cc: git

Hi,

On Mon, 4 Feb 2008, Jari Aalto wrote:

> -Example:       git-rebase master~1 topic
> +Example:       git rebase master~1 topic

>From 36e5e70e0f40cf7ca4351b8159d68f8560a2805f(Start deprecating 
"git-command" in favor of "git command"):

    (For non-builtins, the "git xyzzy" format implies an extra execve(), so
    this script leaves those alone).

Hth,
Dscho

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] git-rebase.sh: Unchain the git-COMMAND into git COMMAND
  2008-02-04 20:53 ` Johannes Schindelin
@ 2008-02-05 14:01   ` Jari Aalto
  2008-02-05 14:10     ` Johannes Schindelin
  0 siblings, 1 reply; 4+ messages in thread
From: Jari Aalto @ 2008-02-05 14:01 UTC (permalink / raw)
  To: git

* Mon 2008-02-04 Johannes Schindelin <Johannes.Schindelin@gmx.de>
* Message-Id: alpine.LSU.1.00.0802042050480.8543@racer.site
> Hi,
>
> On Mon, 4 Feb 2008, Jari Aalto wrote:
>
>> -Example:       git-rebase master~1 topic
>> +Example:       git rebase master~1 topic
>
> From 36e5e70e0f40cf7ca4351b8159d68f8560a2805f(Start deprecating 
> "git-command" in favor of "git command"):
>
>     (For non-builtins, the "git xyzzy" format implies an extra execve(), so
>     this script leaves those alone).

Please elaborate. I'm not sure I understand. If the git-<command> syntax
is being phased out, it should be consistent decision accross the tools.

Jari

-- 
Welcome to FOSS revolution: we fix and modify until it shines

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] git-rebase.sh: Unchain the git-COMMAND into git COMMAND
  2008-02-05 14:01   ` Jari Aalto
@ 2008-02-05 14:10     ` Johannes Schindelin
  0 siblings, 0 replies; 4+ messages in thread
From: Johannes Schindelin @ 2008-02-05 14:10 UTC (permalink / raw)
  To: Jari Aalto; +Cc: git

Hi,

On Tue, 5 Feb 2008, Jari Aalto wrote:

> * Mon 2008-02-04 Johannes Schindelin <Johannes.Schindelin@gmx.de>
> * Message-Id: alpine.LSU.1.00.0802042050480.8543@racer.site
> > Hi,
> >
> > On Mon, 4 Feb 2008, Jari Aalto wrote:
> >
> >> -Example:       git-rebase master~1 topic
> >> +Example:       git rebase master~1 topic
> >
> > From 36e5e70e0f40cf7ca4351b8159d68f8560a2805f(Start deprecating 
> > "git-command" in favor of "git command"):
> >
> >     (For non-builtins, the "git xyzzy" format implies an extra execve(), so
> >     this script leaves those alone).
> 
> Please elaborate. I'm not sure I understand. If the git-<command> syntax
> is being phased out, it should be consistent decision accross the tools.

If you call "git xyz", but git-xyz is a script, you will exec the git 
wrapper first, which will then exec git-xyz.  That is an unnecessary exec.

Since the places you touched are already in a git script (i.e. it was 
already called with PATH extended to git's libexec/ directory, if there is 
one), we can avoid that extra exec.

The git-<command> syntax _is_ phased out, but in several steps.  Let's not 
do the third step before the first, otherwise we'll trip.

Ciao,
Dscho

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2008-02-05 14:11 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-02-04 20:25 [PATCH] git-rebase.sh: Unchain the git-COMMAND into git COMMAND Jari Aalto
2008-02-04 20:53 ` Johannes Schindelin
2008-02-05 14:01   ` Jari Aalto
2008-02-05 14:10     ` Johannes Schindelin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox