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

[PATCH] sequencer: tolerate abbreviated stopped-sha file

From
JTJonathan Tan <jonathantanmy@google.com>
Date
Oct 21, 2020, 22:03 UTC
Message-ID
<20201021220353.928067-1-jonathantanmy@google.com>

In 0512eabd91 ("sequencer: stop abbreviating stopped-sha file", 2020-09-25), Git was taught both to write full object names to the stopped-sha file and to require full object names when reading. However, a user would experience a problem if they started an interactive rebase using an old version of Git and then continued with a current version of Git (for example, if the system version of Git was updated in the meantime).

Teach Git to allow object names of any length when reading.
Signed-off-by: Jonathan Tan <jonathantanmy@google.com>
---
Not sure how big of a problem this will potentially be, but I noticed it
and wanted to mention it.
---
 sequencer.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sequencer.c b/sequencer.c
index 00acb12496..37847d4534 100644
--- a/sequencer.c
+++ b/sequencer.c
@@ -2653,7 +2653,7 @@ static int read_populate_opts(struct replay_opts *opts)
 		}
 
 		if (read_oneliner(&buf, rebase_path_squash_onto(), 0)) {
-			if (get_oid_hex(buf.buf, &opts->squash_onto) < 0) {
+			if (get_oid_committish(buf.buf, &opts->squash_onto) < 0) {
 				ret = error(_("unusable squash-onto"));
 				goto done_rebase_i;
 			}
-- 
2.29.0.rc1.297.gfa9743e501-goog
Next: Junio C Hamano
Message 1 of 2 in “sequencer: tolerate abbreviated stopped-sha file”
  1. sequencer: tolerate abbreviated stopped-sha fileJonathan Tan, Oct 21, 2020
  2. Junio C HamanoOct 21, 2020

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.