GitDownloadStrategy optimization

The current series of fetch invocations in GitDownloadStrategy has the
unfortunate behavior of fetching full history even in shallow clones
that only need the history between the clone point and the remote HEAD.
It should be possible to determine if it is actually necessary to fetch
the full history, including all tags, and if it is not to avoid this
overhead.

Fixes Homebrew/homebrew#11958, and several other recurring problems.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
master
Jack Nagel 2012-04-23 20:21:12 -05:00
parent 9742e72446
commit 348fa749f3
3 changed files with 4 additions and 4 deletions

View File

@ -5,13 +5,13 @@ class GitMultipush < Formula
url 'http://git-multipush.googlecode.com/files/git-multipush-2.3.tar.bz2'
sha1 'a53f171af5e794afe9b1de6ccd9bd0661db6fd91'
head 'https://github.com/gavinbeatty/git-multipush.git', :sha => 'HEAD'
head 'https://github.com/gavinbeatty/git-multipush.git', :revision => 'HEAD'
depends_on 'asciidoc' => :build if ARGV.build_head?
def install
if ARGV.build_head?
ENV['GIT_DIR'] = cached_location/'.git'
ENV['GIT_DIR'] = cached_download/'.git'
inreplace 'make/gen-version.mk', '.git', '$(GIT_DIR)'
system "make"
end

View File

@ -3,7 +3,7 @@ require 'formula'
class ReattachToUserNamespace < Formula
head 'https://github.com/ChrisJohnsen/tmux-MacOSX-pasteboard.git'
homepage 'https://github.com/ChrisJohnsen/tmux-MacOSX-pasteboard'
url 'https://github.com/ChrisJohnsen/tmux-MacOSX-pasteboard.git', :tag => 'dadea0aa48259c704d0b412b9588de2f5623e323'
url 'https://github.com/ChrisJohnsen/tmux-MacOSX-pasteboard.git', :revision => 'dadea0aa48259c704d0b412b9588de2f5623e323'
version 'dadea0'
def options

View File

@ -2,7 +2,7 @@ require 'formula'
class Topgit < Formula
homepage 'http://repo.or.cz/w/topgit.git'
url 'git://repo.or.cz/topgit.git', :tag => '1744aca50f3d7b6b4863523207e5010e112dfb85'
url 'git://repo.or.cz/topgit.git', :revision => '1744aca50f3d7b6b4863523207e5010e112dfb85'
version '0.8'
def install