diff mbox series

build: enable developer mode for all working trees

Message ID 20220810174058.604568-1-dmitry.kozliuk@gmail.com (mailing list archive)
State Accepted
Delegated to: Thomas Monjalon
Headers show
Series build: enable developer mode for all working trees | expand

Checks

Context Check Description
ci/iol-intel-Functional success Functional Testing PASS
ci/iol-intel-Performance success Performance Testing PASS
ci/iol-x86_64-compile-testing success Testing PASS
ci/iol-aarch64-compile-testing success Testing PASS
ci/iol-aarch64-unit-testing success Testing PASS
ci/iol-x86_64-unit-testing success Testing PASS
ci/intel-Testing success Testing PASS
ci/iol-mellanox-Performance success Performance Testing PASS
ci/Intel-compilation success Compilation OK
ci/github-robot: build success github build: passed
ci/checkpatch success coding style OK

Commit Message

Dmitry Kozlyuk Aug. 10, 2022, 5:40 p.m. UTC
Developer mode was detected if `.git` was a directory.
Linked git working trees created by `git worktree add`
contain `.git` file instead of `.git` directory.
Developer mode was not detected for such directories.
Detect developer mode by the presence of `.git` path.

Fixes: bc4617433845 ("build: enable a developer mode setting")
Cc: stable@dpdk.org

Signed-off-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
---
 meson.build | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Stephen Hemminger Aug. 10, 2022, 7:26 p.m. UTC | #1
On Wed, 10 Aug 2022 20:40:58 +0300
Dmitry Kozlyuk <dmitry.kozliuk@gmail.com> wrote:

> Developer mode was detected if `.git` was a directory.
> Linked git working trees created by `git worktree add`
> contain `.git` file instead of `.git` directory.
> Developer mode was not detected for such directories.
> Detect developer mode by the presence of `.git` path.
> 
> Fixes: bc4617433845 ("build: enable a developer mode setting")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>

Acked-by: Stephen Hemminger <stephen@networkplumber.org>
Ferruh Yigit Aug. 16, 2022, 8:51 a.m. UTC | #2
On 8/10/2022 8:26 PM, Stephen Hemminger wrote:
> On Wed, 10 Aug 2022 20:40:58 +0300
> Dmitry Kozlyuk <dmitry.kozliuk@gmail.com> wrote:
> 
>> Developer mode was detected if `.git` was a directory.
>> Linked git working trees created by `git worktree add`
>> contain `.git` file instead of `.git` directory.
>> Developer mode was not detected for such directories.
>> Detect developer mode by the presence of `.git` path.
>>
>> Fixes: bc4617433845 ("build: enable a developer mode setting")
>> Cc: stable@dpdk.org
>>
>> Signed-off-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
> 
> Acked-by: Stephen Hemminger <stephen@networkplumber.org>


Acked-by: Ferruh Yigit <ferruh.yigit@xilinx.com>
Thomas Monjalon Aug. 29, 2022, 10:47 a.m. UTC | #3
16/08/2022 10:51, Ferruh Yigit:
> On 8/10/2022 8:26 PM, Stephen Hemminger wrote:
> > On Wed, 10 Aug 2022 20:40:58 +0300
> > Dmitry Kozlyuk <dmitry.kozliuk@gmail.com> wrote:
> > 
> >> Developer mode was detected if `.git` was a directory.
> >> Linked git working trees created by `git worktree add`
> >> contain `.git` file instead of `.git` directory.
> >> Developer mode was not detected for such directories.
> >> Detect developer mode by the presence of `.git` path.
> >>
> >> Fixes: bc4617433845 ("build: enable a developer mode setting")
> >> Cc: stable@dpdk.org
> >>
> >> Signed-off-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
> > Acked-by: Stephen Hemminger <stephen@networkplumber.org>
> Acked-by: Ferruh Yigit <ferruh.yigit@xilinx.com>

Good catch!
I am a user of the "git worktree" feature, it is very convenient
to do some parallel work and not mess recompilation.

Applied, thanks.
diff mbox series

Patch

diff --git a/meson.build b/meson.build
index a32f14024b..7d6643da3a 100644
--- a/meson.build
+++ b/meson.build
@@ -20,7 +20,7 @@  developer_mode = false
 if get_option('developer_mode').auto()
     if meson.version().version_compare('>=0.53') # fs module available
         fs = import('fs')
-        developer_mode = fs.is_dir('.git')
+        developer_mode = fs.exists('.git')
     endif
 else
     developer_mode = get_option('developer_mode').enabled()