Skip to content

Commit

Permalink
Update README and Changelog in preparation for new release.
Browse files Browse the repository at this point in the history
  • Loading branch information
siedentop committed Nov 11, 2020
1 parent f9116bf commit ee34051
Show file tree
Hide file tree
Showing 4 changed files with 45 additions and 16 deletions.
11 changes: 10 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to
[Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## Unreleased
<!-- Release Process: https://dev.to/sharkdp/my-release-checklist-for-rust-programs-1m33 -->

## [0.0.4] - 2020-11-10

### Fixed

Expand All @@ -21,6 +23,13 @@ and this project adheres to
- Option `--stash` auto stashes unstaged changes. Thanks to Sebastian Buck
(@betwo) for the idea and implementation.

### Deprecated

- I am considering removing the `qf` alias in a later release. Please vote
[here][1].

[1]: https://github.com/siedentop/git-quickfix/issues/6

## [0.0.3] - 2020-10-03

### Removed
Expand Down
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "git-quickfix"
version = "0.0.3"
version = "0.0.4"
authors = ["Christoph Siedentop <[email protected]>"]
edition = "2018"
license = "GPL-3.0"
Expand Down
46 changes: 33 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Git QuickFix

Quickfix allows you to commit changes in your git repository to a new branch
_Quickfix_ allows you to commit changes in your git repository to a new branch
without leaving the current branch.

## Motivation
Expand All @@ -15,8 +15,8 @@ the original branch.
- Minimize context switching.
- Much quicker on large repositories, where branch switching takes significant
time.
- Everything happens in memory, so tools watching the file system will not get
confused.
- Everything happens in memory, so tools and IDEs watching the file system will
not get confused.

## How it works

Expand All @@ -37,11 +37,8 @@ the original branch.
branch. This is only safely possible if there are no local modifications.
Add `--stash` if you have local changes that you want to temporarily stash.

The new commit and the new branch are both created in memory. This means your
working directory will not be modified. Unless `--keep` is provided, the staged
changes will be removed.

You can also use the alias **qf**: `git qf`.
The cherry-pick is done in memory. This means your working directory will not be
modified. Unless `--keep` is provided, the quickfix commit will be removed.

## Installation

Expand All @@ -54,10 +51,33 @@ cargo install git-quickfix
## Known Issues

- Default branches from origin are picked up through a hard-coded list. Patches
welcome.

### TODO
welcome. If the default branch on the remote is not called main, master or
devel, you have to supply it manually. Similarly, if the remote is not called
'origin' similar issues will occur. Please [create an issue][ticket] if this
bothers you.

- Add Github action
- `--push` currently use the Shell to push the changes. Benefits: All proxy,
- Won't fix: `--push` use the shell to push the changes. Benefits: All proxy,
auth and other configs are picked up. But if does not feel right.

[ticket]: https://github.com/siedentop/git-quickfix/issues/new/choose

## FAQ

- _Can it handle multiple commits?_ -- No. I am trying to keep the tool simple.
However, I originally started with this. If you see a need, please [create a
feature request][ticket].
- _Are commit hooks_ considered? -- Not really. While the original commit will
have pre- and post-commit hooks run, the cherry-pick itself does not run the
pre-commit hook. As far as I understand, this may be the git [behavior][1], or
maybe [not][2]? None of it matters, as libgit2 does [not support][3] hooks. If
you have a use for a particular git-hook, please create a [new
ticket][ticket].
- _How does this work?_ -- _libgit2_ provides a raw cherry-pick method. This
works in-memory, meaning that the working directory (i.e. the checked out
files) can be left untouched. This method returns a raw Index object, which I
use to create a new commit.

[1]: http://git.661346.n2.nabble.com/cherry-pick-pre-commit-hook-td5815961.html
[2]:
https://public-inbox.org/git/CAPig+cTT11J00aRO1gO06O6j5zdf4y6XRJhG5X7ZFeP6n7TOGQ@mail.gmail.com/T/
[3]: https://github.com/libgit2/libgit2/issues/964

0 comments on commit ee34051

Please sign in to comment.