Use sequence.editor to control the rebase -i editor without changing the commit / reword editor
This commit is contained in:
parent
ec844189f5
commit
3d2a2f2ba6
|
@ -8,3 +8,9 @@ git-rebasei
|
|||
===========
|
||||
|
||||
A small wrapper around git rebase -i to show commits in the same order and with the same information as git log --oneline --decorate
|
||||
|
||||
To enable:
|
||||
|
||||
git config --global sequence.editor git-rebasei-editor
|
||||
|
||||
and make sure that `git-rebasei-editor` is in your `$PATH`
|
|
@ -1,2 +1,2 @@
|
|||
[alias]
|
||||
rebasei = "!git-rebasei"
|
||||
[sequence]
|
||||
editor = git-rebasei-editor
|
||||
|
|
|
@ -1,3 +0,0 @@
|
|||
#!/bin/bash
|
||||
|
||||
GIT_REBASE_I_EDITOR="${EDITOR:-editor}" EDITOR="git-rebasei-editor" git rebase -i "$@"
|
|
@ -1,13 +1,7 @@
|
|||
#!/bin/bash
|
||||
|
||||
export EDITOR="$GIT_REBASE_I_EDITOR"
|
||||
|
||||
tempfile="$(tempfile)"
|
||||
|
||||
if ! (cat "$1" | grep -q "Rebase .* onto .* (.* command(s))"); then
|
||||
exec editor "$@"
|
||||
fi
|
||||
|
||||
# how can I get the --graph with only the desired commits?
|
||||
|
||||
cat "$1" \
|
||||
|
@ -24,6 +18,8 @@ echo >> "$tempfile"
|
|||
echo "# Originial git rebase -i data:" >> "$tempfile"
|
||||
cat "$1" | sed -e 's/^/#/' >> "$tempfile"
|
||||
|
||||
echo "# GIT file: $1" >> "$tempfile"
|
||||
|
||||
editor "$tempfile"
|
||||
|
||||
# p, pick
|
||||
|
|
Loading…
Reference in New Issue
Block a user