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

Re: [PATCH v2] git-rebase--interactive.sh: add config option for custom instruction format

From
Mike Rappazzo <rappazzo@gmail.com>
Date
Jun 9, 2015, 10:26 UTC
Message-ID
<CANoM8SWngx-hCmNMJLZ6NhDzE=OSSH_UAd-8x7xCQZ58GzeJyw@mail.gmail.com>
In-Reply-To
<9a61f06b14f58a0bd2b687e2aef2b805@www.dscho.org>
I see your point, and I'll explore that avenue.

Personally, I like the idea that one could also use the short hash if the custom instruction started with "%h ", but I see the value in leaving the variable blank.

After running the tests with a custom format enabled, I did find that autosquash doesn't work, so I am working to correct that.

On Tue, Jun 9, 2015 at 5:36 AM, Johannes Schindelin <johannes.schindelin@gmx.de> wrote:

Show 30 quoted lines
> Hi,
>
> On 2015-06-08 23:00, Michael Rappazzo wrote:
>
>> diff --git a/git-rebase--interactive.sh b/git-rebase--interactive.sh
>> index dc3133f..b92375e 100644
>> --- a/git-rebase--interactive.sh
>> +++ b/git-rebase--interactive.sh
>> @@ -977,7 +977,9 @@ else
>>       revisions=$onto...$orig_head
>>       shortrevisions=$shorthead
>>  fi
>> -git rev-list $merges_option --pretty=oneline --reverse --left-right
>> --topo-order \
>> +format=$(git config --get rebase.instructionFormat)
>> +# the 'rev-list .. | sed' requires %m to parse; the instruction
>> requires %H to parse
>> +git rev-list $merges_option --format="%m%H ${format-%s}" --reverse
>> --left-right --topo-order \
>
> These two lines are too long (longer than 80 columns)...
>
> Besides, are you sure you don't want to substitute an empty 'rebase.instructionFormat' by '%s'? I would have expected to read `${format:-%s}` (note the colon), but then, this was Junio's suggestion... Junio, what do you think, should we not rather substitute empty values by `%s` as if the config setting was unset?
>
>>       $revisions ${restrict_revision+^$restrict_revision} | \
>>       sed -n "s/^>//p" |
>>  while read -r sha1 rest
>
> Ciao,
> Johannes
Previous: Johannes SchindelinNext: Junio C Hamano
Message 5 of 9 in “git-rebase--interactive.sh: add config option for custom instruction format”
  1. git-rebase--interactive.sh: add config option for custom instruction formatMichael Rappazzo, Jun 8, 2015
  2. git-rebase--interactive.sh: add config option for custom instruction formatMichael Rappazzo, Jun 8, 2015
  3. Junio C HamanoJun 8, 2015
  4. Johannes SchindelinJun 9, 2015
  5. Mike RappazzoJun 9, 2015
  6. Junio C HamanoJun 9, 2015
  7. Mike RappazzoJun 9, 2015
  8. Junio C HamanoJun 10, 2015
  9. Junio C HamanoJun 8, 2015

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.