aboutsummaryrefslogtreecommitdiffstats
path: root/t
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@datawire.io>2021-04-27 15:17:26 -0600
committerJunio C Hamano <gitster@pobox.com>2021-04-28 16:47:17 +0900
commitf1cd2d93c207a0db5d85bcaf5a7b71ea60ceecb5 (patch)
tree2f60a6388e380d253f90d2350d721759d1baae83 /t
parentsubtree: t7900: delete some dead code (diff)
downloadgit-f1cd2d93c207a0db5d85bcaf5a7b71ea60ceecb5.tar.gz
git-f1cd2d93c207a0db5d85bcaf5a7b71ea60ceecb5.zip
subtree: t7900: fix 'verify one file change per commit'
As far as I can tell, this test isn't actually testing anything, because someone forgot to tack on `--name-only` to `git log`. This seems to have been the case since the test was first written, back in fa16ab36ad ("test.sh: make sure no commit changes more than one file at a time.", 2009-04-26), unless `git log` used to do that by default and didn't need the flag back then? Convincing myself that it's not actually testing anything was tricky, the code is a little hard to reason about. It can be made a lot simpler if instead of trying to parse all of the info from a single `git log`, we're OK calling `git log` from inside of a loop. And it's my opinion that tests are not the place for clever optimized code. So, fix and simplify the test, so that it's actually testing something and is simpler to reason about. Signed-off-by: Luke Shumaker <lukeshu@datawire.io> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't')
0 files changed, 0 insertions, 0 deletions