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

brew tap does full (not shallow) clone #7050

Closed
3 tasks done
dankessler opened this issue Feb 19, 2020 · 1 comment · Fixed by #7053
Closed
3 tasks done

brew tap does full (not shallow) clone #7050

dankessler opened this issue Feb 19, 2020 · 1 comment · Fixed by #7053
Labels
outdated PR was locked due to age

Comments

@dankessler
Copy link
Contributor

dankessler commented Feb 19, 2020

Please note we will close your issue without comment if you delete, do not read or do not fill out the issue checklist below and provide ALL the requested information. If you repeatedly fail to use the issue template, we will block you from ever submitting issues to Homebrew again.

  • ran brew update and can still reproduce the problem?
  • ran brew doctor, fixed all issues and can still reproduce the problem?
  • ran brew config and brew doctor and included their output with your issue?

What you were trying to do (and why)

I wanted to tap my fork of homebrew-core so I ran brew tap dankessler/core.

What happened (include command output)

It successfully tapped it, but it appears that it did not do a shallow clone. It received 600,000+ objects and took several minutes to resolve all deltas. If I run cd $(brew --repo) and then cd Library/Taps/dankessler/homebrew-core and look at git log I can see the history going back 11 years; clearly not a shallow clone.

Command output

==> Tapping dankessler/core
Cloning into '/usr/local/Homebrew/Library/Taps/dankessler/homebrew-core'...
remote: Enumerating objects: 675694, done.
remote: Total 675694 (delta 0), reused 0 (delta 0), pack-reused 675694
Receiving objects: 100% (675694/675694), 274.21 MiB | 13.73 MiB/s, done.
Resolving deltas: 100% (442115/442115), done.
Updating files: 100% (5129/5129), done.

What you expected to happen

I expected the cloned tap to be shallow (as described in man brew documentation).

I seem to now get a full clone with anything I tap now. Taps that I tapped a while ago (last month-ish or more) are indeed shallow clones (I can see that the root commit is a graft).

Step-by-step reproduction instructions (by running brew commands)

  1. brew tap dankessler/core

At this point, one can inspect the cloned tap and verify that it is not shallow. I'm not passing any other options (certainly not --full) and it doesn't seem like there's an option I can pass to explicitly make it shallow.

I had a friend reproduce this on his MacBook Air (I'm running a MBP) and he had the same behavior.

Output of brew config and brew doctor commands

brew doctor gives me some noise, but it's expected because I've installed the R cask and this is documented

Please note that these warnings are just used to help the Homebrew maintainers
with debugging if you file an issue. If everything you use Homebrew for is
working fine: please don't worry or file an issue; just ignore this. Thanks!

Warning: Unbrewed dylibs were found in /usr/local/lib.
If you didn't put them there on purpose they could cause problems when
building Homebrew formulae, and may need to be deleted.

Unexpected dylibs:
  /usr/local/lib/libtcl8.6.dylib
  /usr/local/lib/libtk8.6.dylib

Warning: Unbrewed header files were found in /usr/local/include.
If you didn't put them there on purpose they could cause problems when
building Homebrew formulae, and may need to be deleted.

Unexpected header files:
  /usr/local/include/fakemysql.h
  /usr/local/include/fakepq.h
  /usr/local/include/fakesql.h
  /usr/local/include/itcl.h
  /usr/local/include/itcl2TclOO.h
  /usr/local/include/itclDecls.h
  /usr/local/include/itclInt.h
  /usr/local/include/itclIntDecls.h
  /usr/local/include/itclMigrate2TclCore.h
  /usr/local/include/itclTclIntStubsFcn.h
  /usr/local/include/mysqlStubs.h
  /usr/local/include/odbcStubs.h
  /usr/local/include/pqStubs.h
  /usr/local/include/tcl.h
  /usr/local/include/tclDecls.h
  /usr/local/include/tclOO.h
  /usr/local/include/tclOODecls.h
  /usr/local/include/tclPlatDecls.h
  /usr/local/include/tclThread.h
  /usr/local/include/tclTomMath.h
  /usr/local/include/tclTomMathDecls.h
  /usr/local/include/tdbc.h
  /usr/local/include/tdbcDecls.h
  /usr/local/include/tdbcInt.h
  /usr/local/include/tk.h
  /usr/local/include/tkDecls.h
  /usr/local/include/tkPlatDecls.h

Warning: Unbrewed .pc files were found in /usr/local/lib/pkgconfig.
If you didn't put them there on purpose they could cause problems when
building Homebrew formulae, and may need to be deleted.

Unexpected .pc files:
  /usr/local/lib/pkgconfig/tcl.pc
  /usr/local/lib/pkgconfig/tk.pc

Warning: Unbrewed static libraries were found in /usr/local/lib.
If you didn't put them there on purpose they could cause problems when
building Homebrew formulae, and may need to be deleted.

Unexpected static libraries:
  /usr/local/lib/libtclstub8.6.a
  /usr/local/lib/libtkstub8.6.a

and here is output for brew config

HOMEBREW_VERSION: 2.2.6-6-ge7130bf
ORIGIN: https://github.com/Homebrew/brew
HEAD: e7130bfc2679cb75e57f87e88bd13e7c0ebe3192
Last commit: 12 hours ago
Core tap ORIGIN: https://github.com/Homebrew/homebrew-core
Core tap HEAD: b752a6dd06757d71c778905df1ae838cd07d2fcc
Core tap last commit: 15 minutes ago
HOMEBREW_PREFIX: /usr/local
HOMEBREW_DEV_CMD_RUN: 1
CPU: quad-core 64-bit skylake
Homebrew Ruby: 2.6.3 => /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/bin/ruby
Clang: 11.0 build 1100
Git: 2.25.0 => /usr/local/bin/git
Curl: 7.64.1 => /usr/bin/curl
macOS: 10.15.3-x86_64
CLT: 11.3.1.0.1.1576735732
Xcode: 11.3.1
XQuartz: 2.7.11 => /opt/X11
@MikeMcQuaid
Copy link
Member

I expected the cloned tap to be shallow (as described in man brew documentation).

The issue here was the documentation was not outdated. This will be done in #7053.

brew tap no longer does shallow clones as they end up getting slower and slower (and more expensive to fetch) the more brew updates you do. Shallow clones are optimised for the case when you want to clone once and never fetch again; this is not the case with taps. If you really really need this case to be handled (e.g. in CI where you don't want to brew update after a brew tap) you can do the git clone manually.

@lock lock bot added the outdated PR was locked due to age label Mar 21, 2020
@lock lock bot locked as resolved and limited conversation to collaborators Mar 21, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
outdated PR was locked due to age
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants