https://github.com/bburdette/git-at-revision
Retreive a git repo as of the specified SHA, unless you already did that.
https://github.com/bburdette/git-at-revision
Last synced: about 1 year ago
JSON representation
Retreive a git repo as of the specified SHA, unless you already did that.
- Host: GitHub
- URL: https://github.com/bburdette/git-at-revision
- Owner: bburdette
- License: bsd-3-clause
- Created: 2019-08-29T21:46:41.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2019-09-06T15:54:07.000Z (almost 7 years ago)
- Last Synced: 2025-01-21T19:51:16.510Z (over 1 year ago)
- Language: Rust
- Size: 13.7 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# git-at-revision
This is a little commandline gadget to clone a git repo as of a certain
revision (SHA). Unless you already did that in which case nothing happens.
Its not on crates.io yet, so clone this repo and then build it with the rust build tool cargo:
> cargo install --path .
Usage:
> git-at-revision \ \ \ --dirtyok
program logic is more or less like this:
does the target dir exist?
yes -
is it the right revision?
yes -
is it modified, or are there untracked files?
yes -
error, unless --dirtyok.
no -
success.
no -
checkout revision. success?
yes - return.
no -
git fetch, retry checkout. success?
no - fail.
yes - success.
no -
clone repo. success?
yes - checkout revision. success?
yes - success.
no - error.
no -
error.