{"thread":{"id":"20005","subject":"Git Submodule hooks someone else may find of use","startedAt":"2009-07-02T15:20:18Z","lastAt":"2009-07-02T15:20:18Z","messageCount":1,"participants":["Tim Harper"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"117370","messageId":"e1a5e9a00907020820i34fb3127r90f29d06619fe64e@mail.gmail.com","threadId":"20005","inReplyTo":null,"subject":"Git Submodule hooks someone else may find of use","fromName":"Tim Harper","fromEmail":"timcharper@gmail.com","sentAt":"2009-07-02T15:20:18Z","receivedAt":"2009-07-02T15:20:18Z","isPatch":false,"sender":{"key":"timcharper@gmail.com","avatar":"https://gravatar.com/avatar/1a2e0c06c7862ff065ee6b1d53195333a5a0577c040ecb2856a150d8e0b00ecd?d=mp&s=160"},"body":"A while ago I started a thread discussing my desires to have\nsubmodules automatically update when I switch branches or pull.  This\nI desired to occur only if my submodule revision conformed with the\npointer recorded in the superproject's previous HEAD.  In other words,\nif my submodule showed as \"modified\", and I switch branches, I would\ndesire that this \"modified\" state persist exactly the same way an\nuncommitted change would.\n\nI've created a local git hook to support this behavior.  If it\ninterests you, you may find it here, under\n'git-post-checkout-submodules'.\n\nhttp://github.com/timcharper/git-helpers/tree/master\n\nInstallation instructions are found at the top of the script.\n\nFeedback welcome.\n\nTim\n"}]}