Skip to content

Safer tempfiles #1450

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fixed Minor Bugs
  • Loading branch information
whokilleddb committed May 28, 2022
commit 2b5467ee1b84e41d6b28b2c3852cd181d102ca16
2 changes: 1 addition & 1 deletion git/index/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,7 @@ def from_tree(cls, repo: "Repo", *treeish: Treeish, **kwargs: Any) -> "IndexFile

# tmp file created in git home directory to be sure renaming
# works - /tmp/ dirs could be on another device
tmp_index = tempfile.mkstemp("", "", dir=repo.git_dir)
tmp_index = tempfile.mkstemp("", "", dir=repo.git_dir)[1]
arg_list.append("--index-output=%s" % tmp_index)
arg_list.extend(treeish)

Expand Down