README syntax fixes

This commit is contained in:
Jan Petykiewicz 2019-10-27 12:59:54 -07:00
parent 4f2599e457
commit b12cf290f1

View File

@ -1,8 +1,8 @@
# lethe README # lethe README
```lethe``` is a Python module for git-based snapshotting. `lethe` is a Python module for git-based snapshotting.
```lethe``` is intended as a mechanism for creating commits outside `lethe` is intended as a mechanism for creating commits outside
the standard git branching/tagging workflows. It is meant to enable the standard git branching/tagging workflows. It is meant to enable
additional use-cases without disrupting the standard workflows. additional use-cases without disrupting the standard workflows.
Use cases include: Use cases include:
@ -24,22 +24,22 @@ $ lethe
122d058e375274a186c407f28602c3b14a2cab95 122d058e375274a186c407f28602c3b14a2cab95
``` ```
This effectively snapshots the current state of the repository (as would be seen by This effectively snapshots the current state of the repository (as would be seen by
```git add --all```) and creates a new commit (```122d058e375274a186c407f28602c3b14a2cab95```) `git add --all`) and creates a new commit (`122d058e375274a186c407f28602c3b14a2cab95`)
which points to it. The current branch and index are not changed. which points to it. The current branch and index are not changed.
### Flags: ### Flags:
- ```-p my_parent_ref``` is used to provide "parent" refs which become the parents of the created commit. - `-p my_parent_ref` is used to provide "parent" refs which become the parents of the created commit.
If a parent ref is a symbolic ref, *both* the provided ref and the ref it points to are used as parents. If a parent ref is a symbolic ref, *both* the provided ref and the ref it points to are used as parents.
If not present, defaults to ```-p HEAD```. If not present, defaults to `-p HEAD`.
- ```-t ref/lethe/my_target_ref``` is used to provide "target" refs which will be created/updated - `-t ref/lethe/my_target_ref` is used to provide "target" refs which will be created/updated
to point to the created commit. to point to the created commit.
If not present, defaults to adding an entry of the form ```-t refs/lethe/my_branch``` for each If not present, defaults to adding an entry of the form `-t refs/lethe/my_branch` for each
parent ref of the form ```refs/heads/my_branch```, and ```-t refs/lethe/my/refpath``` for non-head parent ref of the form `refs/heads/my_branch`, and `-t refs/lethe/my/refpath` for non-head
refs of the form ```refs/my/refpath```. All provided parent refs *and* any dereferenced parent refs refs of the form `refs/my/refpath`. All provided parent refs *and* any dereferenced parent refs
are used to generate default target refs. are used to generate default target refs.
If any of the target refs already exist, the commits they point to become parents of the created commit. If any of the target refs already exist, the commits they point to become parents of the created commit.
- ```-m "my message"``` sets the commit message for the snapshot. By default, "snapshot <current datetime>" is used. - `-m "my message"` sets the commit message for the snapshot. By default, "snapshot <current datetime>" is used.
- ```-r path/to/repo``` can be provided to specify a repository outside of the current working directory. - `-r path/to/repo` can be provided to specify a repository outside of the current working directory.
```bash ```bash
$ cd path/to/repo $ cd path/to/repo
@ -73,9 +73,9 @@ print('Code (tree) state is ' + tree_sha)
Requirements: Requirements:
* python 3 (written and tested with 3.6) * python 3 (written and tested with 3.6)
* git (accessible on the system ```PATH```) * git (accessible on the system `PATH`)
Install with pip: Install with pip:
```bash ```bash
pip install lethe pip3 install lethe
``` ```