goop

command module
v0.0.0-...-40168c8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 31, 2021 License: MIT Imports: 1 Imported by: 0

README

goop +loopgoop

Yet another tool to dump a git repository from a website. Code structure and console outputs heavily inspired by arthaud/git-dumper.

FORKED FROM TILLIE KOTTMANN github.com/deletescape/goop continue to fight for justice, knowledge is power.

Usage

loopgoop Usage
usage: ./loopgoop [textfile]

Textfile:
should be a file with one domain per line
Standalone Usage
usage: goop [flags] url [dir]

Flags:
   -f, --force   overrides DIR if it already exists
   -h, --help    help for goop
Example
$ ./loopgoop top1k.dmp
$ goop example.com

Installation

GO111MODULE=on go get -u github.com/Lawlez/goop

How does it work?

The tool will first check if directory listing is available. If it is, then it will just recursively download the .git directory (what you would do with wget).

If directory listing is not available, it will use several methods to find as many files as possible. Step by step, git-dumper will:

  • Fetch all common files (.gitignore, .git/HEAD, .git/index, etc.);
  • Find as many refs as possible (such as refs/heads/master, refs/remotes/origin/HEAD, etc.) by analyzing .git/HEAD, .git/logs/HEAD, .git/config, .git/packed-refs and so on;
  • Find as many objects (sha1) as possible by analyzing .git/packed-refs, .git/index, .git/refs/* and .git/logs/*;
  • Fetch all objects recursively, analyzing each commits to find their parents;
  • Run git checkout . to recover the current working tree

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
internal
pkg

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL