Message ID | 1508267289-7230-1-git-send-email-marcelo.cerri@canonical.com |
---|---|
State | New |
Headers | show |
Series | [kteam-tools] ktl: force default format for Git.log() | expand |
On 10/17/17 21:08, Marcelo Henrique Cerri wrote: > Force default git log format, so Git.log() return will be consistent > even if format.pretty is defined with a different value in .gitconfig. > > Signed-off-by: Marcelo Henrique Cerri <marcelo.cerri@canonical.com> Good catch :-). Acked-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com> > --- > ktl/git.py | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/ktl/git.py b/ktl/git.py > index 5c4e270e72fa..67444e5ddb02 100644 > --- a/ktl/git.py > +++ b/ktl/git.py > @@ -204,9 +204,9 @@ class Git: > cls.log_results['commits'] = [] > cls.log_results['buglink-index'] = {} > if num != -1: > - status, result = run_command("git log -%d" % (num), cls.debug) > + status, result = run_command("git log --pretty=medium -%d" % (num), cls.debug) > else: > - status, result = run_command("git log", cls.debug) > + status, result = run_command("git log --pretty=medium", cls.debug) > commit = {} > commit_text = [] > current_sha1 = 'unknown' >
Applied to kteam-tools/master branch. Kleber
diff --git a/ktl/git.py b/ktl/git.py index 5c4e270e72fa..67444e5ddb02 100644 --- a/ktl/git.py +++ b/ktl/git.py @@ -204,9 +204,9 @@ class Git: cls.log_results['commits'] = [] cls.log_results['buglink-index'] = {} if num != -1: - status, result = run_command("git log -%d" % (num), cls.debug) + status, result = run_command("git log --pretty=medium -%d" % (num), cls.debug) else: - status, result = run_command("git log", cls.debug) + status, result = run_command("git log --pretty=medium", cls.debug) commit = {} commit_text = [] current_sha1 = 'unknown'
Force default git log format, so Git.log() return will be consistent even if format.pretty is defined with a different value in .gitconfig. Signed-off-by: Marcelo Henrique Cerri <marcelo.cerri@canonical.com> --- ktl/git.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)