Commit graph

45 commits

Author SHA1 Message Date
Mario Rodas 0e8125916b
treewide: fix typos
(cherry picked from commit b5c083300b)
2022-12-05 16:10:03 +01:00
Charlie Moog 340ec22f6f
git: add config helper for hooks 2022-09-08 11:05:07 +02:00
Lily Foster 140aaed3df
git: gpg sign tags with signing.signByDefault set
The `tag.gpgSign` config option was added in Git 2.23.0 and seems like
it should be set in addition to `commit.gpgSign` when
`programs.git.signing.signByDefault` is enabled
2022-09-05 14:52:39 +02:00
Ronny Pfannschmidt 5bb1f67568
git: add option to define store names for generated include files (#3171)
This allows to use gitconfig/gitconfig-some-intent
as store path suffixes for the texts.
2022-08-26 15:48:50 -04:00
Congee 0639aa34f1
git: add option to set difftastic display setting 2022-07-12 10:48:26 +02:00
Arjan Schrijver 5872aad1d0
git: add option to use diff-so-fancy as diff tool
Add the option to use diff-so-fancy as diff tool in git. This makes
the shown diffs human readable instead of machine readable.
2022-05-02 23:08:08 +02:00
Roch D'Amour 0382c5f75e
git: Add option to use difftastic as diff tool (#2850)
Difftastic is a syntax-aware diff tool which can be used with git.
2022-04-04 08:53:29 -06:00
Naïm Favier bd11e2c5e6
Replace usage of literalExample
Instead use the new function `literalExpression`. See

  https://github.com/NixOS/nixpkgs/pull/136909
2021-10-13 00:16:10 +02:00
Luka T. Korošec 8d68dbd144
doc: Add an example for a git includes section (#2275)
This adds an example for the `programs.git.includes.*.contents` section
since it was a bit ambiguous as to what kind of format it expects.
2021-08-17 16:12:00 -04:00
Matthew Leach 5515ec99cc
email: allow null certificatesFile
Allow the value of certificatesFile to be null.

Also fixup uses of this variable.

Fixes: #2206
2021-08-10 00:12:13 +02:00
Viacheslav Lotsmanov cc60c22c69
programs.git: make signing key id be optional (#1886)
* Git: Make signing key id be optional

Thus by default the signing key is selected by commit’s author.

* Git: Add tests for config with and without signing key id
* Git: Format tests for signing key
* Git: Remove default value (null) for signing key
* Git: Update description for signing key
2021-04-05 14:28:36 +02:00
Dany Marcoux f30b62a74d
git: install delta when it's enabled (#1866) 2021-03-18 18:32:50 -04:00
Andrew Fontaine 39e4991856
git: Add configured SSL certificate for SMTP (#1833)
If you have a custom SSL certificate configured for SMTP TLS, git should
use it.
2021-03-03 21:24:19 -05:00
Andrew Fontaine f45c7000d5
git: correct value of envelopeSender for msmtp (#1838)
The value should be "auto", not `true`.

Also fix news entry.
2021-02-28 20:42:44 +01:00
Andrew Fontaine aa479b0124
git: rely on msmtp for smtp if msmtp is enabled (#1829)
If a user using msmtp to send all their email, it would be preferred if
git used it as well.

The only settings necessary are to set the smtp server to the msmtp
binary and set envelop sender to true, which makes git call msmtp with
the -f flag to set the from address from the email.
2021-02-28 16:06:11 +01:00
Robert Helgesson 8f24ed4c7f
git: fix attribute paths
This fixes some attribute paths to match recent changes in Nixpkgs.
2021-01-20 18:58:35 +01:00
Nicolas Berbiche 44f9d68d8c
treewide: replace attrs by formats or types.anything 2020-11-29 21:54:55 -05:00
Andrew Fontaine baea46c5ac
git: set SSL if useStartTls is false
The git-send-email [0] script uses StartTLS if `smtpEncryption` is set
to `tls`, which can break services that don't support StartTLS.

[0]: bd42bbe1a4/git-send-email.perl (L1533)

PR #1395
2020-08-13 21:36:31 +02:00
Mario Rodas 4bd0ca2cd7
git: configure delta through [delta] git section (#1371)
this breaks backwards compatibility (now accepts a dict instead of a list) so please update
programs.git.delta.options accordingly.
2020-07-20 17:03:40 +02:00
Mario Rodas cba7b6ee6e
git: add basic support for delta
PR #1198
2020-05-05 00:12:58 +02:00
Robert Helgesson 642d9ffe24
git: escape string values in configuration
This should handle the special characters that typically occur.

Fixes #1206
2020-05-01 00:50:58 +02:00
zimbatm 9a1feb5b10
git: fix the config output formatting
When setting values using the `git config --set` command, git formats
the file a bit differently. This changes the output so it maps to that
format.

Differences:

* each `key = value` in a section is prefixed by a tab character
* the `=` between the key and the value is surrounded by spaces

PR #1069
2020-03-07 12:02:20 +01:00
Robert Helgesson 45abf3d38a
Apply nixfmt on many files 2020-02-02 01:07:28 +01:00
Mario Rodas bb5c29107e git: add attributes support 2019-09-26 22:11:01 +09:00
Robert Helgesson a28614e65d
git: deprecate extraConfig as string 2019-08-30 14:50:10 +02:00
Robert Helgesson 55b71223d4
Fix option defaultText when referencing packages
By using `literalExample` the documentation will show the option
default without surrounding quotes.
2019-08-28 00:14:22 +02:00
arcnmx 95382060eb
git: support nested section options
Closes #614
2019-07-04 16:51:28 +02:00
arcnmx 472d7731d6
git: support multiple values
Closes #614
2019-07-04 16:51:24 +02:00
arcnmx 52692e299d
git: make userName and userEmail options optional 2019-03-17 20:46:00 +01:00
Mario Rodas 6da88339f5
git: allow contents in git.includes 2019-02-17 22:28:15 +01:00
Robert Helgesson 1cdb8abf30
git: add basic support for LFS
Fixes #542
2019-02-10 00:51:16 +01:00
Robert Helgesson 445c0b1482
git: use attrsOf instead of attrs
This makes sure that values added to

    programs.git.aliases

or

    programs.git.extraConfig

are merged as expected.

Also add a few option examples.
2019-02-01 01:12:58 +01:00
Robert Helgesson 45cadbd4f3
git: quote sendemail section header
This will allow, e.g., the character `@` in the email identity.

Also adds a test case.

Fixes #557
2019-01-29 18:28:55 +01:00
Matthieu Coudron a68c8cf5f1
git: generate identities from mail accounts 2019-01-29 00:13:21 +01:00
Tad Fisher 6dc4f31ba1
git: add 'includes' option 2018-04-19 17:45:09 +02:00
Florian Klink c718951e97
git: add option 'programs.git.ignores'
This allows the global Git ignores to be configured.
2017-11-12 14:22:59 +01:00
Florian Klink 356c0bf751
git: use XDG config directory 2017-11-12 13:16:02 +01:00
Robert Helgesson a8e08d14bb
Mark rycee as maintainer for a bunch of modules 2017-09-26 23:40:31 +02:00
Nikita Uvarov 0f096f9ad4
git: change extraConfig from lines to attrs 2017-09-22 23:32:38 +02:00
Robert Helgesson 61042c7606
lib: use generators from Nixpkgs 2017-09-21 13:18:33 +02:00
Robert Helgesson fed112e497
git: simplify submodule slightly 2017-08-24 01:03:01 +02:00
Robert Helgesson 5d49ea6d49
git: remove default signing key
It is mandatory for a user to set the signing key so it does not make
sense to set a default.
2017-02-12 10:02:06 +01:00
Robin Stumm 386d2dbd25
git: fix evaluation error on null extraConfig 2017-02-11 23:35:36 +01:00
Robert Helgesson 071e631648
Improve a few description fields 2017-01-15 23:42:48 +01:00
Robert Helgesson d7d02c3ce8
Initial import 2017-01-14 13:15:24 +01:00