]> Lady’s Gitweb - Gitweb/commit
gitweb: A bit of code cleanup in git_blame()
authorJakub Narebski <redacted>
Tue, 9 Dec 2008 22:48:51 +0000 (23:48 +0100)
committerLady <redacted>
Mon, 6 Apr 2026 04:50:38 +0000 (00:50 -0400)
commitf587ef9f50ee30c1e1944ef9d0dfac0708bcd4b3a6722b0c5ebb1458443a077c
tree27691693c142802ca5a9f240523674affc9355576db2ff7d1cc4c8c9815d7114
parentdae73140f5764108d779c335845ffd7e43913b112d9627a6819d9b9000c1918a
gitweb: A bit of code cleanup in git_blame()

Among others, here are the highlights:

 * move variable declaration closer to the place it is set and used,
   if possible,

 * uniquify and simplify coding style a bit, which includes removing
   unnecessary '()'.

 * check type only if $hash was defined, as otherwise from the way
   git_get_hash_by_path() is called (and works), we know that it is
   a blob,

 * use modern calling convention for git-blame,

 * remove unused variable,

 * don't use implicit variables ($_),

 * add some comments

Signed-off-by: Jakub Narebski <redacted>
Acked-by: Luben Tuikov <redacted>
Signed-off-by: Junio C Hamano <redacted>
gitweb.perl
This page took 0.223127 seconds and 4 git commands to generate.