mirror of https://github.com/nyancrimew/goop.git
Add readme and license
This commit is contained in:
parent
5cb2134157
commit
3b0420b400
|
@ -0,0 +1,21 @@
|
|||
MIT License
|
||||
|
||||
Copyright (c) 2020 Tillie Kottmann
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
|
@ -0,0 +1,34 @@
|
|||
# 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).
|
||||
|
||||
## Usage
|
||||
```bash
|
||||
usage: goop [flags] url [dir]
|
||||
|
||||
Flags:
|
||||
-f, --force overrides DIR if it already exists
|
||||
-h, --help help for goop
|
||||
```
|
||||
|
||||
### Example
|
||||
```bash
|
||||
$ goop example.com
|
||||
```
|
||||
|
||||
## Installation
|
||||
|
||||
```bash
|
||||
go get -u github.com/deletescape/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
|
Loading…
Reference in New Issue