1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2025-10-23 04:30:24 +02:00

36913 + 36945: vcs_info quilt: Pass patch subject lines to gen-applied-string

The format used is '${patchname} ${subject}', which is analogous to the git backend.
This commit is contained in:
Daniel Shahaf 2015-10-21 05:11:59 +00:00
parent c62db9e7dc
commit 779b3112f8
2 changed files with 33 additions and 0 deletions

View file

@ -145,6 +145,36 @@ function VCS_INFO_quilt() {
unapplied=()
fi
if [[ -n $patches ]]; then
() {
local i line
for ((i=1; i<=$#applied; i++)); do
if [[ -f "$patches/$applied[$i]" ]] &&
read -r line < "$patches/$applied[$i]" &&
[[ $line != (#b)(---|Index:)* ]] &&
true
;
then
applied[$i]+=" $line"
else
applied[$i]+=" ?"
fi
done
for ((i=1; i<=$#unapplied; i++)); do
if [[ -f "$patches/$unapplied[$i]" ]] &&
read -r line < "$patches/$unapplied[$i]" &&
[[ $line != (#b)(---|Index:)* ]] &&
true
;
then
unapplied[$i]+=" $line"
else
unapplied[$i]+=" ?"
fi
done
}
fi
all=( ${(Oa)applied} ${unapplied} )
if VCS_INFO_hook 'gen-applied-string' "${applied[@]}"; then