{"thread":{"id":"28205","subject":"Problem with S_IFGITLINK","startedAt":"2011-08-24T12:49:40Z","lastAt":"2011-08-24T23:15:20Z","messageCount":6,"participants":["Adam Kłobukowski","Michael J Gruber","Michael Schubert","Nguyen Thai Ngoc Duy"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"174150","messageId":"4E54F364.7000503@gmail.com","threadId":"28205","inReplyTo":null,"subject":"Problem with S_IFGITLINK","fromName":"Adam Kłobukowski","fromEmail":"adamklobukowski@gmail.com","sentAt":"2011-08-24T12:49:40Z","receivedAt":"2011-08-24T12:49:40Z","isPatch":false,"sender":{"key":"adamklobukowski@gmail.com","avatar":null},"body":"Hello\n\nI'm trying to compile git on some very exotic u*ix flavor (FreeMiNT \nanyone? :)) and I encountered problem with S_IFGITLINK.\n\nUnfortunately, on my system S_IFGITLINK = S_IFLNK, and it breaks build \nin entry.c write_entry.\n\nShould I report a bug? (where?, I could not find any reference to \nbugtracker on git pages)\n\nCan I fix it somehow? Can I change value of S_IFGITLINK to something else?\n\nAdamK\n"},{"id":"174155","messageId":"4E550E03.3080104@drmicha.warpmail.net","threadId":"28205","inReplyTo":"4E54F364.7000503@gmail.com","subject":"Re: Problem with S_IFGITLINK","fromName":"Michael J Gruber","fromEmail":"git@drmicha.warpmail.net","sentAt":"2011-08-24T14:43:15Z","receivedAt":"2011-08-24T14:43:15Z","isPatch":false,"sender":{"key":"git@grubix.eu","avatar":"https://avatars.githubusercontent.com/u/233215?v=4"},"body":"Adam Kłobukowski venit, vidit, dixit 24.08.2011 14:49:\n> Hello\n> \n> I'm trying to compile git on some very exotic u*ix flavor (FreeMiNT \n> anyone? :)) and I encountered problem with S_IFGITLINK.\n> \n> Unfortunately, on my system S_IFGITLINK = S_IFLNK, and it breaks build \n> in entry.c write_entry.\n> \n> Should I report a bug? (where?, I could not find any reference to \n> bugtracker on git pages)\n\nYes. Here.\n\nA short log of the build break would be nice.\n\n> Can I fix it somehow? Can I change value of S_IFGITLINK to something else?\n\nFrom git's cache.h:\n\n/*\n * A \"directory link\" is a link to another git directory.\n *\n * The value 0160000 is not normally a valid mode, and\n * also just happens to be S_IFDIR + S_IFLNK\n *\n * NOTE! We *really* shouldn't depend on the S_IFxxx macros\n * always having the same values everywhere. We should use\n * our internal git values for these things, and then we can\n * translate that to the OS-specific value. It just so\n * happens that everybody shares the same bit representation\n * in the UNIX world (and apparently wider too..)\n */\n\nTime to implement that translation :|\n\nMichael\n"},{"id":"174156","messageId":"4E55115D.9000909@elegosoft.com","threadId":"28205","inReplyTo":"4E54F364.7000503@gmail.com","subject":"Re: Problem with S_IFGITLINK","fromName":"Michael Schubert","fromEmail":"mschub@elegosoft.com","sentAt":"2011-08-24T14:57:33Z","receivedAt":"2011-08-24T14:57:33Z","isPatch":false,"sender":{"key":"mschub@elegosoft.com","avatar":null},"body":"On 08/24/2011 02:49 PM, Adam Kłobukowski wrote:\n> I'm trying to compile git on some very exotic u*ix flavor (FreeMiNT\n> anyone? :)) [...]\n\nOut of interest: just for fun?\n"},{"id":"174158","messageId":"4E55180D.1040207@gmail.com","threadId":"28205","inReplyTo":"4E55115D.9000909@elegosoft.com","subject":"Re: Problem with S_IFGITLINK","fromName":"Adam Kłobukowski","fromEmail":"adamklobukowski@gmail.com","sentAt":"2011-08-24T15:26:05Z","receivedAt":"2011-08-24T15:26:05Z","isPatch":false,"sender":{"key":"adamklobukowski@gmail.com","avatar":null},"body":"W dniu 24.08.2011 16:57, Michael Schubert pisze:\n> On 08/24/2011 02:49 PM, Adam Kłobukowski wrote:\n>> I'm trying to compile git on some very exotic u*ix flavor (FreeMiNT\n>> anyone? :)) [...]\n>\n> Out of interest: just for fun?\n\nHobby. There are still active developers and users, but they're 'ugly \nand stupid' ;) (I mean: using CVS) for FreeMiNT kernel development. I \nwould like to propose to switch ti GIT, but I need to be able to compile \nnative binary first.\n\nAdamK\n"},{"id":"174159","messageId":"4E551904.303@gmail.com","threadId":"28205","inReplyTo":"4E550E03.3080104@drmicha.warpmail.net","subject":"Re: Problem with S_IFGITLINK","fromName":"Adam Kłobukowski","fromEmail":"adamklobukowski@gmail.com","sentAt":"2011-08-24T15:30:12Z","receivedAt":"2011-08-24T15:30:12Z","isPatch":false,"sender":{"key":"adamklobukowski@gmail.com","avatar":null},"body":"W dniu 24.08.2011 16:43, Michael J Gruber pisze:\n> Adam Kłobukowski venit, vidit, dixit 24.08.2011 14:49:\n>> Hello\n>>\n>> I'm trying to compile git on some very exotic u*ix flavor (FreeMiNT\n>> anyone? :)) and I encountered problem with S_IFGITLINK.\n>>\n>> Unfortunately, on my system S_IFGITLINK = S_IFLNK, and it breaks build\n>> in entry.c write_entry.\n>>\n>> Should I report a bug? (where?, I could not find any reference to\n>> bugtracker on git pages)\n>\n> Yes. Here.\n>\n> A short log of the build break would be nice.\n>\n>> Can I fix it somehow? Can I change value of S_IFGITLINK to something else?\n>\n>  From git's cache.h:\n>\n> /*\n>   * A \"directory link\" is a link to another git directory.\n>   *\n>   * The value 0160000 is not normally a valid mode, and\n>   * also just happens to be S_IFDIR + S_IFLNK\n>   *\n>   * NOTE! We *really* shouldn't depend on the S_IFxxx macros\n>   * always having the same values everywhere. We should use\n>   * our internal git values for these things, and then we can\n>   * translate that to the OS-specific value. It just so\n>   * happens that everybody shares the same bit representation\n>   * in the UNIX world (and apparently wider too..)\n>   */\n>\n> Time to implement that translation :|\n\nI may try to implement it, but I my knowledge of Git internals is equal \nto zero. If someone can point me what has to be done - I'll be gratefull.\n\nAdamK\n"},{"id":"174200","messageId":"CACsJy8Dgz92YqBnqjvMS9KqtNoNTyrP_0ZqEqTurGnVfTzriUQ@mail.gmail.com","threadId":"28205","inReplyTo":"4E551904.303@gmail.com","subject":"Re: Problem with S_IFGITLINK","fromName":"Nguyen Thai Ngoc Duy","fromEmail":"pclouds@gmail.com","sentAt":"2011-08-24T23:15:20Z","receivedAt":"2011-08-24T23:15:20Z","isPatch":false,"sender":{"key":"pclouds@gmail.com","avatar":"https://avatars.githubusercontent.com/u/720?v=4"},"body":"2011/8/24 Adam Kłobukowski <adamklobukowski@gmail.com>:\n> I may try to implement it, but I my knowledge of Git internals is equal to\n> zero. If someone can point me what has to be done - I'll be gratefull.\n\nGit stores mode in the index (struct cache_entry#ce_mode, cache.h) and\nin tree objects (see tree-walk.c). Basically you define a new set of\nS_IS* and S_IF* macros and use them instead of standard ones.\nTranslations from struct stat#st_mode will be needed, I think\nce_mode_from_stat() does that job.\n\nSo:\n - read index and checkout: entry.c\n - read and update index: read-cache.c\n - read tree objects: tree-walk.c\n - write tree objects: cache-tree.c\n - anywhere that checks struct cache_entry#ce_mode needs to convert to\nuse the new defines\n\nAnother way, less changes, is redefine S_IS* and S_IF* and ignore\nsystem values. Then make wrapper for stat() and lstat(), convert\nsystem values to git values. You can put these wrappers in compat\ndirectory. See git-compat-util.h, mingw port for example already\nredefine these functions for Windows platform.\n-- \nDuy\n"}]}