Code

format-patch: Respect --quiet option
[git.git] / builtin-update-index.c
index 560497750586ec61be4e34de6dedd9c307129817..1fde893cfa9f6318ae1e9958b2f61159b01c7c6a 100644 (file)
@@ -195,7 +195,7 @@ static int process_path(const char *path)
        struct stat st;
 
        len = strlen(path);
-       if (has_symlink_leading_path(len, path))
+       if (has_symlink_leading_path(path, len))
                return error("'%s' is beyond a symbolic link", path);
 
        /*
@@ -742,8 +742,7 @@ int cmd_update_index(int argc, const char **argv, const char *prefix)
                if (newfd < 0) {
                        if (refresh_flags & REFRESH_QUIET)
                                exit(128);
-                       die("unable to create '%s.lock': %s",
-                           get_index_file(), strerror(lock_error));
+                       unable_to_lock_index_die(get_index_file(), lock_error);
                }
                if (write_cache(newfd, active_cache, active_nr) ||
                    commit_locked_index(lock_file))