Commit Graph

124 Commits

Author SHA1 Message Date
0faf19ad3d git:alias: Add git-submodule-rm for function
Just add a git alias to the already existing zsh function to make it
easier to call it.
2022-07-12 21:00:09 +02:00
13ebd97d8e git: Set interactive.diffFilter to diff-so-fancy
Pipe patches through diff-so-fancy in interactive commands (e.g. `git
add -p`) too.
2022-07-12 21:00:03 +02:00
d136658888 git: Update alias section
Move `signoff` out of the 'external' subsection as the script [got
replaced by the native way][1].

Update 'external' subsection's comment as it does not contain only zsh
functions.

[1]: bb21c4df7844 ("git: Replace git-signoff with `rebase --signoff`")
2022-07-12 21:00:02 +02:00
03163a92a4 git:filter-repo: Add to $PATH 2022-07-12 21:00:02 +02:00
09ef4d4d93 git: Replace git-signoff with rebase --signoff
Replace my custom git-signoff script with the native `--signoff` flag
for `git rebase`.
2022-07-12 21:00:00 +02:00
ac0987719f git:submodule: Parallel with a reasonable amount
Git should decide on a reasonable default for how many fetch/clone jobs
should run in parallel.
2022-07-12 21:00:00 +02:00
3512199fce git:spull: Rename to ssync
As I rarely use git-pull(1) and instead fetch and act manually, I'd
rather have it to just sync the submodules.
2022-07-12 20:59:59 +02:00
706c55acc1 git:alias: Reorder zsh functions into own block 2022-07-12 20:59:59 +02:00
c22fcf5fce git,zsh:autoload: Move spull into own function
Move `git-track` into its own autoloadable function.

This way it is better maintainable as in one-liner format and brings the
possibility of having more complexity (e.g. for better portability).

By that it is also now executable as `git-spull` as well as `git spull`
as before.
2022-07-12 20:59:59 +02:00
0146956dd4 git:core.pager:,less: Use long flag variants 2022-07-12 20:59:59 +02:00
c86b1b765a git:core.pager: Update flags
Remove `-g` as it was put in place for a better experience with the
search pattern that `less` was started with.

Readd `-F` as it was explicitly unset when the search pattern was
introduced.

Do not readd `-X` as I like output that is too long (e.g. `log`, `show`)
to be kept in alternate mode and out of my scrollback buffer.

See:

- 17433d0528 ("git:core.pager: Remove the search pattern")

> This gets really annoying as it complains in many cases that it cannot
> find a match for the pattern when the pager is used for other things
> than commits.

- 093c3a6f9c ("git: Highlight current match in pager")

- 7e0e0f5baf ("git: Enable jumps between different files in diff")

> Jump between file sections and commits by using n and N. Taken from:
> https://github.com/so-fancy/diff-so-fancy/blob/eef379ee43f/pro-tips.md
>
> Remove FX flags since they are incompatible with the pattern search:
> When showing a small change that fits on less than the screen height,
> the rest of the screen is filled with ~ lines instead of quitting the
> pager. This behaviour is annoying and thus the flags are deactivated.
> Since git adds them per default they have to be explicitly disabled.
2022-06-23 23:59:02 +02:00
d51cf9d5e1 git: Set some fetch options
Use [compact output][1]:

> In compact output mode, specified with configuration variable
> fetch.output, if either entire <from> or <to> is found in the other
> string, it will be substituted with * in the other string. For
> example, master -> origin/master becomes master -> origin/*.

Automatically prune branches and tags.

Set parallelization to use a value set by git as otherwise it defaults
to 1.

[1]: git-fetch(1)
2022-06-23 23:58:57 +02:00
25771018a8 git: Alias changes to log HEAD...FETCH_HEAD
I would have liked to call the alias `whatchanged` but am not able to as
git brings a command named liked that (for backwards compatibility) and
alias cannot override builtins.
2022-06-23 23:58:56 +02:00
bea16a170c git: Add alias to glog 2022-06-23 23:58:56 +02:00
020b39887e gpg,git: Move gpg.loopback into PATH
Move gpg.loopback into PATH as git's `gpg.program` does not handle paths
with `~` or other environment variables very well.
2022-06-23 23:58:54 +02:00
ef3e3387b7 git: Remove core.excludesfile option
Remove the `core.excludesfile` option as it only sets the default value
`${XDG_CONFIG_HOME:-$HOME/.config}/git/ignore` but while hardcoding the
default value `~/.config` for `XDG_CONFIG_HOME`.
2022-06-23 23:58:53 +02:00
476081e2a2 git: Set log.follow
I always want to 'follow' if possible.
2022-06-23 23:58:37 +02:00
1149424d0d git:alias: Add autofixup and autosquash
Automatically fixup/squash marked commits without opening the
git-rebase-todo.
2022-06-23 23:58:36 +02:00
f76d16f01b git: Move user.config include block to EOF 2022-06-23 23:58:35 +02:00
c2390f5fcd vim:fugitive: Fix committing with locked gpg-key 2022-06-23 23:58:34 +02:00
f44125937f git:alias: Add checkout-worktree
Reuse the autoloadable function as git alias. This way
`git-checkout-worktree` as well as `git checkout-worktree` are possible.
2022-03-31 15:21:22 +02:00
869a1bce6e git: Readd function in spull alias
This reverts commit 54d716510b ("git: Drop function in `spull`").

I apparently oversaw the use of arguments passed to `git pull`. This
makes the function necessary.
2022-03-31 14:20:09 +02:00
70b9a74029 git: Add signoff alias to git-signoff 2022-03-30 03:01:19 +02:00
2495dc7b2d git: Remove nvimdiff as merge.tool 2022-03-30 03:00:46 +02:00
71f41ab994 git: Set blame.date to short 2022-03-20 17:30:48 +01:00
17433d0528 git:core.pager: Remove the search pattern
This gets really annoying as it complains in many cases that it cannot
find a match for the pattern when the pager is used for other things
than commits.
2022-02-03 18:59:00 +01:00
54d716510b git: Drop function in spull
The function is not needed as git can just execute chains of commands.
2022-02-03 18:56:38 +01:00
7252bee741 git: Add filter-repo as alias 2022-02-03 18:47:24 +01:00
00355ec6f7 git: Enable rerere
Activate recording of resolved conflicts, so that identical conflict
hunks can be resolved automatically, should they be encountered again.
2022-02-03 18:31:20 +01:00
48090260aa git: Set branch.autosetuprebase to always 2022-02-01 01:10:56 +01:00
8da651fd27 LICENSE,git: Use real name instead of pseudonym
Also specify email address in the LICENSE.
2022-01-31 13:04:43 +01:00
7f52c7a4cb git,zsh:autoload: Move git-track into own function
Move `git-track` into its own autoloadable function.
This way it is
better maintainable as in one-liner format and brings the possibility of
having more complexity (e.g. for better portability).
By that it is also now executable as `git-track` as well as `git track`
as before.
2022-01-31 12:50:54 +01:00
ef7196f2ca git: Add fixes alias and pretty format
This allows printing for 'Fixes:' tags as mentioned in the kernel
documentation:
https://www.kernel.org/doc/html/latest/process/submitting-patches.html
2022-01-12 12:41:22 +01:00
157c2ae43f git: Abrreviate commit SHA-1 IDs with 12 chars 2022-01-12 12:36:07 +01:00
3c40002a4a git: Sort config lines and fix indentation 2022-01-02 23:28:34 +01:00
eb74eb274c git:alias:track: Add horizontal line under header 2021-11-18 17:13:50 +01:00
9f65a22df7 git:alias:track: Merge both sed invocations 2021-11-18 04:21:39 +01:00
225a17c437 git:alias:track: Get rid of function definition
The function definition in the spull alias is only needed for the
processing of arguments. In `track`s case it is completely unnecessary.
2021-11-18 04:06:54 +01:00
74a329a7ea git:alias: Add branches as alias for track 2021-11-18 03:39:40 +01:00
081e78562f git:alias:track: Fix strange split header line bug
Fix weird issue that when `column` is used to display the header line,
it is split over two lines sometimes.
```
local
      remote

      origin/HEAD
dev   origin/dev
main  origin/main
      origin/utils
```
2021-11-18 00:57:45 +01:00
227495e7c7 git:alias:track: Separate remotes with newlines 2021-11-18 00:53:56 +01:00
7b5dbd7851 git:alias:track: Name the table columns
Also use `column` to reorder the columns instead of `sed`.
2021-11-17 01:36:21 +01:00
11dab14da3 git:alias:track: Shorten command
Shorten command by always printing a `,` as separator and
differentiating between remote and head refs by a leading slash.
2021-11-17 01:23:33 +01:00
f11be2c1a9 git:alias:track: Fix multiple branch filtering
This fixes the deletion/filtering of branches if there were multiple
local branches tracking the same remote branch.
2021-11-15 18:51:55 +01:00
3297ba81b4 git:alias:track: Also list non-tracked remotes
The alias now lists all local *and* all remote branches and displays how
they are linked.
The `sort -uk1,1` deletes all duplicate entries of remote branches as
they could be listed as %(upstream) as well as %(refname) through the
`refs/remotes/`.
TODO:
     This deletes too many entries when multiple local branches track
     the same remote branch. (Why ever you should do that...)
     I guess this could be resolved by using `awk` for the uniqueness.
2021-11-12 15:56:01 +01:00
1fd2c730d9 git:alias:track: Do not print trailing arrow
Do not print trailing arrow when the local branch is not tracking a
remote branch.
2021-11-12 14:32:01 +01:00
2434f3fc4c git: Add track alias
This command lists all branches and what remote branch they are
tracking.
2021-11-12 14:30:40 +01:00
ade4486b84 git: Disable addIgnoredFile advice 2021-10-06 21:41:28 +02:00
2e4955645a git: Never add 'into <branch>' to merge message 2021-09-16 04:33:19 +02:00
c23613e2d5 git: Disable advice about detached head 2021-07-23 12:05:56 +02:00