Skip to content

Commit bfd652b

Browse files
committed
Trimmed raw responses
1 parent eeac09e commit bfd652b

File tree

6 files changed

+104
-54
lines changed

6 files changed

+104
-54
lines changed

.changeset/shy-carpets-agree.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'simple-git': minor
3+
---
4+
5+
Add a new configuration option to enable trimming white-space from the response to `git.raw`

simple-git/readme.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ const options: Partial<SimpleGitOptions> = {
6262
baseDir: process.cwd(),
6363
binary: 'git',
6464
maxConcurrentProcesses: 6,
65+
trimmed: false,
6566
};
6667

6768
// when setting all options in a single object
@@ -485,6 +486,9 @@ simpleGit(path).raw(commands, (err, result) => {
485486

486487
// using a var-args of strings and awaiting rather than using the callback
487488
const result = await simpleGit(path).raw(...commands);
489+
490+
// automatically trim trailing white-space in responses
491+
const result = await simpleGit(path, { trimmed: true }).raw(...commands);
488492
```
489493

490494
# Authentication

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy