Re: Recent unresolved issues
- From
Linus Torvalds <torvalds@osdl.org>
- Date
- Apr 15, 2006, 04:09 UTC
- Message-ID
- <Pine.LNX.4.64.0604142104140.3701@g5.osdl.org>
- In-Reply-To
- <7vacanmxhe.fsf@assigned-by-dhcp.cox.net>
On Fri, 14 Apr 2006, Junio C Hamano wrote:
> > Another thing is that some revision.c users are not interested > in taking diff options at all.
Well, it's easy enough to do something like
if (rev->diff) usage(no_diff_cmd_usage);
for something like that.
Show 7 quoted lines
> I was going to suggest a new structure that captures struct > rev_info, struct log_tree_opt and miscellaneous bits cmd_log > uses such as do_diff, full_diff, etc., and move the option > parser out of cmd_log() to a separate function, and have that > shared across cmd_log(), cmd_show(), cmd_whatchanged(), and > cmd_diff() without affecting any of the existing revision.c > users. That way, "rev-list --cc HEAD" will remain nonsense.
Well, I actually was going to make git-rev-list just take the diff options, and it ends up doing the same thing as "git log" with them. There's no real downside.
> One nice property your approach has is that it makes > "git diff-tree a..b" magically starts working, unlike what > I suggested above.
Yeah. It just fell out automatically from using the rev-list parsing.
Although, the thing is, once we have a built-in "git diff", there's actually little enough reason to ever use the old "git-diff-tree" vs "git-diff-index" vs "git-diff-files" at all.
It might actually be nice to prune some of the tons of git commands. At some point, the fact that
echo bin/git-* | wc -w
returns 122 just makes you go "Hmm..".
Linus