Commit 280ce56b authored by David Edmundson's avatar David Edmundson
Browse files

Create .git/info directory if it does not exist before grafting


When cloning a new repository the directory .git/info does not
always exist. This change ensures this directory is always created
before trying to write to a file in that directory.

Change-Id: I9488caa7c4d0d80588ba880bee3bf9d8c11cca92
Reviewed-by: default avatarOswald Buddenhagen <oswald.buddenhagen@digia.com>
parent e3345e6c
Branches
Tags
No related merge requests found
Showing with 2 additions and 0 deletions
...@@ -99,8 +99,10 @@ while (<$GIT_REVLIST>) { ...@@ -99,8 +99,10 @@ while (<$GIT_REVLIST>) {
close($GIT_REVLIST); close($GIT_REVLIST);
my $found_any_grafts = 0; my $found_any_grafts = 0;
mkdir("$git_dir/info");
my $graft_file = "$git_dir/info/grafts"; my $graft_file = "$git_dir/info/grafts";
my @graft_lines; my @graft_lines;
foreach my $commit (@commits) { foreach my $commit (@commits) {
# find the graft point which the commit mentions # find the graft point which the commit mentions
my $commit_msg = `git show -s --format=%b $commit`; my $commit_msg = `git show -s --format=%b $commit`;
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment