git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <junkio@cox.net>
To: Carl Worth <cworth@cworth.org>
Cc: git@vger.kernel.org
Subject: Re: Two crazy proposals for changing git's diff commands
Date: Thu, 09 Feb 2006 16:13:42 -0800	[thread overview]
Message-ID: <7vr76c5avd.fsf@assigned-by-dhcp.cox.net> (raw)
In-Reply-To: <87bqxgxfl7.wl%cworth@cworth.org> (Carl Worth's message of "Thu, 09 Feb 2006 15:44:20 -0800")

Carl Worth <cworth@cworth.org> writes:

> So, what I'm trying to work towards is a situtation where those
> workflows are captured through obviously-correlated command
> subsets. This is what I was getting at in the PS. of my previous
> post. For example, the above could be, (ignoring the clash with
> existing core commands), something like:
>
> Index-lover:
>
> 	update-index
> 	diff-index
> 	commit-index
>
> Index-ignorer:
>
> 	diff-files
> 	commit-files

I see where you are coming from and I personally kind of like
this consistency.  But I am hesitant to declare these two
workflows as the _only_ ones officially supported by the tool at
this moment.  The collective use pattern of git is still young
and leaving the door open would help us to evolve more useful
workflows around the core in the future.  One of our first goals
would be to have good set of introductory documentations for
best current practices -- if the project you work on fits this
workflow, here is a way to do it.  With that workflow, there is
this way.  By that time, hopefully many useless workflows (my
"constantly rewinding pu branch" pattern _could_ fall into that
category) would be withered away and it would be a good time to
streamline the tool around officially supported workflows.

My feeling is that it is a bit premature to do that right now; I
do not think we are there yet.

> Sure. In that light, try to conceive as my proposed "diff-files" and
> "diff-index" commands as two new highlevel commands. They would be
> useful in day-to-day operation, and most commonly without any need for
> command-line arguments. Those two operations exist today within the
> git-diff wrapper already as "diff HEAD" and "diff --cached HEAD" (or
> "diff --cached). But as described above, I think it would be better to
> put these operations on separate command names, and get them down to
> not requiring any command-line arguments in their common usage.

Sorry, I am not convinced about separate command names, but in
the meantime you could have small wrappers around "git diff":
"cw-diff-files" and "cw-diff-index" would be one liner each,
wouldn't they?

And that is a _good_ thing about git.  If the sample set of
barebone Porcelains do not fit your needs, you can mix and match
using lowlevel commands to quickly script your customized ones.
If that is useful in general, that would become one of the best
current practices.

> If you compare my above two chunks of example commands, there's nothing
> like a low-level vs. high-level distinction between them. It's more
> about separate command names being uses for different use cases and
> consistent naming used to group related commands within a use case.

I think that is where we differ.  I think even for index-lover
"diff HEAD" is useful in certain cases (obviously index-ignorer
would not see much useful output from "diff --cached", though).
In fact, I fall into "index-lover" camp but I use both depending
on occasion.  And as I said, I do not think "index-lover" and
"index-ignorer" distinction above would be the only two valid
workflows anyway, so I feel partitioning the command set along
those lines is at least premature if not wrong.

  reply	other threads:[~2006-02-10  0:14 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-02-09  0:29 Two crazy proposals for changing git's diff commands Carl Worth
2006-02-09  1:05 ` Linus Torvalds
2006-02-09  1:21   ` Linus Torvalds
2006-02-09 23:07     ` Carl Worth
2006-02-09 23:40       ` Junio C Hamano
2006-02-09  1:35   ` Junio C Hamano
2006-02-09  1:21 ` Junio C Hamano
2006-02-09  1:30   ` Linus Torvalds
2006-02-09  1:37     ` Junio C Hamano
2006-02-10  9:05     ` Junio C Hamano
2006-02-10 20:32       ` Comments on "status -v" (was: Two crazy proposals for changing git's diff commands) Carl Worth
2006-02-10 21:09         ` Comments on "status -v" Junio C Hamano
2006-02-10 21:35           ` Linus Torvalds
2006-02-10 22:12             ` Junio C Hamano
2006-02-10 22:51           ` Petr Baudis
2006-02-10 23:26             ` Junio C Hamano
2006-02-09 23:44   ` Two crazy proposals for changing git's diff commands Carl Worth
2006-02-10  0:13     ` Junio C Hamano [this message]
2006-02-10  1:24       ` Carl Worth
2006-02-10  2:24         ` Junio C Hamano
2006-02-10  3:18           ` Carl Worth
2006-02-10 17:06           ` Mark Wooding
2006-02-13  9:23             ` Catalin Marinas
2006-02-13 22:00             ` Prune-safe StGIT (was Re: Two crazy proposals for changing git's diff commands) Catalin Marinas
2006-02-10 19:36           ` Two crazy proposals for changing git's diff commands Kent Engstrom
2006-02-11 19:25             ` Junio C Hamano
2006-02-12 12:00               ` [PATCH] Add howto about separating topics kent
2006-02-12  3:15   ` Two crazy proposals for changing git's diff commands J. Bruce Fields
2006-02-12  3:48     ` Junio C Hamano
2006-02-09 16:44 ` Tim Larson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7vr76c5avd.fsf@assigned-by-dhcp.cox.net \
    --to=junkio@cox.net \
    --cc=cworth@cworth.org \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).