OSDN Git Service

Merge branch 'rj/add-chmod-error-message' into maint
authorJunio C Hamano <gitster@pobox.com>
Sun, 10 Sep 2017 08:03:00 +0000 (17:03 +0900)
committerJunio C Hamano <gitster@pobox.com>
Sun, 10 Sep 2017 08:03:00 +0000 (17:03 +0900)
Message fix.

* rj/add-chmod-error-message:
  builtin/add: add detail to a 'cannot chmod' error message

builtin/add.c

index e888fb8..5d5773d 100644 (file)
@@ -32,7 +32,7 @@ struct update_callback_data {
        int add_errors;
 };
 
-static void chmod_pathspec(struct pathspec *pathspec, int force_mode)
+static void chmod_pathspec(struct pathspec *pathspec, char flip)
 {
        int i;
 
@@ -42,8 +42,8 @@ static void chmod_pathspec(struct pathspec *pathspec, int force_mode)
                if (pathspec && !ce_path_match(ce, pathspec, NULL))
                        continue;
 
-               if (chmod_cache_entry(ce, force_mode) < 0)
-                       fprintf(stderr, "cannot chmod '%s'", ce->name);
+               if (chmod_cache_entry(ce, flip) < 0)
+                       fprintf(stderr, "cannot chmod %cx '%s'\n", flip, ce->name);
        }
 }