• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
Leveraging the Git object store
 

Leveraging the Git object store

on

  • 1,329 views

 

Statistics

Views

Total Views
1,329
Views on SlideShare
1,182
Embed Views
147

Actions

Likes
1
Downloads
7
Comments
2

1 Embed 147

http://funnel.fossmeet.in 147

Accessibility

Categories

Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel

12 of 2 previous next

  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

    Leveraging the Git object store Leveraging the Git object store Presentation Transcript

    • Leveraging the Git object store Ramkumar Ramachandra FOSS.IN/2010 16th December 2010Ramkumar Ramachandra (FOSS.IN/2010) Leveraging the Git object store 16th December 2010 1 / 11
    • Outline 1 Part I: The background noise 2 Part II: A fast-import crash course 3 Part III: ConclusionRamkumar Ramachandra (FOSS.IN/2010) Leveraging the Git object store 16th December 2010 2 / 11
    • Part I: The background noise Why is everyone obsessed with Git? bup gitFS TicGit gimd gollumRamkumar Ramachandra (FOSS.IN/2010) Leveraging the Git object store 16th December 2010 3 / 11
    • Part I: The background noise The guts of Git git-pull.sh, git-rebase.sh Porcelain git-stash.sh, git-am.sh ls-tree.c, read-tree.c, Plumbing update-index.c, fsck.c UI layer rev-parse.c transport.c, transport-helper.c, Transport send-pack.c, receive-pack.c walker.c, tree-walk.c, Walkers diffcore-*.c pack-*.c, unpack-*.c Packing (.git/objects/pack/*) object.c, commit.c, tree.c, Object API blob.c, tag.c, refs.c Object store .git/objects/*Ramkumar Ramachandra (FOSS.IN/2010) Leveraging the Git object store 16th December 2010 4 / 11
    • Part I: The background noise . . . and the guts of the object store tree blob commit sha1 d93bf sha1 ee53b sha1 1c88a #include "cache.h" size 144 #include "cache-tree.h" parents [] #include "tree.h" references to other trees, tree d93bf blobs ... #include "blob.h" #include "commit.h" date 100532.. (...) commit message, author, committer, encoding ... blob sha1 fe3da #!/bin/sh { commit cat <<EOF sayIt: sha1 be78a (...) parents [1c88a, ] tree tree 2d1fa sha1 2d1fa blob date 100547.. size 213 sha1 54a52 commit message, author, references to other trees, #!/bin/sh committer, encoding ... blobs ... # # Copyright (c) 2005 Junio # (...)Ramkumar Ramachandra (FOSS.IN/2010) Leveraging the Git object store 16th December 2010 5 / 11
    • Part II: A fast-import crash course What does the protocol look like? commit refs/heads/remote-helper mark :30 author Ramkumar Ramachandra <artagnon@gmail.com> 1170314617 +0530 committer Junio C Hamano <gitster@pobox.com> 1170325891 +0100 data 111 vcs-svn: Fix delete operation in the treap from :28 M 100644 :29 vcs-svn/trp.h blob mark :31 data 4941 /* * C macro implementation of treaps. * * Usage: [...]Ramkumar Ramachandra (FOSS.IN/2010) Leveraging the Git object store 16th December 2010 6 / 11
    • Part II: A fast-import crash course The concept of a remote helper Object store fast-import fast-export fetch import push Remote Network API Remote helper server transport-helper.c connect_helper get_importer get_exporter Git CoreRamkumar Ramachandra (FOSS.IN/2010) Leveraging the Git object store 16th December 2010 7 / 11
    • Part II: A fast-import crash course The import-export machinery / trunk branches tags Node-path: commons/STATUS Node-kind: (file|dir) Node-action: (change|add|delete|replace) moo svn:log svn:author svn:date svn:executable svn:specialRamkumar Ramachandra (FOSS.IN/2010) Leveraging the Git object store 16th December 2010 8 / 11
    • Part II: A fast-import crash course Bi-directional how? 1 Keep track of written blobs using marks 2 Fetch a previously written blob 3 Apply the delta 4 Write back the new blobRamkumar Ramachandra (FOSS.IN/2010) Leveraging the Git object store 16th December 2010 9 / 11
    • Part III: Conclusion What you should hack on when you go home git-based fast-import things import-export gitcore machineryRamkumar Ramachandra (FOSS.IN/2010) Leveraging the Git object store 16th December 2010 10 / 11
    • Part III: Conclusion Can I have these slides? Ramkumar Ramachandra artagnon@gmail.com http://artagnon.com Source: http://github.com/artagnon/foss.inRamkumar Ramachandra (FOSS.IN/2010) Leveraging the Git object store 16th December 2010 11 / 11