Skip to content

GitLens rebase-todo editor is dearly missing changed files list per commit #5006

@AnrDaemon

Description

@AnrDaemon

Description

The behavior should be analogous to this rebase-editor script:

#!/bin/sh

_tmp="$(mktemp --tmpdir -- git-rebase-todo.XXXXXX )"
_editor="$(git config core.editor)"

cp "$1" "$_tmp"

git show "--pretty=format:pick %h %s" --name-only \
    $( sed -Ee '/^pick/s/^pick (\<[^[:space:]]+\>).*$/\1/; t; d;' "$_tmp" ) | \
    sed -Ee '/^$/d; /^pick/b; s/^/# /;' > "$1"
grep -vE "^pick" "$_tmp" >> "$1"

rm "$_tmp"
"${_editor?-${GIT_EDITOR:?Please define GIT_EDITOR env.var.}}" "$1"

With the result like

pick 0d5d53b Tweaked init sequence
# config-console.php
# init.php
pick ecaed11 Added configuration test and notification
# auth.php

# Rebase 21c46e1..ecaed11 onto 21c46e1 (2 commands)
#
# Commands:
# …

The script is actually lightling-fast, with nearly constant speed over any list of commits.

Metadata

Metadata

Assignees

No one assigned

    Labels

    triageNeeds to be looked at

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions