git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Managing /etc with git: Store ownership and time in git?

From
Jeff King <peff@peff.net>
Date
Nov 1, 2007, 13:10 UTC
Message-ID
<20071101131043.GA19914@coredump.intra.peff.net>
In-Reply-To
<loom.20071101T123817-247@post.gmane.org>
On Thu, Nov 01, 2007 at 12:55:57PM +0000, Alexander Skwar wrote:
> I'd like to use git to manage the /etc directories of some servers.
> What's quite nice with git (in comparison to svn) is, that it
> out-of-the-box stores the permissions of a file. But it doesn't seem
It doesn't; git stores only the executable bit.
> like it stores the ownership (ie. user/group) of tracked content.
> Does anyone know how to cope with that "problem"?

Yes, convert your file metadata into a text format in a file in the repository, and commit that.

> Oh, and it also seems that Git doesn't store the time information of
> files, does it? For tracking /etc, this would be very useful. Would
> anyone have a solution for this as well?
Same as above.
> What I'm thinking about right now is, to write a "hook" script which
> "dumps" the stats of the to-be added files in some "index" file. But
> that seems like a rather clumsy soltion...

That's more or less the solution that has been advocated. Search in the list archives for /etc solutions; this topic comes up every few months.

-Peff
Previous: Jakub Narebski
Message 4 of 4 in “Managing /etc with git: Store ownership and time in git?”
  1. Alexander SkwarNov 1, 2007
  2. Miklos VajnaNov 1, 2007
  3. Jakub NarebskiNov 1, 2007
  4. Jeff KingNov 1, 2007

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.