gnu-linux-libre
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [GNU-linux-libre] The "Free" Kernel In Debian Squeeze


From: Alexandre Oliva
Subject: Re: [GNU-linux-libre] The "Free" Kernel In Debian Squeeze
Date: Wed, 05 Jan 2011 08:52:37 -0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux)

On Jan  4, 2011, Richard Stallman <address@hidden> wrote:

>> Where does it store the correspondence table?
>     In git refs/original, unless overridden.

> I don't understand the answer.  It means literally nothing to me.

You can think of it as a tag, named after the original commit, pointing
at the rewritten commit.


>     branch1: c1 <- c2 <- c3 <- c4
>     branch2: c1 <- c2 <- da

>     rebasing branch1 onto branch2 would yield:

>     branch2: c1 <- c2 <- c3 <- c4 <- da'

> Proper English usage would be to call it "rebasing branch2 onto branch1".

> If you confirm for me that git users customarily use the incorrect
> usage, I will accept the fact that they do.  But I want to get
> confirmation of this.

No, sorry, my mistake.  Here's a formal description of how git rebase
behaves:

# git rebase [--onto newbase] upstream [branch]

* check out branch (if omitted, use the currently checked-out branch)
* collect all commits that are in branch but not upstream
* reset branch to point to the head of newbase ?: upstream
* re-apply the commits, skipping already-applied patches

> In order for me to understand the semantics, could you tell me
> how the text of da' relates to the text of c4?  Is it the same diff
> as the diff between da and c2?  In other words, is it true that
> da' = c4 + (da - c2)?

Yup.

> Anyway, the operation I proposed is different.

Yep.

> Assume we have this:

>     branch1: c1 <- c2 <- c3 <- c4
>     branch2: c1 <- c2
>     branch3: whatever <- x

> transform branch1, with c2 -> x in the correspondence table,
> would not alter branch1, but make a new branch (call it branch1'):

>     branch1': whatever <- x <- c3' <- c4'

What you propose is implemented by the following commands:

  git branch -f branch1\' branch2
  # branch1' is now same as branch2
  git rebase --onto branch3 branch1 branch1\'
  # now branch1' is branch3 plus changes in branch2..branch1 

> Is this what filter-branch does?

git filter-branch is, in a way, a smarter git rebase, that can be told
to modify or discard certain commits instead of just reapplying them,
and to take note of the mapping from old to new commits.

It doesn't actually change any branches.  It takes a list of commits and
creates remapped commits.  Branches or tags can be reset to point to
them afterwards.

-- 
Alexandre Oliva, freedom fighter    http://FSFLA.org/~lxoliva/
You must be the change you wish to see in the world. -- Gandhi
Be Free! -- http://FSFLA.org/   FSF Latin America board member
Free Software Evangelist      Red Hat Brazil Compiler Engineer



reply via email to

[Prev in Thread] Current Thread [Next in Thread]