mirror of https://github.com/nyancrimew/goop.git
update README
This commit is contained in:
parent
843dfd1d25
commit
9c9969aa99
15
README.md
15
README.md
|
@ -1,14 +1,17 @@
|
||||||
# goop
|
# goop
|
||||||
|
|
||||||
Yet another tool to dump a git repository from a website. Code structure and console outputs heavily inspired by [arthaud/git-dumper](https://github.com/arthaud/git-dumper).
|
Yet another tool to dump a git repository from a website. Original codebase heavily inspired by [arthaud/git-dumper](https://github.com/arthaud/git-dumper).
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
```bash
|
```bash
|
||||||
usage: goop [flags] url [dir]
|
Usage:
|
||||||
|
goop [flags] url [DIR]
|
||||||
|
|
||||||
Flags:
|
Flags:
|
||||||
-f, --force overrides DIR if it already exists
|
-f, --force overrides DIR if it already exists
|
||||||
-h, --help help for goop
|
-h, --help help for goop
|
||||||
|
-k, --keep keeps already downloaded files in DIR, useful if you keep being ratelimited by server
|
||||||
|
-l, --list allows you to supply the name of a file containing a list of domain names instead of just one domain
|
||||||
```
|
```
|
||||||
|
|
||||||
### Example
|
### Example
|
||||||
|
@ -19,16 +22,18 @@ $ goop example.com
|
||||||
## Installation
|
## Installation
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
GO111MODULE=on go get -u github.com/deletescape/goop
|
go get -u github.com/deletescape/goop@latest
|
||||||
```
|
```
|
||||||
|
|
||||||
## How does it work?
|
## 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`).
|
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:
|
If directory listing is not available, it will use several methods to find as many files as possible. Step by step, goop will:
|
||||||
* Fetch all common files (`.gitignore`, `.git/HEAD`, `.git/index`, etc.);
|
* 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 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/*`;
|
* 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;
|
* Fetch all objects recursively, analyzing each commits to find their parents;
|
||||||
* Run `git checkout .` to recover the current working tree
|
* Run `git checkout .` to recover the current working tree;
|
||||||
|
* Attempt to fetch missing files listed in the git index;
|
||||||
|
* Attempt to fetch files listed in .gitignore
|
||||||
|
|
Loading…
Reference in New Issue