Bläddra i källkod

use hexcode for spaces in format arg (#517)

main
Alexey Svetliakov 6 år sedan
committed by Eric Amodio
förälder
incheckning
98e6ce4ca4
1 ändrade filer med 11 tillägg och 10 borttagningar
  1. +11
    -10
      src/git/git.ts

+ 11
- 10
src/git/git.ts Visa fil

@ -18,15 +18,16 @@ const defaultBlameParams = ['blame', '--root', '--incremental'];
const lb = '%x3c'; // `%x${'<'.charCodeAt(0).toString(16)}`;
const rb = '%x3e'; // `%x${'>'.charCodeAt(0).toString(16)}`;
const sl = '%x2f'; // `%x${'/'.charCodeAt(0).toString(16)}`;
const sp = '%x20'; // `%x${' '.charCodeAt(0).toString(16)}`;
const logFormat = [
`${lb}${sl}f${rb}`,
`${lb}r${rb} %H`, // ref
`${lb}a${rb} %aN`, // author
`${lb}e${rb} %aE`, // email
`${lb}d${rb} %at`, // date
`${lb}c${rb} %ct`, // committed date
`${lb}p${rb} %P`, // parents
`${lb}r${rb}${sp}%H`, // ref
`${lb}a${rb}${sp}%aN`, // author
`${lb}e${rb}${sp}%aE`, // email
`${lb}d${rb}${sp}%at`, // date
`${lb}c${rb}${sp}%ct`, // committed date
`${lb}p${rb}${sp}%P`, // parents
`${lb}s${rb}`,
`%B`, // summary
`${lb}${sl}s${rb}`,
@ -37,10 +38,10 @@ const defaultLogParams = ['log', '--name-status', `--format=${logFormat}`];
const stashFormat = [
`${lb}${sl}f${rb}`,
`${lb}r${rb} %H`, // ref
`${lb}d${rb} %at`, // date
`${lb}c${rb} %ct`, // committed date
`${lb}l${rb} %gd`, // reflog-selector
`${lb}r${rb}${sp}%H`, // ref
`${lb}d${rb}${sp}%at`, // date
`${lb}c${rb}${sp}%ct`, // committed date
`${lb}l${rb}${sp}%gd`, // reflog-selector
`${lb}s${rb}`,
`%B`, // summary
`${lb}${sl}s${rb}`,

Laddar…
Avbryt
Spara