Use git fetch -fu origin +$branch:$branch to fetch all changes for branch.

[?]
Apr 26, 2012, 6:36 AM
7XC62UTYVNK6T7V6BYQKQHSO2OTHX5GUVLCDMK7DY46CWGLVT73QC

Dependencies

  • [2] LHE3XCRR remove origin from git pull call, to get rid of fatal: fetch --all does not take a repository argument error
  • [3] KJ5JMWXY In case of deep clone, make sure there is local branch.
  • [4] BMSQD2ZH Indentation
  • [5] C7CXMZ66 hydra: do not perform git clone every time. in stead work on local clone and pull
  • [6] HE3GX5IP Optimize fetch-git.
  • [*] OOQ2D3KC * Refactoring: move fetchInput out of hydra_scheduler into a separate

Change contents

  • replacement in src/lib/Hydra/Helper/AddBuilds.pm at line 339
    [4.380][4.380:674](),[4.674][2.0:59](),[2.59][4.743:832](),[4.743][4.743:832](),[4.832][3.0:262](),[3.262][4.832:1289](),[4.832][4.832:1289]()
    if (defined $deepClone) {
    # This fetch every branches from the remote repository and create a
    # local branch for each heads of the remote repository. This is
    # necessary to provide a working git-describe.
    ($res, $stdout, $stderr) = captureStdoutStderr(600,
    ("git", "pull", "--ff-only", "-fu", "--all"));
    die "Error pulling latest change from git repo at `$uri':\n$stderr" unless $res;
    # Make sure there is a local branch
    ($res, $stdout, $stderr) = captureStdoutStderr(600,
    ("git", "checkout", "-f", $branch));
    die "Error making local branch $branch in $clonePath from git repo at `$uri':\n$stderr" unless $res;
    } else {
    # This command force the update of the local branch to be in the same as
    # the remote branch for whatever the repository state is. This command mirror
    # only one branch of the remote repository.
    ($res, $stdout, $stderr) = captureStdoutStderr(600,
    ("git", "fetch", "-fu", "origin", "+$branch:$branch"));
    die "Error fetching latest change from git repo at `$uri':\n$stderr" unless $res;
    }
    [4.380]
    [4.563]
    # This command force the update of the local branch to be in the same as
    # the remote branch for whatever the repository state is. This command mirror
    # only one branch of the remote repository.
    ($res, $stdout, $stderr) = captureStdoutStderr(600,
    ("git", "fetch", "-fu", "origin", "+$branch:$branch"));
    die "Error fetching latest change from git repo at `$uri':\n$stderr" unless $res;