wrapper: reduce scope of remove_or_warn()
remove_or_warn() is only used by entry.c and apply.c, but it is
currently declared and defined in wrapper.{h,c}, so it has a scope much
greater than it needs. This needlessly large scope also causes wrapper.c
to need to include object.h, when this file is largely unconcerned with
Git objects.
Move remove_or_warn() to entry.{h,c}. The file apply.c still has access
to it, since it already includes entry.h for another reason.
Signed-off-by: Calvin Wan <calvinwan@google.com>
Signed-off-by: Jonathan Tan <jonathantanmy@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
committed by
Junio C Hamano
parent
d88e8106e8
commit
afd2a1d5f1
@@ -106,11 +106,6 @@ int unlink_or_msg(const char *file, struct strbuf *err);
|
||||
* not exist.
|
||||
*/
|
||||
int rmdir_or_warn(const char *path);
|
||||
/*
|
||||
* Calls the correct function out of {unlink,rmdir}_or_warn based on
|
||||
* the supplied file mode.
|
||||
*/
|
||||
int remove_or_warn(unsigned int mode, const char *path);
|
||||
|
||||
/*
|
||||
* Call access(2), but warn for any error except "missing file"
|
||||
|
||||
Reference in New Issue
Block a user