git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH 0/2] sequencer: truncate lockfile and ref to NAME_MAX

From
MGMark Ruvald Pedersen via GitGitGadget <gitgitgadget@gmail.com>
Date
Aug 10, 2023, 16:34 UTC
Message-ID
<pull.1562.git.git.1691685300.gitgitgadget@gmail.com>

Some commits may have unusually long subject lines, which can cause git error out. Currently the sequencer and lockfile assumes these to be less than NAME_MAX which is the maximum length of a filename (on Linux).

When reproduced one is met by the error message:

$ 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
Affected repos can only be salvaged through filter-branch etc.
Johannes Schindelin (1):
  rebase: allow overriding the maximal length of the generated labels
Mark Ruvald Pedersen (1):
  sequencer: truncate labels to accommodate loose refs
 Documentation/config/rebase.txt |  6 +++++
 git-compat-util.h               |  4 +++
 sequencer.c                     | 47 ++++++++++++++++++++++++++++-----
 t/t3430-rebase-merges.sh        | 11 ++++++++
 4 files changed, 62 insertions(+), 6 deletions(-)
base-commit: a82fb66fed250e16d3010c75404503bea3f0ab61
Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-git-1562%2Fmped-oticon%2Fmped_bugfix_lockfile_maxname-v1
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-git-1562/mped-oticon/mped_bugfix_lockfile_maxname-v1
Pull-Request: https://github.com/git/git/pull/1562
-- 
gitgitgadget
Next: Johannes Schindelin via GitGitGadget
Message 1 of 7 in “sequencer: truncate lockfile and ref to NAME_MAX”
  1. 0/2 sequencer: truncate lockfile and ref to NAME_MAXMark Ruvald Pedersen via GitGitGadget, Aug 10, 2023
  2. 2/2 rebase: allow overriding the maximal length of the generated labelsJohannes Schindelin via GitGitGadget, Aug 10, 2023
  3. Junio C HamanoAug 10, 2023
  4. 1/2 sequencer: truncate labels to accommodate loose refsMark Ruvald Pedersen via GitGitGadget, Aug 10, 2023
  5. Junio C HamanoAug 10, 2023
  6. Johannes SchindelinAug 16, 2023
  7. Junio C HamanoAug 16, 2023

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.