[PATCH 03/38] backports: bpgit: handle copied files properly in status()
Johannes Berg <[email protected]> Tue, 11 Oct 2022 23:04:11 +0200
| Newsgroups | org.kernel.vger.backports |
|---|---|
| Message-ID | <20221011230356.e477f575e241.I0331054c4f3fad9d33b9e51228dabd6a28bbf8fb@changeid> |
From: Johannes Berg <[email protected]> 'C' as the setatus also has two files, so need to continue as well to get the second file added to this line. Signed-off-by: Johannes Berg <[email protected]> Reviewed-on: https://git-ger-8.devtools.intel.com/gerrit/135974 Reviewed-by: Luciano Coelho <[email protected]> Tested-by: Luciano Coelho <[email protected]> --- lib/bpgit.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/bpgit.py b/lib/bpgit.py index 9d35a3896ed9..77dab8bd2528 100644 --- a/lib/bpgit.py +++ b/lib/bpgit.py @@ -50,7 +50,7 @@ def status(tree=None): of the form ('XY', 'filename') or - ('XY', 'filename_to', 'filename_from') [if X is 'R' for rename] + ('XY', 'filename_to', 'filename_from') [if X is 'R' for rename or 'C' for copy] ''' cmd = ['git', 'status', '--porcelain', '-z'] @@ -70,7 +70,7 @@ def status(tree=None): cur.append(i[:2]) assert i[2] == ' ' cur.append(i[3:]) - if i[0] == 'R': + if i[0] in ['R', 'C']: continue else: cur.append(i) -- 2.37.3 -- To unsubscribe from this list: send the line "unsubscribe backports" in