mirror of
https://github.com/git-for-windows/git.git
synced 2026-06-16 04:07:36 -05:00
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>
This commit is contained in:
committed by
Junio C Hamano
parent
80b81bbe59
commit
8ee157ffc6
@@ -43,32 +43,6 @@ void chdir_notify_unregister(const char *name, chdir_notify_callback cb,
|
||||
}
|
||||
}
|
||||
|
||||
static void reparent_cb(const char *name,
|
||||
const char *old_cwd,
|
||||
const char *new_cwd,
|
||||
void *data)
|
||||
{
|
||||
char **path = data;
|
||||
char *tmp = *path;
|
||||
|
||||
if (!tmp)
|
||||
return;
|
||||
|
||||
*path = reparent_relative_path(old_cwd, new_cwd, tmp);
|
||||
free(tmp);
|
||||
|
||||
if (name) {
|
||||
trace_printf_key(&trace_setup_key,
|
||||
"setup: reparent %s to '%s'",
|
||||
name, *path);
|
||||
}
|
||||
}
|
||||
|
||||
void chdir_notify_reparent(const char *name, char **path)
|
||||
{
|
||||
chdir_notify_register(name, reparent_cb, path);
|
||||
}
|
||||
|
||||
int chdir_notify(const char *new_cwd)
|
||||
{
|
||||
struct strbuf old_cwd = STRBUF_INIT;
|
||||
|
||||
@@ -19,10 +19,7 @@
|
||||
* chdir_notify_register("description", foo, data);
|
||||
*
|
||||
* In practice most callers will want to move a relative path to the new root;
|
||||
* they can use the reparent_relative_path() helper for that. If that's all
|
||||
* you're doing, you can also use the convenience function:
|
||||
*
|
||||
* chdir_notify_reparent("description", &my_path);
|
||||
* they can use the reparent_relative_path() helper for that.
|
||||
*
|
||||
* Whenever a chdir event occurs, that will update my_path (if it's relative)
|
||||
* 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,
|
||||
void chdir_notify_register(const char *name, chdir_notify_callback cb, void *data);
|
||||
void chdir_notify_unregister(const char *name, chdir_notify_callback cb,
|
||||
void *data);
|
||||
void chdir_notify_reparent(const char *name, char **path);
|
||||
|
||||
/*
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user