Skip to content

Commit 234450c

Browse files
committed
Rename git-absorb.txt to git-absorb.adoc
GitHub will render the adoc file as a document, which is more readable than the plain text file.
1 parent ca997cb commit 234450c

File tree

5 files changed

+7
-59
lines changed

5 files changed

+7
-59
lines changed

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ jobs:
162162
mkdir -p "$staging"/doc
163163
164164
cp {README.md,LICENSE.md} "$staging/"
165-
cp Documentation/{git-absorb.1,git-absorb.txt} "$staging/doc/"
165+
cp Documentation/{git-absorb.1,git-absorb.adoc} "$staging/doc/"
166166
167167
if [[ "${{ matrix.target }}" =~ .*windows.* ]]; then
168168
cp "target/${{ matrix.target }}/release/git-absorb.exe" "$staging/"

Documentation/Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
build-manpage: git-absorb.1
22

3-
git-absorb.1: git-absorb.txt
3+
git-absorb.1: git-absorb.adoc
44
$(if $(shell which a2x),,$(error "No a2x in PATH; install asciidoc."))
55
$(info Building manpage. This may take a few moments...)
6-
a2x -L -d manpage -f manpage git-absorb.txt --attribute man-version=${GA_VERSION}
6+
a2x -L -d manpage -f manpage git-absorb.adoc --attribute man-version=${GA_VERSION}
77

88
clean:
99
rm -f git-absorb.1 git-absorb.xml

Documentation/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
git-absorb manual
22
=================
33

4-
This project's man page `git-absorb.1` can be generated from `git-absorb.txt`
4+
This project's man page `git-absorb.1` can be generated from `git-absorb.adoc`
55
by running `make`.
66

77
Build dependencies
File renamed without changes.

README.md

Lines changed: 3 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -93,63 +93,11 @@ Note: `cargo install` does not currently know how to install manpages ([cargo#27
9393

9494
For each hunk in the index, `git absorb` will check if that hunk commutes with the last commit, then the one before that, etc. When it finds a commit that does not commute with the hunk, it infers that this is the right parent commit for this change, and the hunk is turned into a fixup commit. If the hunk commutes with all commits in the range, it means we have not found a suitable parent commit for this change; a warning is displayed, and this hunk remains uncommitted in the index.
9595

96-
## Configuration
96+
## Documentation
9797

98-
### Stack size
98+
For additional information about git-absorb, including all arguments and configuration options, see [Documentation/git-absorb.adoc](Documentation/git-absorb.adoc),
99+
or the git-absorb manual page.
99100

100-
When run without `--base`, git-absorb will only search for candidate commits to fixup within a certain range (by default 10). If you get an error like this:
101-
102-
```
103-
WARN stack limit reached, limit: 10
104-
```
105-
106-
edit your local or global `.gitconfig` and add the following section
107-
108-
```ini
109-
[absorb]
110-
maxStack=50 # Or any other reasonable value for your project
111-
```
112-
113-
### Generate fixups for commits not authored by you
114-
115-
By default, git-absorb will only generate fixup commits for commits that were authored by you.
116-
Instead, use the `--force-author` flag to generate fixup commits for commits written by any author.
117-
To always have this behavior, set
118-
119-
```ini
120-
[absorb]
121-
forceAuthor = true
122-
```
123-
124-
### One fixup per fixable commit
125-
126-
By default, git-absorb will generate separate fixup commits for every absorbable hunk. Instead, can use the `-F` flag to create only 1 fixup commit for all hunks that absorb into the same commit.
127-
To always have this behavior, set
128-
129-
```ini
130-
[absorb]
131-
oneFixupPerCommit = true
132-
```
133-
134-
### Auto-stage all changes if nothing staged
135-
136-
By default, git-absorb will only consider files that you've staged to the index via `git add`. However, sometimes one wants to try and absorb from all changes, which would require to stage them first via `git add .`. To avoid this extra step, set
137-
138-
```ini
139-
[absorb]
140-
autoStageIfNothingStaged = true
141-
```
142-
143-
which tells git-absorb, when no changes are staged, to auto-stage them all, create fixup commits where possible, and unstage remaining changes from the index.
144-
145-
### Fixup target always SHA
146-
147-
By default, git-absorb will create fixup commits with their messages pointing to the target commit's summary, and if there are duplicate summaries, will fall back to pointing to the target's SHA. Instead, can always point to the target's SHA via:
148-
149-
```ini
150-
[absorb]
151-
fixupTargetAlwaysSHA = true
152-
```
153101

154102
## TODO
155103

0 commit comments

Comments
 (0)