diff options
author | David Edmundson <davidedmundson@kde.org> | 2014-02-04 16:20:05 +0100 |
---|---|---|
committer | David Edmundson <davidedmundson@kde.org> | 2014-03-11 18:12:24 +0100 |
commit | 280ce56b89bb0bd0cc89141039565beff45e1e28 (patch) | |
tree | d763f497a4a1ce977ab84a67c821eaa978ac01c1 /bin/git-qt-grafts | |
parent | e3345e6cb10566c89b272b106c48deeb0f13b5fa (diff) | |
download | qtrepotools-280ce56b89bb0bd0cc89141039565beff45e1e28.tar.gz |
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: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Diffstat (limited to 'bin/git-qt-grafts')
-rwxr-xr-x | bin/git-qt-grafts | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/bin/git-qt-grafts b/bin/git-qt-grafts index 6fe38a1..6a8872b 100755 --- a/bin/git-qt-grafts +++ b/bin/git-qt-grafts @@ -99,8 +99,10 @@ while (<$GIT_REVLIST>) { close($GIT_REVLIST); my $found_any_grafts = 0; +mkdir("$git_dir/info"); my $graft_file = "$git_dir/info/grafts"; my @graft_lines; + foreach my $commit (@commits) { # find the graft point which the commit mentions my $commit_msg = `git show -s --format=%b $commit`; |