From: "Robert Anderson" <rwa000@gmail.com>
To: "Junio C Hamano" <gitster@pobox.com>
Cc: "David Jeske" <jeske@willowmail.com>,
"Jakub Narebski" <jnareb@gmail.com>,
git@vger.kernel.org
Subject: Re: An alternate model for preparing partial commits
Date: Fri, 27 Jun 2008 17:08:57 -0700 [thread overview]
Message-ID: <9af502e50806271708p7979ae65k61b71be90efff2c4@mail.gmail.com> (raw)
In-Reply-To: <7viqvuo4hq.fsf@gitster.siamese.dyndns.org>
On Fri, Jun 27, 2008 at 4:14 PM, Junio C Hamano <gitster@pobox.com> wrote:
> "Robert Anderson" <rwa000@gmail.com> writes:
>
>> There are good reasons for desiring a workflow that does not routinely
>> change history as part of the usual workflow. Maybe there are clones
>> of your repo. Maybe as part of your workflow discipline you do not
>> want HEAD states that cannot be pushed to public, because you don't
>> want to manually keep track of when it is ok and when it is not ok to
>> push HEAD to public, since git cannot tell you this.
>
> Surely you can arrange that. You keep track of what you pushed out, and
> you refrain from rebasing beyond that point.
First, the constraint of achieving this workflow when there are clones
of the repo in question removes any need for additional rationales.
That being said...
In the existing model which is being suggested as a way to get the
desired workflow, there are two distinct classes of commits: commits
that are "for real", and commits that are "temporary", that are being
used as some kind of workspace for orthogonalizing a set of changes,
which will eventually be replaced by "for real" commits. Yet git has
no metadata to distinguish these two types of commits. When only "for
real" commits exist, I can push HEAD. When "temporary" commits exist,
I cannot, or insidious problems will ensue. This metadata concerning
"for real" or "temporary" commits is only maintained manually in the
developer's head. But, this is the sort of thing that computers are
for, and should not be the burden of the developer to maintain this
information in his mental cache, especially when the price of making
an error can be quite high. It would be very easy to forget that you
intended to do more work on your last N commits, and push HEAD because
somebody asks you to make sure you've pushed your latest work. Your
tools should prevent this kind of scenario. Git cannot, because it
doesn't know what you intend when you "commit" because two different
ideas are being conflated with "commit" in this model.
In my proposed model, there is a clear distinction, kept track of by
git, not the developer, between changes which are in the "temporary
workspace" which is still being worked on, and changes which are "for
real", that can be shared, either through a push to a public repo or
if there are clones of my repo. They become "for real" when they are
committed. That's the purpose of a "commit" in this workflow. To
bless a change as ready for viewing by others, even if you do not want
to make it available yet (by a push to a public repo). I can walk
away from a working tree for six months, come back, and there can be
no confusion about which changes were "temporary" and possibly in need
of revision, and which changes are blessed as ready for public
consumption. If I come back to a branch on which there are several
commits which have not been pushed yet, how do I know which are
"temporary" and which are "for real" commits? I cannot. It is
impossible. The information is not there.
But, all of this is moot when you consider the simple case of a repo
which has been cloned, on which you'd like to make partial commits,
and test the committed state before doing so.
Thanks,
Bob
next prev parent reply other threads:[~2008-06-28 0:10 UTC|newest]
Thread overview: 61+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-06-27 6:50 An alternate model for preparing partial commits Robert Anderson
2008-06-27 7:10 ` Björn Steinbrink
2008-06-27 14:37 ` [PATCH/RFC] stash: introduce 'stash save --keep-index' option SZEDER Gábor
2008-06-27 18:26 ` Junio C Hamano
2008-06-27 16:54 ` An alternate model for preparing partial commits Robert Anderson
2008-06-27 17:27 ` Björn Steinbrink
2008-06-27 17:34 ` Robert Anderson
2008-06-27 8:35 ` Johannes Sixt
2008-06-27 17:01 ` Robert Anderson
2008-06-27 8:50 ` Petr Baudis
2008-06-27 17:02 ` Robert Anderson
2008-06-27 13:33 ` Johannes Schindelin
2008-06-27 13:49 ` Miklos Vajna
2008-06-27 17:14 ` Robert Anderson
2008-06-27 17:45 ` Johannes Schindelin
2008-06-27 17:49 ` Robert Anderson
[not found] ` <alpine.DEB.1.00.0806271854120.9925@racer>
2008-06-27 18:07 ` Robert Anderson
2008-06-27 18:20 ` Dana How
2008-06-27 20:31 ` Stephen Sinclair
[not found] ` <willow-jeske-01l7H4tHFEDjCgPV-01l7ZhB8FEDjCdJs>
2008-06-27 20:45 ` David Jeske
2008-06-27 20:45 ` David Jeske
2008-06-28 17:23 ` Wincent Colaiuta
2008-06-28 2:14 ` Dmitry Potapov
2008-06-28 2:57 ` Robert Anderson
2008-06-28 4:03 ` Dmitry Potapov
[not found] ` <9af502e50806272320p23f01e8eo4a67c5f6f4476098@mail.gmail.com>
2008-06-28 6:31 ` Fwd: " Robert Anderson
2008-06-28 12:38 ` Dmitry Potapov
[not found] ` <20080628123522.GL5737@dpotapov.dyndns.org>
2008-06-28 15:53 ` Robert Anderson
2008-06-28 16:52 ` Dmitry Potapov
2008-06-27 18:15 ` Junio C Hamano
2008-06-27 18:43 ` Robert Anderson
2008-06-28 5:03 ` Jeff King
2008-06-28 7:03 ` Robert Anderson
2008-06-28 8:53 ` Jeff King
2008-06-28 21:53 ` Junio C Hamano
2008-06-28 14:51 ` Johannes Schindelin
2008-07-08 4:58 ` Jeff King
[not found] ` <willow-jeske-01l7H4tHFEDjCgPV-01l7H4sOFEDjCbyi>
2008-06-27 20:29 ` David Jeske
2008-06-27 20:47 ` Jakub Narebski
[not found] ` <willow-jeske-01l7H4tHFEDjCgPV-01l7[1OFFEDjCYJV>
2008-06-27 20:51 ` David Jeske
2008-06-27 20:51 ` David Jeske
[not found] ` <-8386235276716376372@unknownmsgid>
2008-06-27 22:55 ` Robert Anderson
2008-06-27 23:14 ` Junio C Hamano
2008-06-28 0:08 ` Robert Anderson [this message]
2008-06-28 2:57 ` Dmitry Potapov
2008-06-28 3:31 ` Robert Anderson
2008-06-28 14:34 ` Stephen Sinclair
2008-06-28 16:00 ` Robert Anderson
2008-06-28 16:30 ` Robert Anderson
2008-06-28 17:12 ` Jakub Narebski
2008-06-28 18:25 ` Robert Anderson
[not found] ` <willow-jeske-01l7H4tHFEDjCgPV-01l82hwbFEDjCX70>
2008-06-28 19:12 ` David Jeske
2008-06-28 19:12 ` David Jeske
2008-06-28 19:13 ` Stephen Sinclair
[not found] ` <willow-jeske-01l7H4tHFEDjCgPV-01l7buicFEDjCagd>
2008-06-28 0:22 ` David Jeske
2008-06-28 0:22 ` David Jeske
2008-06-27 20:29 ` David Jeske
-- strict thread matches above, loose matches on Subject: below --
2008-06-28 1:17 Theodore Tso
2008-06-28 1:56 ` Miklos Vajna
2008-06-28 1:23 Theodore Tso
2008-06-28 9:30 Stephen R. van den Berg
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=9af502e50806271708p7979ae65k61b71be90efff2c4@mail.gmail.com \
--to=rwa000@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=jeske@willowmail.com \
--cc=jnareb@gmail.com \
/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).