diff options
author | Axel Beckert <abe@deuxchevaux.org> | 2016-12-06 21:51:35 +0100 |
---|---|---|
committer | Axel Beckert <abe@deuxchevaux.org> | 2016-12-06 21:51:35 +0100 |
commit | e631e433ac7afacf9f756f2bc0dec47fa5930a24 (patch) | |
tree | 9d67e40f2c33ad956c063f1356dbd226cf649850 /Functions | |
parent | f6ab748f518e7fa542f3a7bef311c698a45b1fef (diff) | |
parent | 9f605904dda106c181717877f29261782fbf243d (diff) | |
download | zsh-e631e433ac7afacf9f756f2bc0dec47fa5930a24.tar.gz zsh-e631e433ac7afacf9f756f2bc0dec47fa5930a24.zip |
Merge tag 'zsh-5.2-test-2' into debian
Second test version before 5.3
Diffstat (limited to 'Functions')
-rw-r--r-- | Functions/VCS_Info/Backends/VCS_INFO_get_data_git | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/Functions/VCS_Info/Backends/VCS_INFO_get_data_git b/Functions/VCS_Info/Backends/VCS_INFO_get_data_git index 18ba89a9a..65d8cb182 100644 --- a/Functions/VCS_Info/Backends/VCS_INFO_get_data_git +++ b/Functions/VCS_Info/Backends/VCS_INFO_get_data_git @@ -232,10 +232,19 @@ elif [[ -d "${gitdir}/rebase-apply" ]]; then local cur=$(< $next) local p subject for ((p = 1; p < cur; p++)); do - git_patches_applied+=("$(printf "%04d" $p) ?") + printf -v "git_patches_applied[$p]" "%04d ?" "$p" done if [[ -f "${patchdir}/msg-clean" ]]; then subject="${$(< "${patchdir}/msg-clean")[(f)1]}" + elif local this_patch_file + printf -v this_patch_file "%s/%04d" "${patchdir}" "${cur}" + [[ -f $this_patch_file ]] + then + () { + local REPLY + VCS_INFO_patch2subject "${this_patch_file}" + subject=$REPLY + } fi if [[ -f "${patchdir}/original-commit" ]]; then if [[ -n $subject ]]; then @@ -261,6 +270,7 @@ elif [[ -f "${gitdir}/MERGE_HEAD" ]]; then # This is 'git merge --no-commit' local -a heads=( ${(@f)"$(<"${gitdir}/MERGE_HEAD")"} ) local subject; + # TODO: maybe read up to the first blank line IFS='' read -r subject < "${gitdir}/MERGE_MSG" # $subject is the subject line of the would-be commit # Maybe we can get the subject lines of MERGE_HEAD's commits cheaply? @@ -286,6 +296,7 @@ elif [[ -f "${gitdir}/CHERRY_PICK_HEAD" ]]; then # ### be "1". The %u/%c tuple will assume the values [(1,2), (1,1), (1,0)], # ### whereas the correct sequence would be [(1,2), (2,1), (3,0)]. local subject + # TODO: maybe read up to the first blank line IFS='' read -r subject < "${gitdir}/MERGE_MSG" git_patches_applied=( "$(<${gitdir}/CHERRY_PICK_HEAD) ${subject}" ) if [[ -f "${gitdir}/sequencer/todo" ]]; then |