All of lore.kernel.org
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Felipe Contreras <felipe.contreras@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: [PATCH 3/6] rebase: trivial style fixes
Date: Fri, 30 Aug 2013 20:49:27 -0700	[thread overview]
Message-ID: <xmqqbo4ewmd4.fsf@gitster.dls.corp.google.com> (raw)
In-Reply-To: <1377899810-1818-4-git-send-email-felipe.contreras@gmail.com> (Felipe Contreras's message of "Fri, 30 Aug 2013 16:56:47 -0500")

Felipe Contreras <felipe.contreras@gmail.com> writes:

> Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
> ---
>  git-rebase.sh | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/git-rebase.sh b/git-rebase.sh
> index 8d7659a..2c02853 100755
> --- a/git-rebase.sh
> +++ b/git-rebase.sh
> @@ -324,7 +324,7 @@ done
>  test $# -gt 2 && usage
>  
>  if test -n "$cmd" &&
> -   test "$interactive_rebase" != explicit
> +	test "$interactive_rebase" != explicit
>  then
>  	die "$(gettext "The --exec option must be used with the --interactive option")"
>  fi
> @@ -486,7 +486,7 @@ case "$#" in
>  	switch_to="$1"
>  
>  	if git show-ref --verify --quiet -- "refs/heads/$1" &&
> -	   orig_head=$(git rev-parse -q --verify "refs/heads/$1")
> +		orig_head=$(git rev-parse -q --verify "refs/heads/$1")
>  	then
>  		head_name="refs/heads/$1"
>  	elif orig_head=$(git rev-parse -q --verify "$1")

I am not sure about this change.  I do not personally have strong
preference on this, but it would be better to be consistent.

The style of the original we see above seems to be the one that is
consistently used in this file for conditionals that span multiple
lines.  That is, to align the beginning of subsequent lines with the
beginning of the conditional (i.e. the "g" in "git show-ref" on the
first line)---which happens to be in line with what we use in our C
sources, too.

I see there is one oddball in that file, though.

 git-rebase.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/git-rebase.sh b/git-rebase.sh
index 8d7659a..187793e 100755
--- a/git-rebase.sh
+++ b/git-rebase.sh
@@ -422,7 +422,7 @@ then
 	case "$#" in
 	0)
 		if ! upstream_name=$(git rev-parse --symbolic-full-name \
-			--verify -q @{upstream} 2>/dev/null)
+		   --verify -q @{upstream} 2>/dev/null)
 		then
 			. git-parse-remote
 			error_on_missing_default_upstream "rebase" "rebase" \

  reply	other threads:[~2013-08-31  3:49 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-30 21:56 [PATCH 0/6] Trivial cleanups and fixes Felipe Contreras
2013-08-30 21:56 ` [PATCH 1/6] reset: trivial refactoring Felipe Contreras
2013-08-31  3:36   ` Junio C Hamano
2013-08-30 21:56 ` [PATCH 2/6] branch: trivial style fix Felipe Contreras
2013-08-31  3:36   ` Junio C Hamano
2013-08-30 21:56 ` [PATCH 3/6] rebase: trivial style fixes Felipe Contreras
2013-08-31  3:49   ` Junio C Hamano [this message]
2013-08-30 21:56 ` [PATCH 4/6] reset: trivial style cleanup Felipe Contreras
2013-08-31  3:49   ` Junio C Hamano
2013-08-30 21:56 ` [PATCH 5/6] add: " Felipe Contreras
2013-08-31  3:37   ` Junio C Hamano
2013-08-30 21:56 ` [PATCH 6/6] pull: trivial cleanup Felipe Contreras
2013-08-31  3:58   ` Junio C Hamano
2013-08-31  7:56     ` Felipe Contreras
2013-08-31  8:10     ` [PATCH] branch: use $curr_branch_short more René Scharfe
2013-08-31  8:22       ` Felipe Contreras
2013-08-31  9:11         ` René Scharfe
2013-08-31  9:22           ` Felipe Contreras
2013-08-31 10:28             ` René Scharfe
2013-08-31 17:20               ` Felipe Contreras
2013-09-08 15:21                 ` René Scharfe
2013-09-08 23:13                   ` Felipe Contreras
2013-09-15 11:42                     ` René Scharfe
2013-09-15 13:02                       ` Felipe Contreras
2013-09-03 16:56         ` Junio C Hamano
2013-09-08 15:21       ` [PATCH] pull: " René Scharfe

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=xmqqbo4ewmd4.fsf@gitster.dls.corp.google.com \
    --to=gitster@pobox.com \
    --cc=felipe.contreras@gmail.com \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.