Returning more information in FetchResult
envgap__steveukx__git-js-823
01 / FAILURE SIGNATURE
As reported upstream
No identifying execution failure has been captured.
Not a benchmark task.
- In a clean container the reported failure did not reproduce, or the known fix did not make the project run.
02 / ENVIRONMENT RECIPE
- Base commit
fc10fbe1cba2dedfccd8e5507b61fc979addb252- Manifest
simple-git/package.json- Reproduce
Awaiting issue-specific recipe- Run under trace
Awaiting a meaningful runtime command
03 / ORIGINAL ISSUE TEXT
steveukx/git-js #823 · read the original issue
What are your thoughts on adding more information to `FetchResult`?
I'd like to know the updated branches and especially deleted branches.
Currently I can get this via `outputHandler()`, but it's messy since I can't return a result through.
Are you open to a PR that adds these fields? Are they deliberately elided (or non-standard between servers)?
### Possible format for `FetchResult`
```
export interface FetchResult {
raw: string
remote: string | null
branches: {
name: string
tracking: string
}[]
tags: {
name: string
tracking: string
}[]
updated: {
name: string
tracking: string
to: string
from: string
}[]
deleted: {
tracking: string
}[]
}
```
### LineParsers
```
new LineParser(/- \[deleted]\s+\S+\s*-> (.+)$/, (result, [tracking]) => {
result.deleted.push({
tracking,
})
}),
new LineParser(/\s*([^.]+)\.\.(\S+)\s+(\S+)\s*-> (.+)$/, (result, [to, from, name, tracking]) => {
result.updated.push({
name,
tracking,
to,
from,
})
}),
```04 / LABELS
Labels from the report text only; not yet run
No supported category has been assigned.
Label rules and the text that matched
[]