All of lore.kernel.org
 help / color / mirror / Atom feed
* device files should be handled by git
@ 2013-06-27  3:27 Perry Wagle
  2013-06-27 13:08 ` Fredrik Gustafsson
  0 siblings, 1 reply; 3+ messages in thread
From: Perry Wagle @ 2013-06-27  3:27 UTC (permalink / raw)
  To: git

Hi --

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.

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.

Thanks!

-- Perry

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: device files should be handled by git
  2013-06-27  3:27 device files should be handled by git Perry Wagle
@ 2013-06-27 13:08 ` Fredrik Gustafsson
  2013-06-27 13:24   ` Johan Herland
  0 siblings, 1 reply; 3+ messages in thread
From: Fredrik Gustafsson @ 2013-06-27 13:08 UTC (permalink / raw)
  To: Perry Wagle; +Cc: git

On Wed, Jun 26, 2013 at 08:27:56PM -0700, Perry Wagle wrote:
> Hi --
> 
> 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.
> 
> 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.
> 
> Thanks!

In linux you can't create device files if your not root. On windows
those files won't even exists (afaik).

Wouldn't this be very unportable and hard to use (meaning that you need
to handle your git repo as root or give git setuid root)?

-- 
Med vänliga hälsningar
Fredrik Gustafsson

tel: 0733-608274
e-post: iveqy@iveqy.com

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: device files should be handled by git
  2013-06-27 13:08 ` Fredrik Gustafsson
@ 2013-06-27 13:24   ` Johan Herland
  0 siblings, 0 replies; 3+ messages in thread
From: Johan Herland @ 2013-06-27 13:24 UTC (permalink / raw)
  To: Fredrik Gustafsson; +Cc: Perry Wagle, git

On Thu, Jun 27, 2013 at 3:08 PM, Fredrik Gustafsson <iveqy@iveqy.com> wrote:
> On Wed, Jun 26, 2013 at 08:27:56PM -0700, Perry Wagle wrote:
>> 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.
>
> In linux you can't create device files if your not root. On windows
> those files won't even exists (afaik).
>
> Wouldn't this be very unportable and hard to use (meaning that you need
> to handle your git repo as root or give git setuid root)?

Device files will probably never be supported by Git for the reasons
mentioned by Fredrik. If anything, etckeeper
(http://joeyh.name/code/etckeeper/) would be a much more appropriate
place to support this, although I don't think it currently does.
Alternatively, you could follow the suggestions of
http://superuser.com/questions/440873/git-unable-add-device-file (and
elsewhere), and write a script for generating the device files, rather
than storing them as-is.

...Johan

-- 
Johan Herland, <johan@herland.net>
www.herland.net

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-06-27 13:24 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-06-27  3:27 device files should be handled by git Perry Wagle
2013-06-27 13:08 ` Fredrik Gustafsson
2013-06-27 13:24   ` Johan Herland

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.