utils: checkstyle.py: Initialise staged trailers
There are no possible Trailers for staged changes as the commit message has not yet been written. Initialise the empty trailers when the commit object is initialised. Reviewed-by: Umang Jain <umang.jain@ideasonboard.com> Tested-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
This commit is contained in:
parent
b14d2cab12
commit
37106ba02a
1 changed files with 3 additions and 0 deletions
|
@ -253,6 +253,9 @@ class StagedChanges(Commit):
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
Commit.__init__(self, '')
|
Commit.__init__(self, '')
|
||||||
|
|
||||||
|
# There are no trailers to parse on a Staged Change.
|
||||||
|
self._trailers = []
|
||||||
|
|
||||||
def _parse(self):
|
def _parse(self):
|
||||||
ret = subprocess.run(['git', 'diff', '--staged', '--name-status'],
|
ret = subprocess.run(['git', 'diff', '--staged', '--name-status'],
|
||||||
stdout=subprocess.PIPE).stdout.decode('utf-8')
|
stdout=subprocess.PIPE).stdout.decode('utf-8')
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue