chdir-notify: drop unused `chdir_notify_reparent()`

With the preceding commit we've removed all callers of `chdir_notify_reparent()`, so the function is unused now. Drop it. Signed-off-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Patrick Steinhardt committed Jun 25, 2026 at 11:20 UTC 5bf546755c0a9d758773538d1bd730785189c9d7
2 files changed +1 -31
chdir-notify.c
-26
@@ -43,32 +43,6 @@ void chdir_notify_unregister(const char *name, chdir_notify_callback cb,
43 }
44 }
45
46 -static void reparent_cb(const char *name,
47 - const char *old_cwd,
48 - const char *new_cwd,
49 - void *data)
50 -{
51 - char **path = data;
52 - char *tmp = *path;
53 -
54 - if (!tmp)
55 - return;
56 -
57 - *path = reparent_relative_path(old_cwd, new_cwd, tmp);
58 - free(tmp);
59 -
60 - if (name) {
61 - trace_printf_key(&trace_setup_key,
62 - "setup: reparent %s to '%s'",
63 - name, *path);
64 - }
65 -}
66 -
67 -void chdir_notify_reparent(const char *name, char **path)
68 -{
69 - chdir_notify_register(name, reparent_cb, path);
70 -}
71 -
46 int chdir_notify(const char *new_cwd)
47 {
48 struct strbuf old_cwd = STRBUF_INIT;
chdir-notify.h
+1 -5
@@ -19,10 +19,7 @@
19 * chdir_notify_register("description", foo, data);
20 *
21 * In practice most callers will want to move a relative path to the new root;
22 - * they can use the reparent_relative_path() helper for that. If that's all
23 - * you're doing, you can also use the convenience function:
24 - *
25 - * chdir_notify_reparent("description", &my_path);
22 + * they can use the reparent_relative_path() helper for that.
23 *
24 * Whenever a chdir event occurs, that will update my_path (if it's relative)
25 * to adjust for the new cwd by freeing any existing string and allocating a
@@ -43,7 +40,6 @@ typedef void (*chdir_notify_callback)(const char *name,
40 void chdir_notify_register(const char *name, chdir_notify_callback cb, void *data);
41 void chdir_notify_unregister(const char *name, chdir_notify_callback cb,
42 void *data);
46 -void chdir_notify_reparent(const char *name, char **path);
43
44 /*
45 *