Home > Software design >  Python subprocess - git log wrong JSON Format
Python subprocess - git log wrong JSON Format

Time:12-14

I tried to format git log to json but failed miserabely.

I used this command for the formatting, and I don't think this is where my problem lies, but hey you never know.

These are my functions.

def call_git_log():
    format: str = '{%n  "commit": "%H",%n  "abbreviated_commit": "%h",%n  "tree": "%T",%n  "abbreviated_tree": "%t",%n  "parent": "%P",%n  "abbreviated_parent": "%p",%n  "refs": "%D",%n  "encoding": "%e",%n  "subject": "%s",%n  "sanitized_subject_line": "%f",%n  "body": "%b",%n  "commit_notes": "%N",%n  "verification_flag": "%G?",%n  "signer": "%GS",%n  "signer_key": "%GK",%n  "author": {%n    "name": "%aN",%n    "email": "           
  • Related