Browse Source

use hexcode for spaces in format arg (#517)

main
Alexey Svetliakov 6 years ago
committed by Eric Amodio
parent
commit
98e6ce4ca4
1 changed files with 11 additions and 10 deletions
  1. +11
    -10
      src/git/git.ts

+ 11
- 10
src/git/git.ts View File

@ -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}`,

Loading…
Cancel
Save