summaryrefslogtreecommitdiff
path: root/diff.c
diff options
context:
space:
mode:
authorMark Ruvald Pedersen <mped@demant.com>2023-08-10 16:34:59 +0000
committerJunio C Hamano <gitster@pobox.com>2023-08-10 10:12:29 -0700
commit7481d2bfca7fd36f63fd437508be2bca338c9477 (patch)
tree673f3341b56bd8f1ed432ef5bd626c2425f096ea /diff.c
parentfb7d80edcae482f4fa5d4be0227dc3054734e5f3 (diff)
sequencer: truncate labels to accommodate loose refs
Some commits may have unusually long subject lines. When those subject lines are used as labels in the `--rebase-merges` mode of `git rebase`, they can cause errors when writing the corresponding loose refs because most file systems have a maximal file name length of 255 (`NAME_MAX`). The symptom looks like this: $ git rebase --continue error: cannot lock ref 'refs/rewritten/SANITIZED-SUBJECT': Unable to create '.git/refs/rewritten/SANITIZED-SUBJECT.lock': File name too long - where SANITIZED-SUBJECT is very long Let's accommodate this situation by truncating the labels. Care must be taken in case the subject line contains multi-byte characters so as not to truncate in the middle of a character. Signed-off-by: Mark Ruvald Pedersen <mped@demant.com> Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'diff.c')
0 files changed, 0 insertions, 0 deletions