git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Johannes Sixt <j.sixt@viscovery.net>
To: Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org, Thomas Rast <trast@inf.ethz.ch>,
	Dominique Quatravaux <domq@google.com>
Subject: Re: [PATCH 2/2] rebase -i: new option --name-rev
Date: Fri, 09 Mar 2012 08:22:17 +0100	[thread overview]
Message-ID: <4F59AFA9.5030205@viscovery.net> (raw)
In-Reply-To: <7vipiebv1r.fsf@alter.siamese.dyndns.org>

Am 3/8/2012 23:13, schrieb Junio C Hamano:
> Junio C Hamano <gitster@pobox.com> writes:
> 
>> Thomas Rast <trast@inf.ethz.ch> writes:
>>
>>> 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.
>>
>> I think the only use case where this might be useful is when you
>> have totally undescriptive one-line description to your commits that
>> they alone do not help distinguishing the commits being picked, e.g.
>> ...
> 
> This may need a bit of clarification for readers from the future.
> If you _were_ somehow interactively rebasing changes made on two or
> more branches into a single branch, knowing which branch each commit
> came from may have value, even if your commit titles are descriptive
> enough.
> 
> Today's "git rebase -i" wouldn't do something like that, and we will
> not know how the user would interact with such a yet-to-be-written
> tool, so it is too early to judge if using "topic~1" is the desired
> improvement or not at this point.

Yet-to-be-written? Rebase -i happily linearizes mergy history, so this
does have some merits even today.

I do share your concerns that naming to-be-rebased commits with a relative
specifier such as "topic~1" could be dangerous. However, this is a problem
only when the rebase -i is not completed timely, so that you have
sufficient time to mess with the ref "topic" from a different terminal.
You would have to run "git branch -f", "git fetch", or "git push" (the
latter could even happen from remote) that involve the ref name. Can't we
just declare this as "don't do that then"? (We do say this more often than
not since recently :-)

-- Hannes

  reply	other threads:[~2012-03-09  7:22 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
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 [this message]
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

  List information: http://vger.kernel.org/majordomo-info.html

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

  git send-email \
    --in-reply-to=4F59AFA9.5030205@viscovery.net \
    --to=j.sixt@viscovery.net \
    --cc=domq@google.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=trast@inf.ethz.ch \
    /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.
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).