aboutsummaryrefslogtreecommitdiff
path: root/builtin-pack-refs.c
diff options
context:
space:
mode:
authorJakub Narebski <jnareb@gmail.com>2007-11-01 12:38:08 +0100
committerJunio C Hamano <gitster@pobox.com>2007-11-01 17:34:41 -0700
commit9d3014566302ad0d3d378b0a1653959b3118066d (patch)
tree3d8e8d0667d17b39b8bbd8d29a551ec03fd84b68 /builtin-pack-refs.c
parent3e4bb087a18435b12eb82116e93af2887578e816 (diff)
downloadgit-9d3014566302ad0d3d378b0a1653959b3118066d.tar.gz
git-9d3014566302ad0d3d378b0a1653959b3118066d.tar.xz
gitweb: Always set 'from_file' and 'to_file' in parse_difftree_raw_line
Always set 'from_file' and 'to_file' keys when parsing raw diff output format line, even if filename didn't change (file was not renamed). This allows for simpler code. Previously, you would have written: $diffinfo->{'from_file'} || $diffinfo->{'file'} but now you can just use $diffinfo->{'from_file'} as 'from_file' is always defined. While at it, replace (for merge commits) $diffinfo->{'from_file'}[$i] || $diffinfo->{'to_file'} by defined $diffinfo->{'from_file'}[$i] ? $diffinfo->{'from_file'}[$i] : $diffinfo->{'to_file'}; to have no problems with file named '0'. Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin-pack-refs.c')
0 files changed, 0 insertions, 0 deletions