mirror of
https://github.com/wfxr/forgit.git
synced 2026-09-10 15:26:16 -04:00
style: apply editorconfig to git-forgit
This commit is contained in:
parent
4f68625a48
commit
25a88dbf1c
|
|
@ -169,7 +169,7 @@ _forgit_list_files() {
|
|||
# unquoted.
|
||||
# uniq is necessary because unmerged files are printed once for each
|
||||
# merge conflict.
|
||||
# With the -z flag, git also uses \0 line termination, so we
|
||||
# With the -z flag, git also uses \0 line termination, so we
|
||||
# have to replace the terminators.
|
||||
git ls-files -z "$@" "$rootdir" | tr '\0' '\n' | uniq
|
||||
}
|
||||
|
|
@ -556,7 +556,7 @@ _forgit_cherry_pick() {
|
|||
[[ -z $1 ]] && echo "Please specify target branch" && return 1
|
||||
target="$1"
|
||||
|
||||
# in this function, we do something interesting to maintain proper ordering as it's assumed
|
||||
# in this function, we do something interesting to maintain proper ordering as it's assumed
|
||||
# you generally want to cherry pick oldest->newest when you multiselect
|
||||
# The instances of "cut", "nl" and "sort" all serve this purpose
|
||||
# Please see https://github.com/wfxr/forgit/issues/253 for more details
|
||||
|
|
@ -580,7 +580,7 @@ _forgit_cherry_pick() {
|
|||
commits+=("$commit")
|
||||
done < <(echo "$fzf_selection" | sort -n -k 1 | cut -f2 | cut -d' ' -f1 | _forgit_reverse_lines)
|
||||
[ ${#commits[@]} -eq 0 ] && return 1
|
||||
|
||||
|
||||
_forgit_cherry_pick_git_opts=()
|
||||
_forgit_parse_array _forgit_cherry_pick_git_opts "$FORGIT_CHERRY_PICK_GIT_OPTS"
|
||||
git cherry-pick "${_forgit_cherry_pick_git_opts[@]}" "${commits[@]}"
|
||||
|
|
@ -883,7 +883,7 @@ _forgit_revert_commit() {
|
|||
graph=()
|
||||
[[ $_forgit_log_graph_enable == true ]] && graph=(--graph)
|
||||
|
||||
# in this function, we do something interesting to maintain proper ordering as it's assumed
|
||||
# in this function, we do something interesting to maintain proper ordering as it's assumed
|
||||
# you generally want to revert newest->oldest when you multiselect
|
||||
# The instances of "cut", "nl" and "sort" all serve this purpose
|
||||
# Please see https://github.com/wfxr/forgit/issues/253 for more details
|
||||
|
|
@ -896,7 +896,7 @@ _forgit_revert_commit() {
|
|||
_forgit_emojify |
|
||||
nl |
|
||||
FZF_DEFAULT_OPTS="$opts" fzf |
|
||||
sort -n -k 1 |
|
||||
sort -n -k 1 |
|
||||
cut -f2- |
|
||||
sed 's/^[^a-f^0-9]*\([a-f0-9]*\).*/\1/')
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue