9f00421a26c306dbe5e40895594869f21c8405f7
   1#include "../git-compat-util.h"
   2
   3/* Adapted from libiberty's basename.c.  */
   4char *gitbasename (char *path)
   5{
   6        const char *base;
   7        skip_dos_drive_prefix(&path);
   8        for (base = path; *path; path++) {
   9                if (is_dir_sep(*path))
  10                        base = path + 1;
  11        }
  12        return (char *)base;
  13}