git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Carl Worth <cworth@cworth.org>
To: Linus Torvalds <torvalds@osdl.org>
Cc: Junio C Hamano <junkio@cox.net>, Nicolas Pitre <nico@cam.org>,
	git@vger.kernel.org
Subject: Re: Two ideas for improving git's user interface
Date: Fri, 03 Feb 2006 16:20:38 -0800	[thread overview]
Message-ID: <87lkwsvusp.wl%cworth@cworth.org> (raw)
In-Reply-To: <Pine.LNX.4.64.0602011656130.21884@g5.osdl.org>

[-- Attachment #1: Type: text/plain, Size: 4048 bytes --]

On Wed, 1 Feb 2006 17:23:38 -0800 (PST), Linus Torvalds wrote:
>
> I tend to have a certain fairly constant set of changes in my working 
> tree, namely every time a release is getting closer, I always tend to have 
> the "Makefile" already updated for the new version (but not checked in: I 
> do that just before I actually tag it, so that the tag will match the 
> commit that actually changes the version).

OK. That use case I understand just fine.

> However, if the question was an even stricter "do you ever commit 
> _changes_ to a particular file where the last HEAD, the index _and_ the 
> working tree are all different", then the answer is actually "Yes" to that 
> too.

Yes, this is the question I was trying to ask. Thanks for pretending
that I had actually asked it, and then answering it as well.

> What has happened is that I have had merges that have content conflicts 
> that I fix up by hand, but exactly _because_ I fix them up by hand, I 
> actually want to re-compile the kernel and test my fixups.

OK. I hadn't anticipated this use case, but I am interested in
exploring it more fully.

> And in that case, I will actually re-apply my manual Makefile change, even 
> if that file was part of the merge changes (in which case I had had to 
> first un-apply the change in order to do the merge).

Are the un-apply and re-apply operations here primarily manual? or
does git help you much with those (beyond alerting you that the merge
cannot take place before you un-apply things)?

> The thing is, once you get used to the git "index" as a staging place, 
> it's really really powerful.

I believe that the staging operations you perform are quite desirable,
but I wonder if existing primitives in git might not provide a more
powerful basis for the kinds of operation you're performing.

For example, in the case of the not-quite-ready-to-be-committed
changes that you want to carry along, couldn't you get additional
benefits if those changes could live on their own branch? I suppose
there may be a missing operator needed to allow you to easily merge
*and* unmerge that branch if needed. Would that seem at all feasible?

If so, could your not-ready changes be implemented as some branch that
is automatically unmerged prior to commit and then re-merged
afterwards? Or something like that?

I guess the feeling I get is that staging into the index feels
conceptually similar to a commit to a branch, but it's a uniquely weak
branch (only one revision per file). And this uniqueness also
introduces complexity (the various diff operations), as well as
possibilities of confusion when committing. Meanwhile the response to
the commit confusion seems to be to add yet more complexity to commit
which doesn't seem like an improvement to me.

[I'm maybe too far out on a limb at this point, since you've
definitely identified a use case for staging in the index, and all
I've offered as an alternative is hand-waving about "branches should
be able to do that". But if nothing else, I'm floating some ideas out
loud, and next I'll try experimenting more with possibilities for
non-index staging.]

I'm already having a lot of fun with git. It's a very impressive tool,
with a surprisingly simple/powerful core.

> Actually, we do exactly that. Right now we expressly limit the "preview" 
> to just the filenames, but we literally do run
> 
> 	git-diff-index -M --cached --name-status --diff-filter=MDTCRA HEAD
>
> as part of "git status", and the eventual end result is what we will 
> populate the commit message file with for your editing pleasure.

Yes, that's a good thing to do. In my personal workflow, a
pre-populated commit message is a bit late, since I want to review and
convince myself I like things before I type the magic word "commit".

And I'm not claiming that a preview patch is impossible to generate,
I'm just saying that it's currently rather hard to figure what the correct
correspondence for arguments to diff and arguments to commit, (see
more on this point in another branch of this thread).

-Carl

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

  parent reply	other threads:[~2006-02-04  0:21 UTC|newest]

Thread overview: 105+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-01-26  2:10 LCA06 Cogito/GIT workshop - (Re: git-whatchanged: exit out early on errors) Martin Langhoff
2006-01-28  4:47 ` Linus Torvalds
2006-01-28  5:33   ` Martin Langhoff
2006-01-28  5:53     ` Linus Torvalds
2006-01-28  6:32       ` Junio C Hamano
2006-01-29 10:12       ` Fredrik Kuivinen
2006-01-29 20:15         ` Junio C Hamano
2006-01-28 11:00     ` Keith Packard
2006-01-28 21:08       ` [Census] So who uses git? Junio C Hamano
2006-01-29  2:14         ` Morten Welinder
2006-01-29  3:53           ` Junio C Hamano
2006-01-29 14:19             ` Morten Welinder
2006-01-29 20:15               ` Junio C Hamano
2006-01-29 10:09         ` Keith Packard
2006-01-29 11:18           ` Radoslaw Szkodzinski
2006-01-29 18:12             ` Greg KH
2006-01-31 18:33               ` Radoslaw Szkodzinski
2006-01-31 19:50                 ` Radoslaw Szkodzinski
2006-01-31 20:43                   ` Junio C Hamano
2006-01-31 21:02                     ` Radoslaw Szkodzinski
2006-01-30 22:51             ` Alex Riesen
2006-01-31 21:25               ` Linus Torvalds
2006-01-31 21:52                 ` J. Bruce Fields
2006-01-31 22:01                 ` Alex Riesen
     [not found]                   ` <20060201013901.GA16832@mail.com>
2006-02-01  2:04                     ` Linus Torvalds
2006-02-01  2:09                       ` Linus Torvalds
2006-02-09  5:15                         ` [PATCH] "Assume unchanged" git Junio C Hamano
2006-02-09  5:49                           ` [PATCH] "Assume unchanged" git: do not set CE_VALID with --refresh Junio C Hamano
2006-02-09  5:50                           ` [PATCH] ls-files: debugging aid for CE_VALID changes Junio C Hamano
2006-02-01  2:31                       ` [Census] So who uses git? Junio C Hamano
2006-02-01  3:43                         ` Linus Torvalds
2006-02-01  7:03                           ` Junio C Hamano
     [not found]                         ` <20060201045337.GC25753@mail.com>
2006-02-01  5:04                           ` Linus Torvalds
2006-02-01  5:42                           ` Junio C Hamano
2006-02-01 16:15                       ` Jason Riedy
2006-02-01 19:20                       ` Julian Phillips
2006-02-01 19:29                         ` Linus Torvalds
2006-02-06 21:15                       ` Chuck Lever
2006-02-01  2:52                     ` Martin Langhoff
2006-02-01  3:48                       ` Linus Torvalds
2006-02-01 19:30                         ` H. Peter Anvin
2006-02-01 14:55                       ` Alex Riesen
2006-02-01 16:25                         ` Linus Torvalds
2006-02-02  9:12                           ` Alex Riesen
2006-01-29 18:37         ` Dave Jones
2006-01-29 20:17           ` Daniel Barkalow
2006-01-29 20:29             ` Martin Langhoff
2006-01-30 15:23             ` Mike McCormack
2006-01-30 18:58         ` Carl Baldwin
2006-01-31 10:27           ` Johannes Schindelin
2006-01-31 15:24             ` Carl Baldwin
2006-01-31 15:31               ` Johannes Schindelin
2006-01-31 17:30             ` Linus Torvalds
2006-01-31 18:12               ` J. Bruce Fields
2006-01-31 19:33                 ` Junio C Hamano
2006-01-31 19:44                   ` Jon Loeliger
2006-01-31 19:52                     ` Junio C Hamano
     [not found]                     ` <7vd5i8w2nc.fsf@assigned-by-dhcp.cox.net>
2006-01-31 20:56                       ` J. Bruce Fields
2006-01-31 20:06                   ` J. Bruce Fields
2006-01-31 19:01               ` Keith Packard
2006-01-31 19:21                 ` Linus Torvalds
2006-01-31 22:55                   ` Joel Becker
2006-02-01 14:43                     ` Johannes Schindelin
2006-01-31 20:56                 ` Sam Ravnborg
2006-01-31 22:21                   ` Junio C Hamano
2006-02-01 19:34               ` H. Peter Anvin
2006-01-31 23:16             ` Daniel Barkalow
2006-01-31 23:36               ` Petr Baudis
2006-01-31 23:47               ` Junio C Hamano
2006-02-01  0:38                 ` Linus Torvalds
2006-02-01  0:52                   ` Junio C Hamano
2006-02-01  2:19                   ` Daniel Barkalow
2006-02-01  6:42                   ` Junio C Hamano
2006-02-01  7:22                     ` Carl Worth
2006-02-01  8:26                       ` Junio C Hamano
2006-02-01  9:59                         ` Randal L. Schwartz
2006-02-01 20:48                           ` Junio C Hamano
2006-02-01 17:11                     ` Linus Torvalds
2006-02-01 17:18                     ` Nicolas Pitre
2006-02-01 20:27                       ` Junio C Hamano
2006-02-01 21:09                         ` Linus Torvalds
2006-02-01 21:34                           ` Nicolas Pitre
2006-02-01 21:59                           ` Junio C Hamano
2006-02-01 22:25                             ` Nicolas Pitre
2006-02-01 22:50                               ` Junio C Hamano
2006-02-02 14:59                                 ` Andreas Ericsson
2006-02-01 22:35                             ` Linus Torvalds
2006-02-01 23:33                               ` Two ideas for improving git's user interface Carl Worth
2006-02-02  0:38                                 ` Junio C Hamano
2006-02-02  1:16                                   ` Carl Worth
2006-02-02  2:25                                     ` Junio C Hamano
2006-02-03 23:57                                       ` Carl Worth
2006-02-02  1:23                                 ` Linus Torvalds
2006-02-02  1:44                                   ` Linus Torvalds
2006-02-04  8:03                                     ` Alan Chandler
2006-02-04  8:25                                       ` Junio C Hamano
2006-02-04  9:30                                         ` Alan Chandler
2006-02-04  0:20                                   ` Carl Worth [this message]
2006-02-04  2:08                                     ` Linus Torvalds
2006-02-06 23:42                                       ` Carl Worth
2006-02-02 12:31                                 ` Florian Weimer
2006-02-02 16:30                                 ` Carl Baldwin
2006-02-01 22:57                             ` [Census] So who uses git? Daniel Barkalow
2006-02-01 22:00                         ` Joel Becker
2006-02-01 19:32           ` H. Peter Anvin

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=87lkwsvusp.wl%cworth@cworth.org \
    --to=cworth@cworth.org \
    --cc=git@vger.kernel.org \
    --cc=junkio@cox.net \
    --cc=nico@cam.org \
    --cc=torvalds@osdl.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).