Fri, 16 Jan 2015 10:57:13 -0800 trydiff: make variable names more consistent
Martin von Zweigbergk <martinvonz@google.com> [Fri, 16 Jan 2015 10:57:13 -0800] rev 23997
trydiff: make variable names more consistent Use '1' and '2' as suffix for names just like in the parameters 'ctx[12]': to,tn -> content1,content2 a,b -> f1, f2 omode,mode -> mode1,mode2 omode,nmode -> mode1,mode2 onode,nnode -> node1,node2 oflag,nflag -> flag1,flag2 oindex,nindex -> index1,index2
Fri, 16 Jan 2015 17:01:58 -0800 trydiff: check only if added file is a copy target, not source
Martin von Zweigbergk <martinvonz@google.com> [Fri, 16 Jan 2015 17:01:58 -0800] rev 23996
trydiff: check only if added file is a copy target, not source When creating a diff with copy/rename enabled, we consider added files and check if they are either copy sources or targets. However, an added file should never be a copy source. The test suite seems to agree with this: all tests pass if we raise an exception when an added file is a copy source. So, let's simplify the code by dropping the conditions that are never true. For those interested in the historical reasons: Before commit d1f209bb9564 (patch: separate reverse copy data (issue1959), 2010-02-11), 'copy' seems to have been a bidirectional map. Then that commit split it up into two unidirectional maps and duplicated the logic to look in both maps. It was still needed at that point to look in both maps, as the copy detection was poor and could sometimes be reported in reverse. A little later came 91eb4512edd0 (copies: rewrite copy detection for non-merge users, 2012-01-04). That commit fixed the copy detection to be backwards when it should, and made the hacks in trydiff unnecessary.
Thu, 29 Jan 2015 21:12:35 -0800 trydiff: remove unused variable 'modifiedset'
Martin von Zweigbergk <martinvonz@google.com> [Thu, 29 Jan 2015 21:12:35 -0800] rev 23995
trydiff: remove unused variable 'modifiedset' We started updating 'modifiedset' in a9853fc172d2 (trydiff: simplify checking for additions, 2014-12-23) but in the same commit, we removed the last use of the variable. Clean it up.
(0) -10000 -3000 -1000 -300 -100 -30 -10 -3 +3 +10 +30 +100 +300 +1000 +3000 +10000 tip