git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH 2/2] rebase -i: new option --name-rev

From
Dominique Quatravaux <domq@google.com>
Date
Mar 8, 2012, 11:57 UTC
Message-ID
<CAJh6GrFKJw1506c6nOzh+EcNe7E_UM=NxV_yBPWx9BUCdpAvAg@mail.gmail.com>
In-Reply-To
<87399jnyxh.fsf@thomas.inf.ethz.ch>
On Thu, Mar 8, 2012 at 11:56 AM, Thomas Rast <trast@inf.ethz.ch> wrote:
> 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.

[- gitster] Sorry about that, I skimmed Junio's "What's cooking in git.git (Mar 2012, #03; Mon, 5)" and I thought I was in the "high value/damage ratio" category.

> Hum.  I'm not sure yet if I find that very useful, since frequently the
> names will just be 'topic', 'topic~1', ...., 'topic~N'

Exactly, and when rebasing a branch with merges, the "foreign" commits will stick out which is what I want.

> The --no- version is implicitly always supported, see gitcli(1).
Do you mean I should omit it from the doc?
>> +configuration variable `rebase.interactivenamerev`, this option can be
>
> You should spell it in a more readable way such as
> rebase.interactiveNameRev.
Will do.
Show 10 quoted lines
>> -     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?

I fear that it would also substitute hashes on the right-hand side (in the commit messages), and also I would be piping data from and to git name-rev from the same process which is a recipe for deadlocks.

> In line with the --autosquash concern, please write a test that uses
> both option (and verifies that *both* work!).
Will do.
-- 
  Dominique Quatravaux
  +41 79 609 40 72
Previous: Thomas RastNext: Junio C Hamano
Message 4 of 18 in “rebase -i: optimize the creation of the todo file”
  1. 1/2 rebase -i: optimize the creation of the todo fileDominique Quatravaux, Mar 8, 2012
  2. 2/2 rebase -i: new option --name-revDominique Quatravaux, Mar 8, 2012
  3. Thomas RastMar 8, 2012
  4. Dominique QuatravauxMar 8, 2012
  5. Junio C HamanoMar 8, 2012
  6. Dominique QuatravauxMar 9, 2012
  7. Junio C HamanoMar 8, 2012
  8. Junio C HamanoMar 8, 2012
  9. Johannes SixtMar 9, 2012
  10. Dominique QuatravauxMar 9, 2012
  11. Junio C HamanoMar 9, 2012
  12. Thomas RastMar 8, 2012
  13. Dominique QuatravauxMar 8, 2012
  14. Thomas RastMar 8, 2012
  15. Johannes SixtMar 8, 2012
  16. Dominique QuatravauxMar 8, 2012
  17. Dominique QuatravauxMar 8, 2012
  18. Johannes SixtMar 8, 2012

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.