1#include "../git-compat-util.h"
23
/* Adapted from libiberty's basename.c. */
4char *gitbasename (char *path)
5{
6const char *base;
7/* Skip over the disk name in MSDOS pathnames. */
8if (has_dos_drive_prefix(path))
9path += 2;
10for (base = path; *path; path++) {
11if (is_dir_sep(*path))
12base = path + 1;
13}
14return (char *)base;
15}