{"thread":{"id":"9970","subject":"[PATCH 5/5] gitweb: Add 'status_str' to parse_difftree_raw_line output","startedAt":"2007-09-21T21:41:12Z","lastAt":"2007-09-21T21:41:12Z","messageCount":1,"participants":["Jakub Narebski"],"isPatch":true,"patchVersion":1,"patchTotal":5},"messages":[{"id":"53758","messageId":"8fe92b430709211441x59489fc7u5b784ad70e8e903f@mail.gmail.com","threadId":"9970","inReplyTo":null,"subject":"[PATCH 5/5] gitweb: Add 'status_str' to parse_difftree_raw_line output","fromName":"Jakub Narebski","fromEmail":"jnareb@gmail.com","sentAt":"2007-09-21T21:41:12Z","receivedAt":"2007-09-21T21:41:12Z","isPatch":true,"sender":{"key":"jnareb@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2706?v=4"},"body":"Add 'status_str' to diffinfo output, which stores status (also for\nmerge commit) as a string.  This allows for easy checking if there is\ngiven status among all for merge commit, e.g.\n  $diffinfo->{'status_str'} =~ /D/\n\nSigned-off-by: Jakub Narebski <jnareb@gmail.com>\n---\nThis is to simplify _future_ code, so I won't cry if it is not\naccepted without some code that needs it.\n\n gitweb/gitweb.perl |    3 ++-\n 1 files changed, 2 insertions(+), 1 deletions(-)\n\n\nFrom d5d0886111e98dc281d8503daa1ce655ea7729bf Mon Sep 17 00:00:00 2001\nFrom: Jakub Narebski <jnareb@gmail.com>\nDate: Thu, 13 Sep 2007 21:57:20 +0200\nSubject: [PATCH 5/5] gitweb: Add 'status_str' to parse_difftree_raw_line output\n\nAdd 'status_str' to diffinfo output, which stores status (also for\nmerge commit) as a string.  This allows for easy checking if there is\ngiven status among all for merge commit, e.g.\n  $diffinfo->{'status_str'} =~ /D/\n\nSigned-off-by: Jakub Narebski <jnareb@gmail.com>\n---\nThis is to simplify _future_ code, so I won't cry if it is not\naccepted without some code that needs it.\n\n gitweb/gitweb.perl |    3 ++-\n 1 files changed, 2 insertions(+), 1 deletions(-)\n\ndiff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl\nindex 6c79a95..adc1b32 100755\n--- a/gitweb/gitweb.perl\n+++ b/gitweb/gitweb.perl\n@@ -1963,7 +1963,7 @@ sub parse_difftree_raw_line {\n \t\t$res{'to_mode'} = $2;\n \t\t$res{'from_id'} = $3;\n \t\t$res{'to_id'} = $4;\n-\t\t$res{'status'} = $5;\n+\t\t$res{'status'} = $res{'status_str'} = $5;\n \t\t$res{'similarity'} = $6;\n \t\tif ($res{'status'} eq 'R' || $res{'status'} eq 'C') { # renamed or copied\n \t\t\t($res{'from_file'}, $res{'to_file'}) = map { unquote($_) } split(\"\\t\", $7);\n@@ -1979,6 +1979,7 @@ sub parse_difftree_raw_line {\n \t\t$res{'to_mode'} = pop @{$res{'from_mode'}};\n \t\t$res{'from_id'} = [ split(' ', $3) ];\n \t\t$res{'to_id'} = pop @{$res{'from_id'}};\n+\t\t$res{'status_str'} = $4;\n \t\t$res{'status'} = [ split('', $4) ];\n \t\t$res{'to_file'} = unquote($5);\n \t}\n-- \n1.5.3\n\n"}]}