From: Junio C Hamano Date: Thu, 13 Apr 2006 05:03:34 GMT Subject: Re: Common option parsing.. Message-ID: <7vmzeq12zd.fsf@assigned-by-dhcp.cox.net> In-Reply-To: Linus Torvalds writes: > The easiest way to just solve all this mess would be to > - add the diff-options into "struct rev_list" and make the > "setup_revisions()" parser parse the diff flags too. > - get rid of "log_info" and "diff_options" > - possibly rename the resulting super-options structure as "struct > git_options" or something if we want to. >... > What do you think? I think it all makes sense. And once this kind of clean-up is done, I suspect the implementations of "git diff", "git log" and "git show" would become quite similar -- one notable difference being "git diff" with a single rev and "git show" with a single rev would be quite different, but that is just how the arguments are interpreted, not parsed. However, I am not sure about the two-revs case. I suspect the incoming items are sorted in the revs->commits list, and we wouldn't be able to tell which is src and which is dst when setup_revisions() returns.