git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Thomas Rast <trast@inf.ethz.ch>
To: Dominique Quatravaux <domq@google.com>
Cc: <gitster@pobox.com>, <git@vger.kernel.org>
Subject: Re: [PATCH 2/2] rebase -i: new option --name-rev
Date: Thu, 8 Mar 2012 11:56:42 +0100	[thread overview]
Message-ID: <87399jnyxh.fsf@thomas.inf.ethz.ch> (raw)
In-Reply-To: <1331203358-28277-2-git-send-email-domq@google.com> (Dominique Quatravaux's message of "Thu, 8 Mar 2012 11:42:38 +0100")

On a general note: you are submitting a completely new feature touching
a heavily-used tool (and code path) during -rc0 time.  As a rule of
thumb: Don't do that.  If you do it, don't Cc Junio unless it's his area
of code.

Dominique Quatravaux <domq@google.com> writes:

> If set, the second column of the rebase todo contains named revisions (obtained
> with git name-rev) instead of short SHA1s.

Hum.  I'm not sure yet if I find that very useful, since frequently the
names will just be 'topic', 'topic~1', ...., 'topic~N' if you are
rebasing a topic with N+1 commits not in master.  But you might, so who
am I to judge.

> +--name-rev::
> +--no-name-rev::

The --no- version is implicitly always supported, see gitcli(1).

> +configuration variable `rebase.interactivenamerev`, this option can be

You should spell it in a more readable way such as
rebase.interactiveNameRev.  The config machinery internally downcases
everything so the cosmetics won't prevent it from working.

> -	shortsha1=$(echo $sha1 | cut -c1-7)
> +	if test t = "$name_rev"
> +	then
> +		rev="$(git name-rev $sha1 | cut -d\  -f2)"
> +	else
> +		rev=$(echo $sha1 | cut -c1-7)
> +	fi

In the spirit of your previous patch, wouldn't it be faster to run 'git
name-rev --stdin' within the pipeline?

How does this interact with --autosquash?

> +test_expect_success 'Symbolic revisions in --name-rev' '
> +	exec > debug.log 2>&1 &&
> +	FAKE_LINES="exec_cp_.git/rebase-merge/git-rebase-todo_rebase-todo 1 2" git rebase -i --name-rev HEAD~2 &&
> +	test_cmp expect-rebase-todo rebase-todo
> +'

In line with the --autosquash concern, please write a test that uses
both option (and verifies that *both* work!).

-- 
Thomas Rast
trast@{inf,student}.ethz.ch

  reply	other threads:[~2012-03-08 10:56 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-08 10:42 [PATCH 1/2] rebase -i: optimize the creation of the todo file Dominique Quatravaux
2012-03-08 10:42 ` [PATCH 2/2] rebase -i: new option --name-rev Dominique Quatravaux
2012-03-08 10:56   ` Thomas Rast [this message]
2012-03-08 11:57     ` Dominique Quatravaux
2012-03-08 18:58       ` Junio C Hamano
2012-03-09  7:58         ` Dominique Quatravaux
2012-03-08 19:08     ` Junio C Hamano
2012-03-08 22:13       ` Junio C Hamano
2012-03-09  7:22         ` Johannes Sixt
2012-03-09  9:04           ` Dominique Quatravaux
2012-03-09  9:45             ` Junio C Hamano
2012-03-08 10:48 ` [PATCH 1/2] rebase -i: optimize the creation of the todo file Thomas Rast
2012-03-08 11:48   ` Dominique Quatravaux
2012-03-08 11:55     ` Thomas Rast
2012-03-08 11:20 ` Johannes Sixt
2012-03-08 11:36   ` Dominique Quatravaux
2012-03-08 11:41     ` Dominique Quatravaux
2012-03-08 11:51       ` Johannes Sixt

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=87399jnyxh.fsf@thomas.inf.ethz.ch \
    --to=trast@inf.ethz.ch \
    --cc=domq@google.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    /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 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).