Skip to content

Conversation

jcouball
Copy link
Member

@jcouball jcouball commented Aug 23, 2022

Your checklist for this pull request

🚨Please review the guidelines for contributing to this repository.

  • Ensure all commits include DCO sign-off.
  • Ensure that your contributions pass unit testing.
  • Ensure that your contributions contain documentation if applicable.

Description

In the current implementation, all calls to git are done using backticks which has several disadvantages:

  • STDERR is not captured so can not be processed by this gem
  • STDERR is always passed through to the terminal
  • Changes to the environment's subprocess have to be global which could impact users of this gem
  • Arguments passed on the command line go through the system shell making it difficult to escape args correctly for all platforms AND leaving this gem open to security vulnerabilities

Desired Result

Implement a cross platform (Windows, Linux, and Mac) solution that can:

  • Independently capture STDOUT and STDERR
  • Stream STDOUT and STDERR to the terminal if needed for debugging
  • Provide a customized environment for the git command that does not impact users of this gem
  • Pass command line args to the git command without being interpreted by the system shell

@jcouball jcouball force-pushed the stderr_in_diff branch 14 times, most recently from 09bb364 to 19077ed Compare August 25, 2022 23:58
@jcouball jcouball force-pushed the stderr_in_diff branch 11 times, most recently from a5d8789 to a3c27d2 Compare December 16, 2022 16:42
@jcouball jcouball force-pushed the stderr_in_diff branch 3 times, most recently from 423ba23 to 1d827af Compare February 12, 2023 17:45
@jcouball jcouball changed the title Use Open3.capture2e instead of backticks for subprocesses Separately capture STDOUT and STDERR when calling subprocesses Feb 12, 2023
@jcouball jcouball changed the title Separately capture STDOUT and STDERR when calling subprocesses Change how the git CLI is run Feb 12, 2023
@jcouball jcouball changed the title Change how the git CLI is run Change how the git CLI subprocess is executed Feb 12, 2023
Signed-off-by: James Couball <jcouball@yahoo.com>
@jcouball
Copy link
Member Author

Closing in favor of #617

@jcouball jcouball closed this Feb 12, 2023
@jcouball jcouball deleted the stderr_in_diff branch February 16, 2023 16:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant
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