diff options
Diffstat (limited to 'scripts/lib/devtool/__init__.py')
| -rw-r--r-- | scripts/lib/devtool/__init__.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/scripts/lib/devtool/__init__.py b/scripts/lib/devtool/__init__.py index 216b7c345a..b432e3d44e 100644 --- a/scripts/lib/devtool/__init__.py +++ b/scripts/lib/devtool/__init__.py | |||
| @@ -196,15 +196,18 @@ def use_external_build(same_dir, no_same_dir, d): | |||
| 196 | b_is_s = False | 196 | b_is_s = False |
| 197 | return b_is_s | 197 | return b_is_s |
| 198 | 198 | ||
| 199 | def setup_git_repo(repodir, version, devbranch, basetag='devtool-base'): | 199 | def setup_git_repo(repodir, version, devbranch, basetag='devtool-base', d=None): |
| 200 | """ | 200 | """ |
| 201 | Set up the git repository for the source tree | 201 | Set up the git repository for the source tree |
| 202 | """ | 202 | """ |
| 203 | import bb.process | 203 | import bb.process |
| 204 | import oe.patch | ||
| 204 | if not os.path.exists(os.path.join(repodir, '.git')): | 205 | if not os.path.exists(os.path.join(repodir, '.git')): |
| 205 | bb.process.run('git init', cwd=repodir) | 206 | bb.process.run('git init', cwd=repodir) |
| 206 | bb.process.run('git add .', cwd=repodir) | 207 | bb.process.run('git add .', cwd=repodir) |
| 207 | commit_cmd = ['git', 'commit', '-q'] | 208 | commit_cmd = ['git'] |
| 209 | oe.patch.GitApplyTree.gitCommandUserOptions(commit_cmd, d=d) | ||
| 210 | commit_cmd += ['commit', '-q'] | ||
| 208 | stdout, _ = bb.process.run('git status --porcelain', cwd=repodir) | 211 | stdout, _ = bb.process.run('git status --porcelain', cwd=repodir) |
| 209 | if not stdout: | 212 | if not stdout: |
| 210 | commit_cmd.append('--allow-empty') | 213 | commit_cmd.append('--allow-empty') |
