{"thread":{"id":"1181","subject":"Re: Bootstrapping into git, commit gripes at me","startedAt":"2005-07-09T00:40:47Z","lastAt":"2005-07-09T00:40:47Z","messageCount":1,"participants":["Marc Singer"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"5844","messageId":"20050709004047.GA27080@buici.com","threadId":"1181","inReplyTo":null,"subject":"Re: Bootstrapping into git, commit gripes at me","fromName":"Marc Singer","fromEmail":"elf@buici.com","sentAt":"2005-07-09T00:40:47Z","receivedAt":"2005-07-09T00:40:47Z","isPatch":false,"sender":{"key":"elf@buici.com","avatar":null},"body":"On Fri, Jul 08, 2005 at 05:17:08PM -0700, Junio C Hamano wrote:\n> >>>>> \"MS\" == Marc Singer <elf@buici.com> writes:\n> \n> MS> In working through a usage example on my way to producing bonafide\n> MS> patches, I've found that commit is complaining.  Here's what I've done.\n> \n> MS>   o Fetched and built cogito-0.12\n> MS>   o Fetched (rsync) Linus' tree\n> MS>   o Created a working directory, linux-2.6\n> MS>   o linked .git in the working directory to the .git directory fetched\n> MS>     from the net.\n> \n> This is slightly different from the BCP.  A recommended way is:\n> \n>  $ mkdir linux-2.6\n>  $ cd linux-2.6\n>  $ git-init-db\n>  $ rsync linux-2.6.git/ from kernel.org into .git/\n\nDoes this preclude symlinking .git?  I'd like to keep one .git which\nis mirrored from the net and allow for more than one working\ndirectory.\n\n> Although your commit problem does not have to do with this.\n> \n> MS>   o # git checkout -f v2.6.11\n> MS>   o # cat ../old-patch-file | patch -p1\n> \n> GITified Linux kernel repository starts at v2.6.12-rc2, so\n> from anything older you cannot create a commit off of it\n> (easily).\n\nTrouble is that 2.6.12 breaks some things and I need to continue to\nbuild patches from 2.6.11 for the time being.  Once I get familiar,\nI'll patch the tree to build properly for my targets with later\nrevisions.\n\n> MS> Then, according to Jeff's instructions, I have to perform\n> MS> get-update-cache with the name of each file I changed.  Is that really\n> MS> the way?\n> \n> MS>   o # git-update-cache LIST_OF_CHANGED_FILES\n> \n> That is correct.  Also remember to say:\n> \n>     git-update-cache --add LIST_OF_ADDED_FILES\n>     git-update-cache --remove LIST_OF_REMOVED_FILES\n\nHis text is a little overly-brief on this, but I got the gist.\n\n> Notice the use of git-apply --index instead of patch -p1 in the\n> above example?  If you use git-apply --index, you do not have to\n> do the above steps yourself.\n\nNotice it...where?  I gather that git-apply is a better way to apply\npatches?\n\n> MS>    fatal: 5dc01c595e6c6ec9ccda4f6f69c131c0dd945f8c is not a valid 'commit' object\n> \n> That is a tag to the v2.6.11 tree, which is not a valid commit,\n> so you cannot make a commit off of it.\n\nSo what does this mean?  Can I only produce commits from the master?\nIs this a peculiarity of the v2.6.11 tag?\n\n> Linus, I think git-checkout-script should not store a tag to non\n> commit in HEAD.  If that did not happen, and if the repo was\n> created without ref/heads/master (the usual case), then he\n> _could_ have done something like this:\n> \n>  $ git checkout -f v2.6.11 ;# fixed one\n>  warning: v2.6.11 is not a commit -- not updating your HEAD\n>  $ git commit ;# to have his own baseline at v2.6.11\n>  $ git-apply --index --stat --summary --apply <../old-patch-file\n>  $ : do the usual tests\n>  $ git commit ;# create a commit based on the baseline v2.6.11\n\nThat sounds like what I'm looking for.  Can I do this by hand somehow?\n\nAs an ARM developer, I need to be able to cleanly track kernel\ndevelopment revisions and produce patches that are easy to merge.  The\ncycle is something like this:\n\n  o Update kernel tree.\n  o Fix the build.\n  o Produce a patch to send upstream.\n  o Apply work-in-progress patches\n  o Fix the build.\n  o Publish new patches against updated kernel tree\n\nThe trickiest part has been bringing the works-in-progress forward\nwithout spending lots of time babysitting the SCM tools.\n"}]}