git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Joel Becker <Joel.Becker@oracle.com>
To: Junio C Hamano <junkio@cox.net>
Cc: git@vger.kernel.org, Petr Baudis <pasky@suse.cz>
Subject: Re: git versus CVS (versus bk)
Date: Mon, 31 Oct 2005 16:42:55 -0800	[thread overview]
Message-ID: <20051101004255.GQ11488@ca-server1.us.oracle.com> (raw)
In-Reply-To: <7vbr15b4m4.fsf@assigned-by-dhcp.cox.net>

On Mon, Oct 31, 2005 at 04:20:51PM -0800, Junio C Hamano wrote:
> After extracting a sequence of the dirty commits using
> git-format-patch, I would say:
> 	for i in 0*.txt; do git-apply --index $i; done
> to bring my tree up to date, and then just say "git commit".

	Yeah, but this is a lot of by-hand (as you note below).

> Typically when I do this, I have one "significant" commit among
> them, usually early in the series, which is followed by smaller
> "fix this, fix that, oops fix that too" commits.  So I edit the
> log message using the log of the significant commit, and add
> some missing bits.

	When I work, regardless of SCM, I generally have many
checkpoints along the way.  It might be a particular subfeature is
complete (and probably deserves a split-out patch of its own when I do
the "clean" merge), but it could also just be "I changed a lot today,
and I'd really like to save that off."  So, while somtimes it looks just
like your "significant commit + fixes" model, it might also be "1/4 the
work", "compile fix on other platform, "1/2 the work", "fix", "the rest
of the work", all over the course of two days.

>         $ git-read-tree -m -u master mytopic
>         $ git-commit -c <that-significant-commit-in-mytopic-branch>

	Replace <that-...> with <overall-concept-of-the-change> and you
have the workflow I'm talking about.
	You know, this is a simpler command set than I am using.  I've
been using Cogito, because it makes many of the 5-step git operations a
single step, more like some other tools.  But I know no way to tell
Cogito to merge all the changes of the branch into the master without
also pulling in the commit history.  That's the thing here.  Petr, do
you have a way of doing this that I don't know about?
	What I mean is, for the "naive" Cogito workflow:

	cg-clone repo working
	cd working
	hack hack hack, commit commit commit
	cd mainline
	cg-pull working

the cg-pull command merges the changes back, but it also includes the
full commit history.  Not what we want.  Compare the "identical"
workflow:

	cg-clone repo working
	cd working
	hack hack hack, commit commit commit
	cg-diff mainline working > patch
	cd mainline
	cg-apply < patch
	cg-commit

My basic premise is that I shouldn't have to deal with diff/patch as an
external step, especially since git knows more about the tree than
diff/patch do.  It's a useless hoop to jump through.
	Maybe Cogito contains something like what you describe above, a
way to get all the file changes without actually pulling in the commit
history.  I don't care that the read-tree and the commit are separate
stages.  I just have to type them.


> is possible) offhand.  Sometimes, when you want truly logical
> steps, you would end up needing intermediate steps that never
> existed in your true history (i.e. "in the hindsight, my
> development should have progressed in these steps.")

	Yes, I always do.  But I'm not talking about that sort of large
feature add or whatever.  I'm talking about merely doing something on a
small scale, but in a temporary repository.

Joel

-- 

Life's Little Instruction Book #510

	"Count your blessings."

Joel Becker
Principal Software Developer
Oracle
E-mail: joel.becker@oracle.com
Phone: (650) 506-8127

  reply	other threads:[~2005-11-01  0:43 UTC|newest]

Thread overview: 64+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-10-31  1:50 git versus CVS (versus bk) walt
2005-10-31  1:59 ` Martin Langhoff
2005-10-31  2:03 ` H. Peter Anvin
2005-10-31  2:35 ` Linus Torvalds
2005-10-31 10:24   ` Johannes Schindelin
2005-10-31 16:18     ` Linus Torvalds
2005-10-31 18:18       ` wa1ter
2005-10-31 19:44         ` Randal L. Schwartz
2005-10-31 23:41           ` walt
2005-11-01  0:15           ` Daniel Barkalow
2005-11-01  0:21             ` Linus Torvalds
2005-10-31 19:50       ` Joel Becker
2005-10-31 20:28         ` Martin Langhoff
2005-10-31 21:30           ` Joel Becker
2005-11-01  9:15             ` Petr Baudis
2005-11-01 16:17               ` Joel Becker
2005-11-01 17:35                 ` Petr Baudis
2005-11-07 22:56               ` Petr Baudis
2005-11-08 10:50                 ` Josef Weidendorfer
2005-11-08 12:04                   ` Petr Baudis
2005-11-01  2:17           ` Randal L. Schwartz
2005-11-01  2:23             ` Linus Torvalds
2005-11-01  2:34               ` Randal L. Schwartz
2005-11-01  2:47                 ` Linus Torvalds
2005-11-01  2:35               ` Junio C Hamano
2005-11-01 23:56           ` Horst von Brand
2005-11-02  8:54             ` Andreas Ericsson
2005-11-02  9:26               ` Junio C Hamano
2005-10-31 21:00         ` Junio C Hamano
2005-10-31 21:36           ` Joel Becker
2005-10-31 21:53             ` Linus Torvalds
2005-10-31 22:14             ` Junio C Hamano
2005-10-31 22:42               ` Joel Becker
2005-11-01  0:20                 ` Junio C Hamano
2005-11-01  0:42                   ` Joel Becker [this message]
2005-11-01  1:02                     ` Martin Langhoff
2005-11-01  1:29                       ` Joel Becker
2005-11-01  1:48                         ` Linus Torvalds
2005-11-01  9:17                         ` Petr Baudis
2005-11-01 13:25                       ` Catalin Marinas
2005-11-01  0:25                 ` Theodore Ts'o
2005-11-01  9:08                   ` hgmq vs. StGIT Petr Baudis
2005-11-01  9:23                     ` Catalin Marinas
2005-11-01 10:10                       ` Petr Baudis
2005-11-01 17:34                         ` Catalin Marinas
2005-11-01 15:20                       ` Chuck Lever
2005-11-01 15:36                         ` Chris Mason
2005-11-01 17:18                           ` Catalin Marinas
2005-11-01 18:13                             ` Chris Mason
2005-11-01 21:30                               ` Catalin Marinas
2005-11-02 15:41                                 ` Chris Mason
2005-11-05 20:23                                   ` Catalin Marinas
2005-11-09 23:32                                     ` Petr Baudis
2005-11-10  0:08                                       ` Pavel Machek
2005-11-10 16:20                                       ` Catalin Marinas
2005-11-01 14:11                     ` Chris Mason
2005-11-01 16:00                       ` Linus Torvalds
2005-11-01 17:13                         ` Catalin Marinas
2005-11-01 17:29                       ` Catalin Marinas
2005-11-01 17:59                         ` Chris Mason
2005-11-01 21:22                           ` Catalin Marinas
2005-11-01  0:31                 ` git versus CVS (versus bk) Daniel Barkalow
2005-10-31 21:35         ` Linus Torvalds
2005-10-31 13:00   ` wa1ter

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=20051101004255.GQ11488@ca-server1.us.oracle.com \
    --to=joel.becker@oracle.com \
    --cc=git@vger.kernel.org \
    --cc=junkio@cox.net \
    --cc=pasky@suse.cz \
    /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).