On Wednesday 21 August 2013 11:40:09 Daniel Kahn Gillmor wrote: > > I would like to wait another week or so for feedback before I start > > creating a patch (for my two points above). Are you going to implement > > --https-only ? > i'm afraid i don't have time to implement --https-only in the forseeable > future, sorry :(
I made a patch this morning. Just for your interest, here is how I did it (without too many details). To see where I have to start, I searched for 'secure-protocol' and 'secureprotocol'. That lead me to the points where I had to change stuff for new options including --help text. Than I had to find the code where Wget decides whether to enqueue a link or not - I searched for 'follow-ftp' which lead me to search for 'followftp' to see the corresponding variable is opt.follow_ftp. Now searching for usages of opt.follow_ftp lead me to recur.c/download_child_p(). And here was the point to include the check for my new variable opt.https_only. That was straight forward and took (including compiling and testing with 'wget -d --https-only -r https://www.google.de 2>&1|grep -i non-https') exactly 20 minutes. Now I had to write a new test which took me 15 minutes (I trapped into a pitfall, I needed the -nH option for a successful test, that took a while to find out). Next, I had to edit wget.texi. This took 6 minutes. I thought I am ready, did a git commit -a -m "..." and a git format-patch -1 to create the patch. While writing the email for the list, I realized that I forgot the ChangeLogs... arg. A 'git reset --soft HEAD^1' made my commit undone, I changed src/ChangeLog, tests/ChangeLog and doc/ChangeLog and committed and created the patch again. This took me another 16 minutes, that sums up to a 67 minutes (one hour less to watch TV in the evening ;-). As you can see, the programming/compiling/simple_testing part took less than a third of the total time. Just to make clear that a programmer is mostly busy with other things than programming. Regards, Tim
