Commit Diff


commit - ef8d60312a7ca5c60477010ceec1137e05985a2e
commit + b88d214a31981ae2610d930c34d956143b03c523
blob - f7a518701e3aaaf962ce345785d00465bb4418ff
blob + 7bb6476174e9f1c13193dab9b4a12f2fecb8d3a7
--- lib/worktree.c
+++ lib/worktree.c
@@ -1223,7 +1223,7 @@ install_symlink(struct got_worktree *worktree, const c
 			/* Path too long; install as a regular file. */
 			got_object_blob_rewind(blob);
 			return install_blob(worktree, ondisk_path, path,
-			    GOT_DEFAULT_FILE_MODE, st_mode, blob,
+			    GOT_DEFAULT_FILE_MODE, GOT_DEFAULT_FILE_MODE, blob,
 			    restoring_missing_file, reverting_versioned_file,
 			    1, repo, progress_cb, progress_arg);
 		}
@@ -1273,7 +1273,7 @@ install_symlink(struct got_worktree *worktree, const c
 		/* install as a regular file */
 		got_object_blob_rewind(blob);
 		err = install_blob(worktree, ondisk_path, path,
-		    GOT_DEFAULT_FILE_MODE, st_mode, blob,
+		    GOT_DEFAULT_FILE_MODE, GOT_DEFAULT_FILE_MODE, blob,
 		    restoring_missing_file, reverting_versioned_file, 1,
 		    repo, progress_cb, progress_arg);
 		goto done;
@@ -1290,7 +1290,7 @@ install_symlink(struct got_worktree *worktree, const c
 		/* install as a regular file */
 		got_object_blob_rewind(blob);
 		err = install_blob(worktree, ondisk_path, path,
-		    GOT_DEFAULT_FILE_MODE, st_mode, blob,
+		    GOT_DEFAULT_FILE_MODE, GOT_DEFAULT_FILE_MODE, blob,
 		    restoring_missing_file, reverting_versioned_file, 1,
 		    repo, progress_cb, progress_arg);
 		goto done;
@@ -1334,7 +1334,7 @@ install_symlink(struct got_worktree *worktree, const c
 			/* bad target path; install as a regular file */
 			got_object_blob_rewind(blob);
 			err = install_blob(worktree, ondisk_path, path,
-			    GOT_DEFAULT_FILE_MODE, st_mode, blob,
+			    GOT_DEFAULT_FILE_MODE, GOT_DEFAULT_FILE_MODE, blob,
 			    restoring_missing_file, reverting_versioned_file, 1,
 			    repo, progress_cb, progress_arg);
 		} else if (errno == ENOTDIR) {