{"thread":{"id":"11702","subject":"tracking a file from another project in my own project","startedAt":"2008-01-22T08:35:46Z","lastAt":"2008-01-22T18:34:42Z","messageCount":6,"participants":["picca","Junio C Hamano","Jakub Narebski","Sergei Organov"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"66291","messageId":"20080122093546.72db8da0@synchrotron-soleil.Fr","threadId":"11702","inReplyTo":null,"subject":"tracking a file from another project in my own project","fromName":"picca","fromEmail":"picca@synchrotron-soleil.fr","sentAt":"2008-01-22T08:35:46Z","receivedAt":"2008-01-22T08:35:46Z","isPatch":false,"sender":{"key":"picca@synchrotron-soleil.fr","avatar":null},"body":"Hello\n\nSupposed I want to use the strbuf.c and strbuf.h file of git.git in my\nown project.git. Is it possible to configure git to track this\nparticular files when I do a git pull?\n\nThis way all strbug bugs corrected in git.git will be apply\nautomatically to my own project.\n\nThank you.\n"},{"id":"66294","messageId":"7v7ii2rzbq.fsf@gitster.siamese.dyndns.org","threadId":"11702","inReplyTo":"20080122093546.72db8da0@synchrotron-soleil.Fr","subject":"Re: tracking a file from another project in my own project","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2008-01-22T09:20:41Z","receivedAt":"2008-01-22T09:20:41Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"picca <picca@synchrotron-soleil.Fr> writes:\n\n> This way all strbug bugs corrected in git.git will be apply\n> automatically to my own project.\n\nIf I were you I'd probably just keep git.git as a submodule in\nyour project and have two symlinks from your toplevel pointing\nat git.git/strbuf.[ch] (or from src/ to ../git.git/strbuf.[ch]).\n\nOr \"merge -s subtree\".\n"},{"id":"66308","messageId":"20080122145658.18b6ef89@synchrotron-soleil.Fr","threadId":"11702","inReplyTo":"7v7ii2rzbq.fsf@gitster.siamese.dyndns.org","subject":"Re: tracking a file from another project in my own project","fromName":"picca","fromEmail":"picca@synchrotron-soleil.fr","sentAt":"2008-01-22T13:56:58Z","receivedAt":"2008-01-22T13:56:58Z","isPatch":false,"sender":{"key":"picca@synchrotron-soleil.fr","avatar":null},"body":"On Tue, 22 Jan 2008 01:20:41 -0800\nJunio C Hamano <gitster@pobox.com> wrote:\n\n> If I were you I'd probably just keep git.git as a submodule in\n> your project and have two symlinks from your toplevel pointing\n> at git.git/strbuf.[ch] (or from src/ to ../git.git/strbuf.[ch]).\n\nSo submodule is a requirement to achieved this comportment ?\n\nIf someone want to clone my project.git, must he also clone the\ngit.git project or he loose the ability to follow by it's own the\nstrbuf.[ch] file ?\n\n> Or \"merge -s subtree\".\n\nI red the git help merge -s explanation but I do not understand how\nit can help in my case.\n\nThanks\n\nFrederic\n"},{"id":"66313","messageId":"m3fxwplw1i.fsf@roke.D-201","threadId":"11702","inReplyTo":"20080122145658.18b6ef89@synchrotron-soleil.Fr","subject":"Re: tracking a file from another project in my own project","fromName":"Jakub Narebski","fromEmail":"jnareb@gmail.com","sentAt":"2008-01-22T15:23:28Z","receivedAt":"2008-01-22T15:23:28Z","isPatch":false,"sender":{"key":"jnareb@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2706?v=4"},"body":"picca <picca@synchrotron-soleil.Fr> writes:\n\n> On Tue, 22 Jan 2008 01:20:41 -0800\n> Junio C Hamano <gitster@pobox.com> wrote:\n> \n> > If I were you I'd probably just keep git.git as a submodule in\n> > your project and have two symlinks from your toplevel pointing\n> > at git.git/strbuf.[ch] (or from src/ to ../git.git/strbuf.[ch]).\n> \n> So submodule is a requirement to achieved this comportment ?\n\nIf you want to have strbuf.[ch] automatically tracked from git.git\nthe you would have to have git.git project somehow embedded in your\nrepository.  Using submodules is one solution.\n\nCurrently there is no way to do \"sparse checkout\", i.e. automatically\ncheckout only needed files (even if git.git clone has all the\nobjects), but feel free to implement it... ;-) (just kidding).\n\nOr you can try to convince strbuf authors to make it into separate\nproject, which would be fetched into git.git like gitk was.  And you\ncould then pull from this project directly or indirectly (submodule)\ninto your project.\n  \n> If someone want to clone my project.git, must he also clone the\n> git.git project or he loose the ability to follow by it's own the\n> strbuf.[ch] file ?\n\nTrue.\n\n> > Or \"merge -s subtree\".\n> \n> I read the git help merge -s explanation but I do not understand how\n> it can help in my case.\n\nUsing subtree merge strategy you can join histories of your project\nand git.git, embedding git.git as a subdirectory like gitk and git-gui\nare now in git.git.  It is an alternative to using submodules.\n\n-- \nJakub Narebski\nPoland\nShadeHawk on #git\n"},{"id":"66321","messageId":"877ii17opo.fsf@osv.gnss.ru","threadId":"11702","inReplyTo":"m3fxwplw1i.fsf@roke.D-201","subject":"Re: tracking a file from another project in my own project","fromName":"Sergei Organov","fromEmail":"osv@javad.com","sentAt":"2008-01-22T17:30:11Z","receivedAt":"2008-01-22T17:30:11Z","isPatch":false,"sender":{"key":"osv@javad.com","avatar":null},"body":"Jakub Narebski <jnareb@gmail.com> writes:\n> picca <picca@synchrotron-soleil.Fr> writes:\n>> Junio C Hamano <gitster@pobox.com> wrote:\n\n[...]\n\n>> > Or \"merge -s subtree\".\n>> \n>> I read the git help merge -s explanation but I do not understand how\n>> it can help in my case.\n>\n> Using subtree merge strategy you can join histories of your project\n> and git.git, embedding git.git as a subdirectory like gitk and git-gui\n> are now in git.git.  It is an alternative to using submodules.\n\nIs subtree merge strategy documented?\n\n$ grep subtree Documentation/merge-strategies.txt\n$\n\n-- Sergei.\n"},{"id":"66323","messageId":"200801221934.43767.jnareb@gmail.com","threadId":"11702","inReplyTo":"877ii17opo.fsf@osv.gnss.ru","subject":"Re: tracking a file from another project in my own project","fromName":"Jakub Narebski","fromEmail":"jnareb@gmail.com","sentAt":"2008-01-22T18:34:42Z","receivedAt":"2008-01-22T18:34:42Z","isPatch":false,"sender":{"key":"jnareb@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2706?v=4"},"body":"Sergei Organov wrote:\n> Jakub Narebski <jnareb@gmail.com> writes:\n>> picca <picca@synchrotron-soleil.Fr> writes:\n>>> Junio C Hamano <gitster@pobox.com> wrote:\n> \n> [...]\n> \n>>>> Or \"merge -s subtree\".\n>>> \n>>> I read the git help merge -s explanation but I do not understand how\n>>> it can help in my case.\n>>\n>> Using subtree merge strategy you can join histories of your project\n>> and git.git, embedding git.git as a subdirectory like gitk and\n>> git-gui are now in git.git.  It is an alternative to using\n>> submodules. \n> \n> Is subtree merge strategy documented?\n> \n> $ grep subtree Documentation/merge-strategies.txt\n> $\n\nDocumentation/howto/using-merge-subtree.txt\n\nBut I agree that it should be also described, or at least mentioned\nin Documentation/merge-strategies.txt\n-- \nJakub Narebski\nPoland\n"}]}