]> git.dujemihanovic.xyz Git - u-boot.git/commit
tools: moveconfig: simplify source tree switching
authorMasahiro Yamada <yamada.masahiro@socionext.com>
Wed, 15 Jun 2016 05:33:52 +0000 (14:33 +0900)
committerMasahiro Yamada <yamada.masahiro@socionext.com>
Wed, 22 Jun 2016 00:22:48 +0000 (09:22 +0900)
commitf432c33f27898070718dd568feb104fc1870ca15
tree941374780f3ff50d472429af61ab93796851e464
parent5cc42a51846cd69596081a9cd9d2bd0495815525
tools: moveconfig: simplify source tree switching

The subprocess.Popen() does not change the child process's working
directory if cwd=None is given.  Let's exploit this fact to refactor
the source directory handling.

We no longer have to pass "-C <reference_src_dir>" to the sub-process
because self.current_src_dir tracks the source tree against which we
want to run defconfig/autoconf.

The flag self.use_git_ref is not necessary either because we can know
the current state by checking whether the self.current_src_dir is a
valid string or None.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
tools/moveconfig.py