From: Martin Waitz <tali@admingilde.org>
To: Junio C Hamano <junkio@cox.net>
Cc: git@vger.kernel.org
Subject: Re: [RFC] git commit --branch
Date: Tue, 30 May 2006 23:05:52 +0200 [thread overview]
Message-ID: <20060530210551.GI14325@admingilde.org> (raw)
In-Reply-To: <7vr72b27x9.fsf@assigned-by-dhcp.cox.net>
[-- Attachment #1: Type: text/plain, Size: 3667 bytes --]
hoi :)
On Tue, May 30, 2006 at 02:12:02AM -0700, Junio C Hamano wrote:
> I think this was discussed in the past and I appreciate what you
> are trying to do. My understanding of the situation your patch
> is trying to improve is this:
>
> - you have done a few topics and you are ready to test;
>
> - you pulled the topics into your test branch and have found
> problems;
>
> - you made changes while still on the test branch (otherwise
> you wouldn't be able to test the "fix") and it seems to work
> OK;
>
> - what now?
>
> And your approach is to backport the fix to its original topic
> and then re-pull the topic onto the test branch.
yes. I was doing this after working on gitweb a bit.
In order to test gitweb, I need some local adaptations.
I commited these to one branch and put all improvements to
another branch. Then I merged both branches to one production
path which is then used by the webserver.
> While I think that is _one_ valid workflow, I am not convinced
> that is _the_ best workflow.
Me neigther.
That's why I labeled it RFC and published it before doing too much
testing and polishing ;-)
> What Johannes suggested would
> equally work fine, and honestly speaking probably is a better
> discipline.
He suggested to create a new branch (based on current HEAD) for the
new commit. Unfortunately that doesn't solve my problem.
> You carry the fix in your working tree back to its
> original topic and make a commit, without pulling the topic onto
> the test branch immediately. This has two advantages:
>
> - With your workflow, you will have a merge commit onto the
> testing branch immediately when you commit this fix to the
> original topic. But often when I encounter this situation,
> after moving to the topic to backport the fix to it, I find
> myself reviewing what is in the topic and making other
> changes to the topic.
Of course you can do this also while you are still on the test branch.
While looking at code I often see unrelated stuff which can be cleaned
up. With something like commit --branch it would be possible to stuff
these changes to a "trivial" branch without having to change branches
explicitly.
> Johannes's workflow feels more natural
> to me from this aspect -- I take the fix I discovered while
> on the testing branch to the relevant topic to fix it. I may
> or may not make the commit only with that fix (the first
> commit I make after switching the branches from testing to
> the topic may contain more than that fix), and after I make
> one commit, I may keep working on the topic a bit more before
> I decide it is a good time to test the whole thing again (to
> pull the topic into testing). I do not necessarily want that
> extra merge immediately in the test branch.
But if your commit to the topic is really different to previous
commit on the test branch then you may have merge problems later.
If you merge immediately, you even get the merged tree for free ;-).
The testing branch is more like a throwaway-branch for me.
I can recreate it anytime if I want and I don't care about extra
merge commits here.
> - A topic branch should be testable alone;
That would be best, yes.
Unfortunately it didn't work for me.
Well I guess I could have put more effort on changing gitweb to
be more general so that I don't need local adaptations.
But I guess there are situations where this is not possible, too.
Of course, now we have to answer the question whether GIT should
support these situations. I don't know.
--
Martin Waitz
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
next prev parent reply other threads:[~2006-05-30 21:06 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-05-29 20:28 [RFC] git commit --branch Martin Waitz
2006-05-29 20:41 ` Shawn Pearce
2006-05-29 21:22 ` Martin Waitz
2006-05-29 21:35 ` Shawn Pearce
2006-05-29 21:55 ` Martin Waitz
2006-05-29 22:16 ` Shawn Pearce
2006-05-29 21:14 ` Johannes Schindelin
2006-05-29 21:27 ` Jakub Narebski
2006-05-29 21:37 ` Martin Waitz
2006-05-29 21:58 ` Johannes Schindelin
2006-05-30 9:12 ` Junio C Hamano
2006-05-30 21:05 ` Martin Waitz [this message]
2006-05-30 22:52 ` Junio C Hamano
2006-05-31 15:21 ` Martin Waitz
2006-06-05 18:22 ` Jon Loeliger
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=20060530210551.GI14325@admingilde.org \
--to=tali@admingilde.org \
--cc=git@vger.kernel.org \
--cc=junkio@cox.net \
/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).