Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Execute native git commands directly #48

Merged
21 commits merged into from
Dec 23, 2010
Merged

Execute native git commands directly #48

21 commits merged into from
Dec 23, 2010

Commits on Dec 9, 2010

  1. locate git_binary on PATH at boot

    Avoids starting a /bin/sh and /usr/bin/env process on each
    native command invocation, and will allow exec'ing the
    command directly.
    rtomayko committed Dec 9, 2010
    Configuration menu
    Copy the full SHA
    2296c23 View commit details
    Browse the repository at this point in the history
  2. avoid /bin/sh + escaping; exec git commands directly

    This removes some overhead from all native git calls in the
    following ways:
    
     - Removes a fork previously performed by Open3, which double
       forks to avoid needing to Process::wait.
     - Removes the need to shell escape arguments, since the git
       process's argv is passed explicitly as an array.
     - Removes the /bin/sh process (1 fork/exec)
    
    Additionally, these changes allow obtaining the git process's exit
    status, available as $? after any native git command invocations.
    rtomayko committed Dec 9, 2010
    Configuration menu
    Copy the full SHA
    1cfcc1b View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    ce31d0d View commit details
    Browse the repository at this point in the history

Commits on Dec 10, 2010

  1. Configuration menu
    Copy the full SHA
    96f604c View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    889adf5 View commit details
    Browse the repository at this point in the history

Commits on Dec 12, 2010

  1. Configuration menu
    Copy the full SHA
    f955066 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    3f4efb2 View commit details
    Browse the repository at this point in the history

Commits on Dec 15, 2010

  1. Configuration menu
    Copy the full SHA
    a3d63a6 View commit details
    Browse the repository at this point in the history

Commits on Dec 19, 2010

  1. Configuration menu
    Copy the full SHA
    2fb7d5d View commit details
    Browse the repository at this point in the history
  2. Repo#batch uses new input option instead of block

    This is mostly so it works over RPC.
    rtomayko committed Dec 19, 2010
    Configuration menu
    Copy the full SHA
    df91441 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    c8306fe View commit details
    Browse the repository at this point in the history
  4. refactor new exec logic into Grit::Process class

    Pretty awesome. And the select(2) based implementation will fix a
    long-standing bug where the grit process will hang when a git
    process writes more than PIPE_BUF bytes to stderr or when the input
    written to the git process's stdin exceeds PIPE_BUF. The old popen3
    based logic writes all of stdin, then reads all of stdout, then
    reads all of stderr so everything except stdout had to come in under
    PIPE_BUF. This hasn't been much of an issue but is critical to our
    plans on using `git cat-file --batch' and writing a bunch of SHA1s
    on stdin.
    
    Also moving toward using a common spawn method interface that's a
    compatible subset of the Process.spawn method built into Ruby >=
    1.9.1. The hope is that most non-MRI platforms will eventually
    support Process.spawn out of the box and the ones that don't have
    backports.
    rtomayko committed Dec 19, 2010
    Configuration menu
    Copy the full SHA
    2854f04 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    6a9b7f4 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    00da68d View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    95efc13 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    7dd3d35 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    0b98a12 View commit details
    Browse the repository at this point in the history

Commits on Dec 20, 2010

  1. fix bad signal arity

    rtomayko committed Dec 20, 2010
    Configuration menu
    Copy the full SHA
    b43357b View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    5cdf67c View commit details
    Browse the repository at this point in the history

Commits on Dec 21, 2010

  1. Configuration menu
    Copy the full SHA
    3ed77eb View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    aa0e169 View commit details
    Browse the repository at this point in the history