Mercurial > hg
diff contrib/casesmash.py @ 24056:ae453d166d51
trydiff: replace 'binarydiff' variable by 'binary' variable
It's not obvious, but every path in the 'if opts.git or losedatafn:'
block will have checked whether the file is binary [1]. Let's assign
the result of this check to a variable so we can simplify by checking
'binary and opts.git' in only one place instead of every place we
currently assign to 'binarydiff'.
[1] Except when deleting an empty file, but checking whether an empty
string is binary is very cheap anyway.
author | Martin von Zweigbergk <martinvonz@google.com> |
---|---|
date | Thu, 22 Jan 2015 21:03:57 -0800 |
parents | 9de689d20230 |
children | 42a7301fb4d5 |