Fixed "git commit" on directories

This commit is contained in:
Pierre Pronchery 2012-10-17 01:03:08 +00:00
parent 979466a255
commit bf4285c22c

View File

@ -628,7 +628,7 @@ static void _git_on_commit(gpointer data)
return;
dirname = S_ISDIR(st.st_mode) ? g_strdup(git->filename)
: g_path_get_dirname(git->filename);
basename = S_ISDIR(st.st_mode) ? NULL
basename = S_ISDIR(st.st_mode) ? g_strdup(".")
: g_path_get_basename(git->filename);
argv[3] = basename;
_git_add_task(git, "git commit", dirname, argv);