{"thread":{"id":"34282","subject":"device files should be handled by git","startedAt":"2013-06-27T03:27:56Z","lastAt":"2013-06-27T13:24:00Z","messageCount":3,"participants":["Perry Wagle","Fredrik Gustafsson","Johan Herland"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"222064","messageId":"21095513-708E-4F82-88D0-A312B74BA7F4@mac.com","threadId":"34282","inReplyTo":null,"subject":"device files should be handled by git","fromName":"Perry Wagle","fromEmail":"wagle@mac.com","sentAt":"2013-06-27T03:27:56Z","receivedAt":"2013-06-27T03:27:56Z","isPatch":false,"sender":{"key":"wagle@mac.com","avatar":null},"body":"Hi --\n\nI have a disk image of a small embedded device whose root file system I'd like to check-in to git as a means of distributing its GPL'd software.  In that disk image are device files, which GIT studiously ignores.  If symlinks are handled (contents being the path that the symlink points at), I don't see why device files can't be handled (contents being the type (char or block) and the major and minor device number).  TAR, for example, handles this fine, except that using tar in git sort-of goes against the granularity of the objects being modified (like adding a bunch of extra \"sd??\" devices), such that you are modifying a whole tar ball instead of the individual (device) files.\n\nIs there a reason not to handle device files other than \"its not traditional\"?  That's the only reason given in google or the IRC channel.\n\nThanks!\n\n-- Perry\n"},{"id":"222077","messageId":"20130627130842.GB27497@paksenarrion.iveqy.com","threadId":"34282","inReplyTo":"21095513-708E-4F82-88D0-A312B74BA7F4@mac.com","subject":"Re: device files should be handled by git","fromName":"Fredrik Gustafsson","fromEmail":"iveqy@iveqy.com","sentAt":"2013-06-27T13:08:42Z","receivedAt":"2013-06-27T13:08:42Z","isPatch":false,"sender":{"key":"iveqy@iveqy.com","avatar":"https://avatars.githubusercontent.com/u/761743?v=4"},"body":"On Wed, Jun 26, 2013 at 08:27:56PM -0700, Perry Wagle wrote:\n> Hi --\n> \n> I have a disk image of a small embedded device whose root file system I'd like to check-in to git as a means of distributing its GPL'd software.  In that disk image are device files, which GIT studiously ignores.  If symlinks are handled (contents being the path that the symlink points at), I don't see why device files can't be handled (contents being the type (char or block) and the major and minor device number).  TAR, for example, handles this fine, except that using tar in git sort-of goes against the granularity of the objects being modified (like adding a bunch of extra \"sd??\" devices), such that you are modifying a whole tar ball instead of the individual (device) files.\n> \n> Is there a reason not to handle device files other than \"its not traditional\"?  That's the only reason given in google or the IRC channel.\n> \n> Thanks!\n\nIn linux you can't create device files if your not root. On windows\nthose files won't even exists (afaik).\n\nWouldn't this be very unportable and hard to use (meaning that you need\nto handle your git repo as root or give git setuid root)?\n\n-- \nMed vänliga hälsningar\nFredrik Gustafsson\n\ntel: 0733-608274\ne-post: iveqy@iveqy.com\n"},{"id":"222079","messageId":"CALKQrgckBB0Nkf0k9iNcoH2fpqPREEWLrL9eXsZXGK1g=yt-iQ@mail.gmail.com","threadId":"34282","inReplyTo":"20130627130842.GB27497@paksenarrion.iveqy.com","subject":"Re: device files should be handled by git","fromName":"Johan Herland","fromEmail":"johan@herland.net","sentAt":"2013-06-27T13:24:00Z","receivedAt":"2013-06-27T13:24:00Z","isPatch":false,"sender":{"key":"johan@herland.net","avatar":"https://avatars.githubusercontent.com/u/547031?v=4"},"body":"On Thu, Jun 27, 2013 at 3:08 PM, Fredrik Gustafsson <iveqy@iveqy.com> wrote:\n> On Wed, Jun 26, 2013 at 08:27:56PM -0700, Perry Wagle wrote:\n>> Is there a reason not to handle device files other than \"its not traditional\"?  That's the only reason given in google or the IRC channel.\n>\n> In linux you can't create device files if your not root. On windows\n> those files won't even exists (afaik).\n>\n> Wouldn't this be very unportable and hard to use (meaning that you need\n> to handle your git repo as root or give git setuid root)?\n\nDevice files will probably never be supported by Git for the reasons\nmentioned by Fredrik. If anything, etckeeper\n(http://joeyh.name/code/etckeeper/) would be a much more appropriate\nplace to support this, although I don't think it currently does.\nAlternatively, you could follow the suggestions of\nhttp://superuser.com/questions/440873/git-unable-add-device-file (and\nelsewhere), and write a script for generating the device files, rather\nthan storing them as-is.\n\n...Johan\n\n-- \nJohan Herland, <johan@herland.net>\nwww.herland.net\n"}]}