Skip to content

Commit

Permalink
auto merge of rust-lang#101 : alexcrichton/cargo/fix-git-1.7, r=wycats
Browse files Browse the repository at this point in the history
Apparently these versions of git are broken for `git fetch $url`, so we have to
resort to `git fetch origin` and then just pray that it hasn't changed in the
meantime.
  • Loading branch information
bors committed Jul 1, 2014
2 parents 55d48e1 + d4cc40a commit 4cffb55
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions src/cargo/sources/git/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -265,12 +265,18 @@ impl GitCheckout {
// --tags on 1.9. For simplicity, we execute with and without --tags for
// all gits.
//
// FIXME: This is suspicious. I have been informated that, for example,
// FIXME: This is suspicious. I have been informed that, for example,
// bundler does not do this, yet bundler appears to work!
git!(self.location, "fetch --force --quiet {}",
self.get_source().display());
git!(self.location, "fetch --force --quiet --tags {}",
self.get_source().display());
//
// And to continue the fun, git before 1.7.3 had the fun bug that if a
// branch was tracking a remote, then `git fetch $url` doesn't work!
//
// For details, see
// https://www.kernel.org/pub/software/scm/git/docs/RelNotes-1.7.3.txt
//
// In this case we just use `origin` here instead of the database path.
git!(self.location, "fetch --force --quiet origin");
git!(self.location, "fetch --force --quiet --tags origin");
try!(self.reset(self.revision.as_slice()));
Ok(())
}
Expand Down

0 comments on commit 4cffb55

Please sign in to comment.