diff options
author | Stefan Haller <stefan@haller-berlin.de> | 2024-03-17 20:43:32 +0100 |
---|---|---|
committer | Stefan Haller <stefan@haller-berlin.de> | 2024-03-22 09:58:54 +0100 |
commit | 3b29705a7876c13f47a6478e17ad7ee4fc78ff8c (patch) | |
tree | 36f75deac15124b7b4c6fb0279aa2208a624fcb5 /schema | |
parent | 28dd7f946752d31487b207ab05338dbf4898042f (diff) |
Add config to truncate commit hashes when copying them to the clipboard
I often copy hashes in the commits panel in order to paste them into Github
comments (or other places), and I can't stand it when they have the full length.
I picked a default of 12 for this; I find this to be a good middle ground
between being reliable in large repos (12 still works in the linux kernel repo
today, but it might not be enough in really huge repos) and not being too ugly
(many smaller repos can probably get away with less).
We deliberately don't change this for the "Copy to clipboard" menu, since this
gives users a way to copy the unabbreviated sha if they need this occasionally.
Diffstat (limited to 'schema')
-rw-r--r-- | schema/config.json | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/schema/config.json b/schema/config.json index 65383cd9f..3a2cad060 100644 --- a/schema/config.json +++ b/schema/config.json @@ -559,6 +559,11 @@ "additionalProperties": false, "type": "object", "description": "Config for showing the log in the commits view" + }, + "truncateCopiedCommitHashesTo": { + "type": "integer", + "description": "When copying commit hashes to the clipboard, truncate them to this\nlength. Set to 40 to disable truncation.", + "default": 12 } }, "additionalProperties": false, |