aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThalia Archibald <thalia@archibald.dev>2024-04-14 01:11:59 +0000
committerJunio C Hamano <gitster@pobox.com>2024-04-15 10:06:17 -0700
commit212ab23e98546b24a183dce86b90595e1e4b92dd (patch)
treebaa4520958e27b45cfbf029346a029c50b2a94f6
parentb5062f752ef039b6fa8b3a7491072c2f1dfe3cf2 (diff)
downloadgit-212ab23e98546b24a183dce86b90595e1e4b92dd.tar.gz
fast-import: remove dead strbuf
The strbuf in `note_change_n` is to copy the remainder of `p` before potentially invalidating it when reading the next line. However, `p` is not used after that point. It has been unused since the function was created in a8dd2e7d2b (fast-import: Add support for importing commit notes, 2009-10-09) and looks to be a fossil from adapting `file_change_m`. Remove it. Signed-off-by: Thalia Archibald <thalia@archibald.dev> Signed-off-by: Junio C Hamano <gitster@pobox.com>
-rw-r--r--builtin/fast-import.c5
1 files changed, 0 insertions, 5 deletions
diff --git a/builtin/fast-import.c b/builtin/fast-import.c
index c8a1e3ef3d..832d0055f9 100644
--- a/builtin/fast-import.c
+++ b/builtin/fast-import.c
@@ -2448,7 +2448,6 @@ static void file_change_cr(const char *p, struct branch *b, int rename)
static void note_change_n(const char *p, struct branch *b, unsigned char *old_fanout)
{
- static struct strbuf uq = STRBUF_INIT;
struct object_entry *oe;
struct branch *s;
struct object_id oid, commit_oid;
@@ -2513,10 +2512,6 @@ static void note_change_n(const char *p, struct branch *b, unsigned char *old_fa
die("Invalid ref name or SHA1 expression: %s", p);
if (inline_data) {
- if (p != uq.buf) {
- strbuf_addstr(&uq, p);
- p = uq.buf;
- }
read_next_command();
parse_and_store_blob(&last_blob, &oid, 0);
} else if (oe) {