Thread (1 message) 1 message, 1 author, 2016-06-15

Re: how to import stuff?

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:42:17

Ian Molton [off-list ref] writes:
git checkout -b v2.6.16-rc1 v2.6.16-rc1
You are creating a branch called v2.6.16-rc1 while you have a
tag with the same name.  From this point on, when you say
v2.6.16-rc1 when git expects an arbitrary revision name, the
commit Linus tagged with that name is used.  When git expects
you to use it a branch name, it uses the branch head commit of
the branch you created here.  Once you create a new commit in
that branch, these two will refer to different commits depending
on the context.  Unless you really understand what you are
doing, this would confuse you, so do not do this.  Use some
other branch name.  Better yet...
git checkout -b v2.6.16-rc1-mm3
Starting from a vanilla clone from Linus, up to this point you
could probably have done:

	$ git checkout -b v2.6.16-rc1-mm3 v2.6.16-rc1

You do not need v2.6.16-rc1 branch if you immediately create
another branch, which is the branch you would want to work on.
patch -Np1 < 2.6.16-rc1-mm3
So far so good - I have a tree with the patches applied
        $ git apply --index 2.6.16-rc1-mm3

If the patch you are using cleanly applies without fuzz, this
would apply them to the working tree, and all the new and/or
removed files are registered to the index, without you having to
say "git update-index".
git update-index --add --remove --refresh --ignore-missing

seems to generate a list of said files, but I cant seem to figure out
how to get it to actually do anything useful with them.
I have no idea what this update-index line with only the
flags means, so let's forget about that.

After applying the patch with "patch -p1 -E" on top of the
vanilla version:

	$ git add .

would add all the new files.  Then

	$ git commit -a -m '2.6.16-rc1-mm3'

would notice removed and modified files as well when making a
commit.

HOWEVER.

I honestly do not understand what value you are expecting to get
out of git, if you are rolling the whole thing from -mm series
into a singe commit.  Commit is designed to be easily handled as
an atomic change, and being able to pick and choose only parts
of it was never part of its design goal, so I do not understand
what useful things you are expecting to do, after you create
that commit.

IOW, there is a reason -mm series is available as individual
broken-out/ files.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help