From: Steven Rostedt <rostedt@goodmis.org>
To: Junio C Hamano <gitster@pobox.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>,
linux-kernel@vger.kernel.org,
Git Mailing List <git@vger.kernel.org>
Subject: Re: [PATCH 0/2] [GIT PULL] ktest: A couple of fixes
Date: Wed, 02 May 2012 09:44:52 -0400 [thread overview]
Message-ID: <1335966292.14207.40.camel@gandalf.stny.rr.com> (raw)
In-Reply-To: <7v62cf6y3d.fsf@alter.siamese.dyndns.org>
[-- Attachment #1: Type: text/plain, Size: 3194 bytes --]
On Tue, 2012-05-01 at 20:49 -0700, Junio C Hamano wrote:
> Linus Torvalds <torvalds@linux-foundation.org> writes:
>
> When a normal developer wants to _reset to_ a particular tagged release,
> in order to _start_ new work, she wouldn't be doing even the above "git
> pull linus v3.4-rc5". That will contaminate the result with whatever
> random stuff she happened to have on the current branch. A more natural
> sequence would be "git fetch --tags linus" followed by either
>
> git checkout v3.4-rc5 ;# to detach
The problem is, I like to know what has been pulled into mainline. I
have patches in quilt (for ktest only, not for my other work) and will
start adding them on a "clean" release. By doing a git pull (or fetch
and merge), I like to see the fast forward to know if everything that's
in my current branch has been pulled. If it hasn't, then something may
have been missed.
>
> or
>
> git checkout -b mywork v3.4-rc5 ;# to start
But then I would end up with several branches that would require
deleting. One way I could see myself in handling this case would be to
delete the current branch and start again (thinking that everything was
already pulled). But by doing that, if something wasn't pulled in, then
I would have lost those changes without ever knowing.
>
> So the case to "reset to" is not very interesting.
>
> But when a normal developer wants to _sync to_ a particular tagged
> release, in order to _continue_ working on her topic, she would need to
> have a merge (unless she does not have _anything_ herself), and at that
> point, merging v3.4-rc5 vs v3.4-rc5^0 would not make that much of a
> difference. If she absolutely detests the "mergetag" header, she could do
> a "git fetch --tags linus" followed by
>
> git merge v3.4-rc5^0
>
> which admittedly is two more letters than she used to type.
This would fit into my workflow. Thus I could use this.
>
> If you mean by "Ideas" for additional features, obviously the last step
> could be enhanced to use a more intuitive command line that requires the
> user to type even more, i.e.
>
> git merge --ff v3.4-rc5
>
> Once that is done, "git pull --ff linus v3.4-rc5" would fall out as a
> logical consequence.
>
> But obviously these two would need new code ;-)
The -ff would make sense as it seems to be the logical thing a user
would want. If they specify the fast-forward flag, then the user would
expect the merge to be a fast forward if possible.
BTW, is there a git compare type option. That is, I like to compare two
separate branches with the result that one currently gets with git when
a branch is following another branch. When you check out that branch, it
gives you an update on how those two branches are related (is one a fast
forward of the other, are they off by different commits?). It would be
nice if git could do this with any two branches. I wrote a script to do
this for me (attached) but it would be nice if git had it natively.
$ git-branch-status v3.0.4 v3.0.5
Branch v3.0.4 can be fast forward to v3.0.5 in 240 commits
$ git-branch-status v3.0.4 v3.1
Branch v3.0.4 and v3.1
differ by 257 and 9380 commit(s) respectively
-- Steve
[-- Attachment #2: git-branch-status --]
[-- Type: application/x-shellscript, Size: 679 bytes --]
next prev parent reply other threads:[~2012-05-02 13:45 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20120502004439.965120020@goodmis.org>
2012-05-02 2:58 ` [PATCH 0/2] [GIT PULL] ktest: A couple of fixes Linus Torvalds
2012-05-02 3:30 ` Stephen Rothwell
2012-05-02 3:49 ` Junio C Hamano
2012-05-02 13:44 ` Steven Rostedt [this message]
2012-05-02 20:14 ` Junio C Hamano
2012-05-03 0:07 ` Steven Rostedt
2012-05-03 0:33 ` Jakub Narebski
2012-05-03 1:52 ` Steven Rostedt
2012-05-03 2:06 ` Nguyen Thai Ngoc Duy
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=1335966292.14207.40.camel@gandalf.stny.rr.com \
--to=rostedt@goodmis.org \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@linux-foundation.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).