diff mbox series

[1/2] check_applies_clean: Don't append '.git' repeatedly

Message ID 20210618182452.2577871-1-robh@kernel.org (mailing list archive)
State New, archived
Headers show
Series [1/2] check_applies_clean: Don't append '.git' repeatedly | expand

Commit Message

Rob Herring (Arm) June 18, 2021, 6:24 p.m. UTC
In check_applies_clean, each iteration of the file loop in appends '.git'
to 'gitdir' again which is obviously wrong.

Signed-off-by: Rob Herring <robh@kernel.org>
---
 b4/__init__.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Konstantin Ryabitsev June 21, 2021, 8:02 p.m. UTC | #1
On Fri, Jun 18, 2021 at 12:24:51PM -0600, Rob Herring wrote:
> In check_applies_clean, each iteration of the file loop in appends '.git'
> to 'gitdir' again which is obviously wrong.

There was already a fix for this in master and stable-0.7.y.

-K
diff mbox series

Patch

diff --git a/b4/__init__.py b/b4/__init__.py
index 8d8911d392b5..ddf38293dce2 100644
--- a/b4/__init__.py
+++ b/b4/__init__.py
@@ -655,7 +655,7 @@  class LoreSeries:
                     logger.debug('Checking hash on %s:%s', when, fn)
                     # XXX: We should probably pipe the two commands instead of reading into memory,
                     #      so something to consider for the future
-                    ecode, out = git_run_command(gitdir, ['show', f'{when}:{fn}'])
+                    ecode, out = git_run_command(os.path.join(gitdir, '.git'), ['show', f'{when}:{fn}'])
                     if ecode > 0:
                         # Couldn't get this file, continue
                         logger.debug('Could not look up %s:%s', when, fn)