git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Bootstrapping into git, commit gripes at me
@ 2005-07-08 23:07 Marc Singer
       [not found] ` <7v4qb46dff.fsf@assigned-by-dhcp.cox.net>
  2005-07-09  1:43 ` Linus Torvalds
  0 siblings, 2 replies; 34+ messages in thread
From: Marc Singer @ 2005-07-08 23:07 UTC (permalink / raw)
  To: git

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.

^ permalink raw reply	[flat|nested] 34+ messages in thread
* Re: Bootstrapping into git, commit gripes at me
@ 2005-07-09  0:40 Marc Singer
  0 siblings, 0 replies; 34+ messages in thread
From: Marc Singer @ 2005-07-09  0:40 UTC (permalink / raw)
  To: git

On Fri, Jul 08, 2005 at 05:17:08PM -0700, Junio C Hamano wrote:
> >>>>> "MS" == Marc Singer <elf@buici.com> writes:
> 
> MS> In working through a usage example on my way to producing bonafide
> MS> patches, I've found that commit is complaining.  Here's what I've done.
> 
> MS>   o Fetched and built cogito-0.12
> MS>   o Fetched (rsync) Linus' tree
> MS>   o Created a working directory, linux-2.6
> MS>   o linked .git in the working directory to the .git directory fetched
> MS>     from the net.
> 
> This is slightly different from the BCP.  A recommended way is:
> 
>  $ mkdir linux-2.6
>  $ cd linux-2.6
>  $ git-init-db
>  $ rsync linux-2.6.git/ from kernel.org into .git/

Does this preclude symlinking .git?  I'd like to keep one .git which
is mirrored from the net and allow for more than one working
directory.

> Although your commit problem does not have to do with this.
> 
> MS>   o # git checkout -f v2.6.11
> MS>   o # cat ../old-patch-file | patch -p1
> 
> GITified Linux kernel repository starts at v2.6.12-rc2, so
> from anything older you cannot create a commit off of it
> (easily).

Trouble is that 2.6.12 breaks some things and I need to continue to
build patches from 2.6.11 for the time being.  Once I get familiar,
I'll patch the tree to build properly for my targets with later
revisions.

> MS> Then, according to Jeff's instructions, I have to perform
> MS> get-update-cache with the name of each file I changed.  Is that really
> MS> the way?
> 
> MS>   o # git-update-cache LIST_OF_CHANGED_FILES
> 
> That is correct.  Also remember to say:
> 
>     git-update-cache --add LIST_OF_ADDED_FILES
>     git-update-cache --remove LIST_OF_REMOVED_FILES

His text is a little overly-brief on this, but I got the gist.

> Notice the use of git-apply --index instead of patch -p1 in the
> above example?  If you use git-apply --index, you do not have to
> do the above steps yourself.

Notice it...where?  I gather that git-apply is a better way to apply
patches?

> MS>    fatal: 5dc01c595e6c6ec9ccda4f6f69c131c0dd945f8c is not a valid 'commit' object
> 
> That is a tag to the v2.6.11 tree, which is not a valid commit,
> so you cannot make a commit off of it.

So what does this mean?  Can I only produce commits from the master?
Is this a peculiarity of the v2.6.11 tag?

> Linus, I think git-checkout-script should not store a tag to non
> commit in HEAD.  If that did not happen, and if the repo was
> created without ref/heads/master (the usual case), then he
> _could_ have done something like this:
> 
>  $ git checkout -f v2.6.11 ;# fixed one
>  warning: v2.6.11 is not a commit -- not updating your HEAD
>  $ git commit ;# to have his own baseline at v2.6.11
>  $ git-apply --index --stat --summary --apply <../old-patch-file
>  $ : do the usual tests
>  $ git commit ;# create a commit based on the baseline v2.6.11

That sounds like what I'm looking for.  Can I do this by hand somehow?

As an ARM developer, I need to be able to cleanly track kernel
development revisions and produce patches that are easy to merge.  The
cycle is something like this:

  o Update kernel tree.
  o Fix the build.
  o Produce a patch to send upstream.
  o Apply work-in-progress patches
  o Fix the build.
  o Publish new patches against updated kernel tree

The trickiest part has been bringing the works-in-progress forward
without spending lots of time babysitting the SCM tools.

^ permalink raw reply	[flat|nested] 34+ messages in thread

end of thread, other threads:[~2005-08-12  1:26 UTC | newest]

Thread overview: 34+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-07-08 23:07 Bootstrapping into git, commit gripes at me Marc Singer
     [not found] ` <7v4qb46dff.fsf@assigned-by-dhcp.cox.net>
2005-07-09  1:11   ` Marc Singer
2005-07-09 21:04     ` Matthias Urlichs
2005-07-10 15:06       ` Petr Baudis
     [not found]   ` <20050709003636.GA26526@buici.com>
     [not found]     ` <7v1x684wgr.fsf@assigned-by-dhcp.cox.net>
2005-07-09  1:16       ` Marc Singer
2005-07-09  1:31         ` Junio C Hamano
2005-07-09  1:43 ` Linus Torvalds
2005-07-11 22:20   ` Marc Singer
2005-07-11 23:03     ` Junio C Hamano
2005-07-11 23:15       ` Junio C Hamano
2005-07-12  0:57       ` Linus Torvalds
2005-07-12  1:43         ` Linus Torvalds
2005-07-12  2:10           ` Marc Singer
2005-07-12  3:09             ` Linus Torvalds
2005-07-12  3:49               ` Linus Torvalds
2005-07-12  4:34                 ` Linus Torvalds
2005-07-12  4:43                   ` Marc Singer
2005-07-12  4:59                     ` Linus Torvalds
2005-07-12  5:12                       ` Marc Singer
2005-07-12  7:48                   ` Petr Baudis
2005-07-12  9:07                     ` Junio C Hamano
2005-07-12 16:29                       ` Matthias Urlichs
2005-07-24  8:57                       ` Petr Baudis
2005-07-24 16:24                         ` Junio C Hamano
2005-07-12 16:48                     ` Linus Torvalds
2005-08-12  1:26                       ` Petr Baudis
2005-07-12  2:21           ` Junio C Hamano
2005-07-12  3:18             ` Linus Torvalds
2005-07-12  3:41               ` Junio C Hamano
2005-07-12  3:52                 ` Linus Torvalds
2005-07-12  3:53                 ` Marc Singer
2005-07-12 17:04             ` Daniel Barkalow
2005-07-11 23:45     ` Linus Torvalds
  -- strict thread matches above, loose matches on Subject: below --
2005-07-09  0:40 Marc Singer

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).