tnesbitt210 / interactive-smartlog-issues

9 stars 0 forks source link

Consider putting branch names between quotes when using git commands #10

Closed edlundin closed 1 month ago

edlundin commented 1 month ago

User Report:

Hello, I was trying this extension recently and came across this problem when using it with a repository that has branches with characters that would be interpreted by the shell.

This repository uses renovate, which generates branch name with parenthesis. Usually, a pair of simple quote around the branch name is enough to fix this.

e.g. git rev-parse refs/heads/renovate/dependencies-(non-major) -> git rev-parse 'refs/heads/renovate/dependencies-(non-major)'


Debug Info:

commitsError:

Error: Command failed: git rev-parse refs/heads/renovate/dependencies-(non-major)
/bin/sh: -c: line 0: syntax error near unexpected token `('
/bin/sh: -c: line 0: `git rev-parse refs/heads/renovate/dependencies-(non-major)'

    at ChildProcess.exithandler (node:child_process:423:12)
    at ChildProcess.emit (node:events:517:28)
    at ChildProcess.emit (node:domain:489:12)
    at maybeClose (node:internal/child_process:1098:16)
    at Socket.<anonymous> (node:internal/child_process:450:11)
    at Socket.emit (node:events:517:28)
    at Socket.emit (node:domain:489:12)
    at Pipe.<anonymous> (node:net:350:12)

commitTreesLength: 0

uncommittedChangesLength: 0

outputChannelContents:

Setup analytics, session:  c7fc5426-0936-430b-9d71-56fd7ec4132c1715677246729
Operating System: darwin 23.4.0
IGL Version: 0.1.9
Using cached repo info
[track] ClientConnection  
establish client connection for **REDACTED**
Using cached repo info
Fetching commits...
Error with executing git rev-parse refs/heads/renovate/dependencies-(non-major) from **REDACTED**: Error: Command failed: git rev-parse refs/heads/renovate/dependencies-(non-major)
/bin/sh: -c: line 0: syntax error near unexpected token `('
/bin/sh: -c: line 0: `git rev-parse refs/heads/renovate/dependencies-(non-major)'

Loading commits failure
[track] InitialFetchSmartlogCommits InitialFetchSmartlogCommitsError 
[error] InitialFetchSmartlogCommits InitialFetchSmartlogCommitsError Error: Command failed: git rev-parse refs/heads/renovate/dependencies-(non-major)
/bin/sh: -c: line 0: syntax error near unexpected token `('
/bin/sh: -c: line 0: `git rev-parse refs/heads/renovate/dependencies-(non-major)'

    at ChildProcess.exithandler (node:child_process:423:12)
    at ChildProcess.emit (node:events:517:28)
    at ChildProcess.emit (node:domain:489:12)
    at maybeClose (node:internal/child_process:1098:16)
    at Socket.<anonymous> (node:internal/child_process:450:11)
    at Socket.emit (node:events:517:28)
    at Socket.emit (node:domain:489:12)
    at Pipe.<anonymous> (node:net:350:12)
Sending commits to client
Fetching commits...
[track] TopLevelErrorShown CommitsFetchError 
[error] TopLevelErrorShown CommitsFetchError Error: Command failed: git rev-parse refs/heads/renovate/dependencies-(non-major)
/bin/sh: -c: line 0: syntax error near unexpected token `('
/bin/sh: -c: line 0: `git rev-parse refs/heads/renovate/dependencies-(non-major)'

    at ChildProcess.exithandler (node:child_process:423:12)
    at ChildProcess.emit (node:events:517:28)
    at ChildProcess.emit (node:domain:489:12)
    at maybeClose (node:internal/child_process:1098:16)
    at Socket.<anonymous> (node:internal/child_process:450:11)
    at Socket.emit (node:events:517:28)
    at Socket.emit (node:domain:489:12)
    at Pipe.<anonymous> (node:net:350:12)
Error with executing git rev-parse refs/heads/renovate/dependencies-(non-major) from **REDACTED**: Error: Command failed: git rev-parse refs/heads/renovate/dependencies-(non-major)
/bin/sh: -c: line 0: syntax error near unexpected token `('
/bin/sh: -c: line 0: `git rev-parse refs/heads/renovate/dependencies-(non-major)'

Loading commits failure
Sending commits to client
Fetching commits...
Error with executing git rev-parse refs/heads/renovate/dependencies-(non-major) from **REDACTED**: Error: Command failed: git rev-parse refs/heads/renovate/dependencies-(non-major)
/bin/sh: -c: line 0: syntax error near unexpected token `('
/bin/sh: -c: line 0: `git rev-parse refs/heads/renovate/dependencies-(non-major)'

Loading commits failure
Sending commits to client
Fetching commits...
Error with executing git rev-parse refs/heads/renovate/dependencies-(non-major) from **REDACTED**: Error: Command failed: git rev-parse refs/heads/renovate/dependencies-(non-major)
/bin/sh: -c: line 0: syntax error near unexpected token `('
/bin/sh: -c: line 0: `git rev-parse refs/heads/renovate/dependencies-(non-major)'

Loading commits failure
Sending commits to client
[track] FileABug  
Fetching commits...
Error with executing git rev-parse refs/heads/renovate/dependencies-(non-major) from **REDACTED**: Error: Command failed: git rev-parse refs/heads/renovate/dependencies-(non-major)
/bin/sh: -c: line 0: syntax error near unexpected token `('
/bin/sh: -c: line 0: `git rev-parse refs/heads/renovate/dependencies-(non-major)'

Loading commits failure
Sending commits to client
Fetching commits...
Error with executing git rev-parse refs/heads/renovate/dependencies-(non-major) from **REDACTED**: Error: Command failed: git rev-parse refs/heads/renovate/dependencies-(non-major)
/bin/sh: -c: line 0: syntax error near unexpected token `('
/bin/sh: -c: line 0: `git rev-parse refs/heads/renovate/dependencies-(non-major)'

Loading commits failure
Sending commits to client
[track] FileABug  
tnesbitt210 commented 1 month ago

Fixed in v0.1.11!