From: Marc Singer <hidden> Date: 2016-06-15 22:42:01
In working through a usage example on my way to producing bonafide
patches, I've found that commit is complaining. Here's what I've done.
o Fetched and built cogito-0.12
o Fetched (rsync) Linus' tree
o Created a working directory, linux-2.6
o linked .git in the working directory to the .git directory fetched
from the net.
o # git checkout -f v2.6.11
o # cat ../old-patch-file | patch -p1
Then, according to Jeff's instructions, I have to perform
get-update-cache with the name of each file I changed. Is that really
the way?
o # git-update-cache LIST_OF_CHANGED_FILES
Now I commit.
o # git commit
I am presented with an editor session with the list of changed files
already present. IfI add a comment and leave the editor, I'm told
fatal: 5dc01c595e6c6ec9ccda4f6f69c131c0dd945f8c is not a valid 'commit' object
If I don't edit the comment, it doesn't give an error but I don't
think the changes are committed because I can invoke git commit again.
Am I off track?
Cheers.
P.S. vger isn't letting me subscribe ATM. Please copy me with
replies.
In working through a usage example on my way to producing bonafide
patches, I've found that commit is complaining. Here's what I've done.
o Fetched and built cogito-0.12
o Fetched (rsync) Linus' tree
o Created a working directory, linux-2.6
o linked .git in the working directory to the .git directory fetched
from the net.
o # git checkout -f v2.6.11
This won't work.
v2.6.11 isn't a commit, it's a tree, and things will go downhill from
there.
Can you base it on 2.6.12-rc2 or later? That's the earliest with some real
git history.
Linus
From: Marc Singer <hidden> Date: 2016-06-15 22:42:01
On Fri, Jul 08, 2005 at 06:43:54PM -0700, Linus Torvalds wrote:
On Fri, 8 Jul 2005, Marc Singer wrote:
quoted
In working through a usage example on my way to producing bonafide
patches, I've found that commit is complaining. Here's what I've done.
o Fetched and built cogito-0.12
o Fetched (rsync) Linus' tree
o Created a working directory, linux-2.6
o linked .git in the working directory to the .git directory fetched
from the net.
o # git checkout -f v2.6.11
This won't work.
v2.6.11 isn't a commit, it's a tree, and things will go downhill from
there.
Can you base it on 2.6.12-rc2 or later? That's the earliest with some real
git history.
I picked 2.6.12
# git checkout -f v2.6.12
applied the patch and was greeted with an error about being unable to
commit telling me that I LONG_HEX_NUMBER is not a valid commit object.
Isn't 2.6.12 later than 2.6.12-rcX?
I picked 2.6.12
# git checkout -f v2.6.12
applied the patch and was greeted with an error about being unable to
commit telling me that I LONG_HEX_NUMBER is not a valid commit object.
Isn't 2.6.12 later than 2.6.12-rcX?
Yes.
However, that's not how "git checkout" ends up working, which is probably
(almost certainly) a misfeature of git checkout. In particular, when you
use a tag to checkout something, it will checkout the _state_ at that
point (ie v2.6.12), but it won't have reset your HEAD to point to it.
And your earlier adventures made your HEAD be something that isn't a
commit (although I quite frankly don't know quite how you succeeded at
that: "git checkout" should refuse to write a HEAD unless you check out a
specific branch, and all branch pointers are proper commit points).
Anyway, here's how you fix it right now, and I'll have to figure out how
to make a nice interface:
#
# Reset the "master" branch to v2.6.12
#
git-rev-list --max-count=1 v2.6.12 > .git/refs/heads/master
#
# Switch to the master branch
#
git checkout -f master
which should get you to be at a known point (which is v2.6.12).
Linus