From: Junio C Hamano <junkio@cox.net>
To: Carl Worth <cworth@cworth.org>
Cc: Linus Torvalds <torvalds@osdl.org>, git@vger.kernel.org
Subject: Re: [Census] So who uses git?
Date: Wed, 01 Feb 2006 00:26:25 -0800 [thread overview]
Message-ID: <7virrzfpse.fsf@assigned-by-dhcp.cox.net> (raw)
In-Reply-To: <87vevzpmql.wl%cworth@cworth.org> (Carl Worth's message of "Tue, 31 Jan 2006 23:22:10 -0800")
Carl Worth <cworth@cworth.org> writes:
> ... it seems it should be possible to have a class of
> "novice ready" tools that provide for common use cases and that never
> require any mention of the index in their documentation. If so, that
> seems to me a useful goal to work toward and a useful guide in this
> discussion.
I agree it is a worthy goal. Unfortunately I lost my git
virginity long time ago, so a fresh perspective is really
appreciated in this discussion.
> ... Could you explain what the danger is here?
As Linus mentioned in an earlier message in this thread, one of
the important task for him is to take other peoples' trees and
merge it into his mainline. The workflow goes like this:
$ git pull from-somewhere
... oops there are conflicts
$ edit conflicted/file
$ edit more/conflicted/file
... maybe compile test ...
$ git diff -c ;# final sanity check
$ git update-index conflicted/file
$ git update-index more/conflicted/file
$ git commit
He does *not* want to do "git commit -a" here, because he
usually has unrelated changes in his working tree he has not
done update-index on and does _not_ want to commit [*1*]. "git
commit" to imply "git commit -a" increases the risk of
accidentally committing those unrelated changes mixed in the
merge (eh, actually makes the risk 100%).
We _could_ detect that we were in the middle of a merge,
enumerate the paths touched by the merged branches. Then we can
say paths that are different between the index and the working
tree and not in the paths touched by the merge are his unrelated
changes. But it is conceivable he may need to modify a file
neither branch touches in order to _logically_ resolve the
merge, even when the merge phisically does not conflict in
textual diff basis, so while that heuristics may work pretty
well most of the time, doing so might make things even less
easier to explain to other people.
[Footnotes]
*1* The reason he has unrelated changes while doing a merge is
because he works on things himself (I am speculating about
this), and for these modified paths he never runs git-add nor
git-update-index until he is ready to commit his changes (I am
not speculating about this). As long as he knows what he is
pulling in from outside does not overlap with what he has been
working on, he can merge and commit the result without worrying
about his own unrelated changes, and git is careful not to touch
anything in his working tree to cause information loss when the
changes do overlap [*2*].
He is committing something that he never tested himself in his
working tree as a whole. The tree resulting from the merge
never existed outside his index file, so there is no way he
could have even compile tested it properly. But for somebody
who is playing an integrator's role, it is not his primary job
to examine and test every change he merges in as a whole at
nitty-gritty level -- that is what the originator of the change
should have done. So having uncommitted changes in the working
tree for an integrator person is not a sign of bad discipline at
all, and supporting this workflow _is_ important for git.
The primary reason I first got involved in git was because I
wanted to help the workflow of the kernel people, especially
Linus and the subsystem maintainers. To be honest, I personally
still consider the kernel people the first tier customers for
me, and I stop and try to think twice when thinking about a
change or a new feature that may help individual developers and
newcomers, to make sure such a change does not make life less
convenient for the 'integrator' people. Helping integrators to
be more efficient is important because they can become
bottlenecks.
*2* I once got yelled at by Linus when I carelessly broke this
feature and changed 'git-merge' to require a clean working tree
without changes before starting a merge; it was quickly
reverted.
next prev parent reply other threads:[~2006-02-01 8:26 UTC|newest]
Thread overview: 110+ 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 [this message]
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
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
-- strict thread matches above, loose matches on Subject: below --
2006-02-01 7:08 linux
2006-02-01 8:51 ` Junio C Hamano
2006-02-01 16:04 ` Linus Torvalds
2006-02-01 16:10 ` Alex Riesen
2006-02-01 21:27 ` linux
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=7virrzfpse.fsf@assigned-by-dhcp.cox.net \
--to=junkio@cox.net \
--cc=cworth@cworth.org \
--cc=git@vger.kernel.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).