Andy Parkins wrote:Right now you only have commits of the top directory aka the super project. Every subdirectory is just that: a directory (which git stores as trees). Now, if you have a subdirectory that git stores as a commit, not a tree, you have a subproject. It is a directory with history, and because the commit is part of your superprject, you have access to this history. No, it is not. Currently, there is no way to store a commit within the contents of another commit. You can only store trees and blobs. OK. OK, I am still with you so far. Here comes the part where we did not meet before. Of course you do not make any reference from your subproject to your superproject. You do exactly what you do in git today when you work with different branches: Step 1: You fix a bug in myproject's subdirectory libxcb. Step 2: You commit to myproject. myproject now contains a new commit object in path libxcb. (How to do that is up to the UI but at the repository level the outcome should be obvious). This commit is local to your repository. Step 3: You propose your changes to the libxcb upstream (it might not be a repository you have write access to). I use the following made up syntax (see man git-rev-parse): A suffix : followed by a path, _followed by a suffix //::_ names the _revision_ at the given path in the tree-ish object named by the part before the colon. Step 3a: Generate a patch git diff libxcb//^..libxcb// Step 3b: Push your changes git push <libxcb-repository> HEAD:libxcb//:<branch in libxcb-repository> Step 3c: Let your changes be pulled "Hello, please pull <myproject-repository> HEAD:libxcb//:<branch in libxcb-repository>" Step 4: Pull upstream version (hopefully with your changes, otherwise you have to merge) git pull <libxcb-repository> <branch in libxcb-repository>::HEAD:libxcb// See, it works. From what I understand you want to do the commit and push steps in one go. How do you want to record local (to your superproject) changes to the subproject? Regards Stephan - To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
| Greg Kroah-Hartman | [PATCH 001/196] Chinese: Add the known_regression URI to the HOWTO |
| Andy Whitcroft | clam |
| Vladislav Bolkhovitin | Re: Integration of SCST in the mainstream Linux kernel |
git: | |
| Jarek Poplawski | [PATCH] pkt_sched: Destroy gen estimators under rtnl_lock(). |
| David Miller | [GIT]: Networking |
| Gerrit Renker | [PATCH 27/37] dccp: Integration of dynamic feature activation - part 2 (server side) |
| Evgeniy Polyakov | Re: [BUG] New Kernel Bugs |
