{"thread":{"id":"15572","subject":"Help planning a git repo layout","startedAt":"2008-09-18T08:37:12Z","lastAt":"2008-09-18T13:25:08Z","messageCount":3,"participants":["Leevi Graham","Boaz Harrosh"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"91013","messageId":"938E7E5C-4FCB-4131-A5C4-254CEEC70673@leevigraham.com","threadId":"15572","inReplyTo":null,"subject":"Help planning a git repo layout","fromName":"Leevi Graham","fromEmail":"info@leevigraham.com","sentAt":"2008-09-18T08:37:12Z","receivedAt":"2008-09-18T08:37:12Z","isPatch":false,"sender":{"key":"info@leevigraham.com","avatar":null},"body":"Hey everyone,\n\nI'm after some advice on how to layout my git repo(s).\n\nHere's my current situation:\n\nI am developing 10 different ExpressionEngine addons that all live  \ninside one ExpressionEngine installation. A simplified EE installation  \nhas the following folders (all cruft removed):\n\n|-root\n   |-ee-admin\n   |---extensions\n   |---language\n   |---modules\n   |-themes\n   |---site_themes\n\nMy addons are a combination of files located in the extensions,  \nlanguage, modules and themes folders. An simple extension may look like:\n\n|-root\n   |-ee-admin\n   |---extensions\n   |-----ext.lg_data_matrix.php\n   |---language\n   |-----english\n   |---------lang.lg_data_matrix.php\n   |---modules\n   |-themes\n   |---site_themes\n\nThe extension above contains two files:\n\n- /ee-admin/extensions/ext.lg_data_matrix.php\n- /ee-admin/language/english/ext.lg_data_matrix.php\n\nI will be developing multiple extensions in the one EE install to make  \nsure they all work with the core and do not conflict with each other.  \nSo my directory will have more than one addon in it:\n\n|-root\n   |-ee-admin\n   |---extensions\n   |-----ext.lg_data_matrix.php\n   |-----ext.lg_minify.php\n   |-----ext.lg_better_meta_ext.php\n   |---language\n   |-----english\n   |---------lang.lg_data_matrix.php\n   |---------lang.lg_minify.php\n   |---------lang.lg_better_meta.php\n   |---------lang.lg_better_meta_ext.php\n   |---modules\n   |-----lg_better_meta\n   |---------mcp.lg_better_meta.php\n   |---------mod.lg_better_meta.php\n   |-themes\n   |---site_themes\n\nMy problem comes when I want to tag and release an individual addon  \nwhich is a collection of files in multiple folders.\n\nJust say I wanted to tag and release LG Better Meta. Ideally I would  \nlike to export a folder structure like:\n\n- /ee-admin/extensions/ext.lg_better_meta.php\n- /ee-admin/language/english/ext.lg_better_meta.php\n- /ee-admin/language/english/ext.lg_better_meta_ext.php\n- /ee-admin/modules/lg_better_meta/mcp.lg_better_meta.php\n- /ee-admin/modules/lg_better_meta/mod.lg_better_meta.php\n\nI would also like to give people the ability to clone each of the  \naddons either as a full repo or part thereof.\n\nAny advice would be greatly appreciated.\n\nCheers Leevi\n"},{"id":"91025","messageId":"48D24002.70709@panasas.com","threadId":"15572","inReplyTo":"938E7E5C-4FCB-4131-A5C4-254CEEC70673@leevigraham.com","subject":"Re: Help planning a git repo layout","fromName":"Boaz Harrosh","fromEmail":"bharrosh@panasas.com","sentAt":"2008-09-18T11:48:18Z","receivedAt":"2008-09-18T11:48:18Z","isPatch":false,"sender":{"key":"bharrosh@panasas.com","avatar":"https://gravatar.com/avatar/347e426f8ca0409f6891ceeefd4c3c2d8769608382323057efeaa362b4c3dbf3?d=mp&s=160"},"body":"Leevi Graham wrote:\n> Hey everyone,\n> \n> I'm after some advice on how to layout my git repo(s).\n> \n> Here's my current situation:\n> \n> I am developing 10 different ExpressionEngine addons that all live  \n> inside one ExpressionEngine installation. A simplified EE installation  \n> has the following folders (all cruft removed):\n> \n> |-root\n>    |-ee-admin\n>    |---extensions\n>    |---language\n>    |---modules\n>    |-themes\n>    |---site_themes\n> \n> My addons are a combination of files located in the extensions,  \n> language, modules and themes folders. An simple extension may look like:\n> \n> |-root\n>    |-ee-admin\n>    |---extensions\n>    |-----ext.lg_data_matrix.php\n>    |---language\n>    |-----english\n>    |---------lang.lg_data_matrix.php\n>    |---modules\n>    |-themes\n>    |---site_themes\n> \n> The extension above contains two files:\n> \n> - /ee-admin/extensions/ext.lg_data_matrix.php\n> - /ee-admin/language/english/ext.lg_data_matrix.php\n> \n> I will be developing multiple extensions in the one EE install to make  \n> sure they all work with the core and do not conflict with each other.  \n> So my directory will have more than one addon in it:\n> \n> |-root\n>    |-ee-admin\n>    |---extensions\n>    |-----ext.lg_data_matrix.php\n>    |-----ext.lg_minify.php\n>    |-----ext.lg_better_meta_ext.php\n>    |---language\n>    |-----english\n>    |---------lang.lg_data_matrix.php\n>    |---------lang.lg_minify.php\n>    |---------lang.lg_better_meta.php\n>    |---------lang.lg_better_meta_ext.php\n>    |---modules\n>    |-----lg_better_meta\n>    |---------mcp.lg_better_meta.php\n>    |---------mod.lg_better_meta.php\n>    |-themes\n>    |---site_themes\n> \n> My problem comes when I want to tag and release an individual addon  \n> which is a collection of files in multiple folders.\n> \n> Just say I wanted to tag and release LG Better Meta. Ideally I would  \n> like to export a folder structure like:\n> \n> - /ee-admin/extensions/ext.lg_better_meta.php\n> - /ee-admin/language/english/ext.lg_better_meta.php\n> - /ee-admin/language/english/ext.lg_better_meta_ext.php\n> - /ee-admin/modules/lg_better_meta/mcp.lg_better_meta.php\n> - /ee-admin/modules/lg_better_meta/mod.lg_better_meta.php\n> \n> I would also like to give people the ability to clone each of the  \n> addons either as a full repo or part thereof.\n> \n> Any advice would be greatly appreciated.\n> \n> Cheers Leevi\n> \n\nHave branches with individual views of files like the above\nLG-Better-Meta starts from a clean tree and only adds\n- /ee-admin/extensions/ext.lg_better_meta.php\n- /ee-admin/language/english/ext.lg_better_meta.php\n- /ee-admin/language/english/ext.lg_better_meta_ext.php\n- /ee-admin/modules/lg_better_meta/mcp.lg_better_meta.php\n- /ee-admin/modules/lg_better_meta/mod.lg_better_meta.php\n\nOther branches with other individual views of files.\nCommits will have to be on the individual branches.\nLets call these product-branches\n\nThen you have integration branches that merge from time\nto time the product-branches, master been the merge of\nall.\n\nUsers that only need a single product-branch will checkout\nthat one. Users needing all will checkout master.\n\nFor your convenience, you can locally clone the master\ngit, and have checkouts of single product-branches so\nyou can commit patches in parallel. Then push and merge.\n\nDon't forget to give all empty branches at least one\ncommon ancestor before adding files. Like with .gitignore\n\nBoaz\n"},{"id":"91026","messageId":"48D256B4.90006@panasas.com","threadId":"15572","inReplyTo":"076A189D-66E9-4683-9C24-1C0A7A451892@leevigraham.com","subject":"Re: Help planning a git repo layout","fromName":"Boaz Harrosh","fromEmail":"bharrosh@panasas.com","sentAt":"2008-09-18T13:25:08Z","receivedAt":"2008-09-18T13:25:08Z","isPatch":false,"sender":{"key":"bharrosh@panasas.com","avatar":"https://gravatar.com/avatar/347e426f8ca0409f6891ceeefd4c3c2d8769608382323057efeaa362b4c3dbf3?d=mp&s=160"},"body":"Leevi Graham wrote:\n> Thanks for the advice Boaz,\n> \n> So to clarify:\n> \n> Create a new git repo in the root of the EE install. This will be the  \n> master branch.\n> \n> Then create branches (from the master branch) for each addon (product  \n> branches) that only shows the files that relate to that addon. How do  \n> I filter out the files I don't want to see?\n> \n> Work on each product branch independently merging as I go.\n> \n> Occasionally merge everything back into the master branch so I know  \n> that there are no conflicts with the product branches.\n> \n> I think I have it pretty clear in my head.\n> \n> Thanks for your patience and help\n> \n> Leevi\n\nNP. Please don't top-post when on a mailing list. It's good\nwhen chatting with individuals, but it is a mess, for people\nthat need to view it on a mailing list archives.\n\nBasically yes. You start with master and commit some basic/common\nfiles like:\n$ git add .gitignore; git-commit ...\n$ git tag BEGIN\nthen create a branch\n$ git checkout -b foo\nselectively add files\n$ git add foo/ include/foo doc/foo\n$ git-commit\nYou might want to add all these in a set of patches for readability.\nThen\n$ git-checkout -b bar BEGIN\nNote that all foo's files vanished\n$ git add bar/ include/bar ...\n$ git-commit ...\nand so on...\n\nThen at the end\n$ git-checkout master\nNote that all files have vanished\n$ git-merge foo\n$ git-merge bar\nAll the files are back\n\nthen you can clone locally to trees, one with foo checked-out,\none with bar, if you need to commit to both at once. Then push\nand merge at master\n\nGood luck\nBoaz\n\n> \n> On 18/09/2008, at 9:48 PM, Boaz Harrosh wrote:\n> \n>> Leevi Graham wrote:\n>>> Hey everyone,\n>>>\n>>> I'm after some advice on how to layout my git repo(s).\n>>>\n>>> Here's my current situation:\n>>>\n>>> I am developing 10 different ExpressionEngine addons that all live\n>>> inside one ExpressionEngine installation. A simplified EE  \n>>> installation\n>>> has the following folders (all cruft removed):\n>>>\n>>> |-root\n>>>   |-ee-admin\n>>>   |---extensions\n>>>   |---language\n>>>   |---modules\n>>>   |-themes\n>>>   |---site_themes\n>>>\n>>> My addons are a combination of files located in the extensions,\n>>> language, modules and themes folders. An simple extension may look  \n>>> like:\n>>>\n>>> |-root\n>>>   |-ee-admin\n>>>   |---extensions\n>>>   |-----ext.lg_data_matrix.php\n>>>   |---language\n>>>   |-----english\n>>>   |---------lang.lg_data_matrix.php\n>>>   |---modules\n>>>   |-themes\n>>>   |---site_themes\n>>>\n>>> The extension above contains two files:\n>>>\n>>> - /ee-admin/extensions/ext.lg_data_matrix.php\n>>> - /ee-admin/language/english/ext.lg_data_matrix.php\n>>>\n>>> I will be developing multiple extensions in the one EE install to  \n>>> make\n>>> sure they all work with the core and do not conflict with each other.\n>>> So my directory will have more than one addon in it:\n>>>\n>>> |-root\n>>>   |-ee-admin\n>>>   |---extensions\n>>>   |-----ext.lg_data_matrix.php\n>>>   |-----ext.lg_minify.php\n>>>   |-----ext.lg_better_meta_ext.php\n>>>   |---language\n>>>   |-----english\n>>>   |---------lang.lg_data_matrix.php\n>>>   |---------lang.lg_minify.php\n>>>   |---------lang.lg_better_meta.php\n>>>   |---------lang.lg_better_meta_ext.php\n>>>   |---modules\n>>>   |-----lg_better_meta\n>>>   |---------mcp.lg_better_meta.php\n>>>   |---------mod.lg_better_meta.php\n>>>   |-themes\n>>>   |---site_themes\n>>>\n>>> My problem comes when I want to tag and release an individual addon\n>>> which is a collection of files in multiple folders.\n>>>\n>>> Just say I wanted to tag and release LG Better Meta. Ideally I would\n>>> like to export a folder structure like:\n>>>\n>>> - /ee-admin/extensions/ext.lg_better_meta.php\n>>> - /ee-admin/language/english/ext.lg_better_meta.php\n>>> - /ee-admin/language/english/ext.lg_better_meta_ext.php\n>>> - /ee-admin/modules/lg_better_meta/mcp.lg_better_meta.php\n>>> - /ee-admin/modules/lg_better_meta/mod.lg_better_meta.php\n>>>\n>>> I would also like to give people the ability to clone each of the\n>>> addons either as a full repo or part thereof.\n>>>\n>>> Any advice would be greatly appreciated.\n>>>\n>>> Cheers Leevi\n>>>\n>> Have branches with individual views of files like the above\n>> LG-Better-Meta starts from a clean tree and only adds\n>> - /ee-admin/extensions/ext.lg_better_meta.php\n>> - /ee-admin/language/english/ext.lg_better_meta.php\n>> - /ee-admin/language/english/ext.lg_better_meta_ext.php\n>> - /ee-admin/modules/lg_better_meta/mcp.lg_better_meta.php\n>> - /ee-admin/modules/lg_better_meta/mod.lg_better_meta.php\n>>\n>> Other branches with other individual views of files.\n>> Commits will have to be on the individual branches.\n>> Lets call these product-branches\n>>\n>> Then you have integration branches that merge from time\n>> to time the product-branches, master been the merge of\n>> all.\n>>\n>> Users that only need a single product-branch will checkout\n>> that one. Users needing all will checkout master.\n>>\n>> For your convenience, you can locally clone the master\n>> git, and have checkouts of single product-branches so\n>> you can commit patches in parallel. Then push and merge.\n>>\n>> Don't forget to give all empty branches at least one\n>> common ancestor before adding files. Like with .gitignore\n>>\n>> Boaz\n>>\n> \n"}]}