{"thread":{"id":"25171","subject":"Mirror plain directory under git","startedAt":"2010-09-20T19:12:45Z","lastAt":"2010-09-24T20:20:15Z","messageCount":5,"participants":["Tong Sun","Enrico Weigelt","Daniel Johnson"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"151143","messageId":"AANLkTi=9nqfzR-Zo85LieBuhv97oudCVZCex8ZL3mM0t@mail.gmail.com","threadId":"25171","inReplyTo":null,"subject":"Mirror plain directory under git","fromName":"Tong Sun","fromEmail":"suntong@cpan.org","sentAt":"2010-09-20T19:12:45Z","receivedAt":"2010-09-20T19:12:45Z","isPatch":false,"sender":{"key":"suntong@cpan.org","avatar":null},"body":"Hi,\n\nHow feasible it is to mirror a plain directory and put it under git\nrevision control (leaving the original intact)?\n\nMore or less like what etckeeper is doing to revision /etc directory.\nI.e., I want to use git + some magic to replace rdiff-backup, so as\nnot only easily to restore, but also easy to track revision changes as\nwell.\n\nIt is just a wild dream?\n\nPlease CC me when replying.\n\nThanks\n"},{"id":"151470","messageId":"20100921075621.GA27575@nibiru.local","threadId":"25171","inReplyTo":"AANLkTi=9nqfzR-Zo85LieBuhv97oudCVZCex8ZL3mM0t@mail.gmail.com","subject":"Re: Mirror plain directory under git","fromName":"Enrico Weigelt","fromEmail":"weigelt@metux.de","sentAt":"2010-09-21T07:56:21Z","receivedAt":"2010-09-21T07:56:21Z","isPatch":false,"sender":{"key":"weigelt@metux.de","avatar":null},"body":"* Tong Sun <suntong@cpan.org> wrote:\n\nHi,\n\n> How feasible it is to mirror a plain directory and put it under git\n> revision control (leaving the original intact)?\n\nProbably you'll want to have the .git dir outside of /etc, so\n--git-dir and --work-dir are your friend (man 1 git).\n\nAn cron-script could look something like that:\n\n    #!/bin/bash\n\n    cd /var/my-etc-archive.git && \\\n\tgit --work-dir=/etc add -A && \\\n\tgit --work-dir=/etc commit -m \"autocommit\" && \\\n\tgit push origin\n\n(perhaps filter the output a bit, so you don't get unncessary\ncron mails ;-))\n\n\ncu\n-- \n----------------------------------------------------------------------\n Enrico Weigelt, metux IT service -- http://www.metux.de/\n\n phone:  +49 36207 519931  email: weigelt@metux.de\n mobile: +49 151 27565287  icq:   210169427         skype: nekrad666\n----------------------------------------------------------------------\n Embedded-Linux / Portierung / Opensource-QM / Verteilte Systeme\n----------------------------------------------------------------------\n"},{"id":"151484","messageId":"201009241036.45388.ComputerDruid@gmail.com","threadId":"25171","inReplyTo":"20100921075621.GA27575@nibiru.local","subject":"Re: Mirror plain directory under git","fromName":"Daniel Johnson","fromEmail":"computerdruid@gmail.com","sentAt":"2010-09-24T14:36:39Z","receivedAt":"2010-09-24T14:36:39Z","isPatch":false,"sender":{"key":"computerdruid@gmail.com","avatar":"https://avatars.githubusercontent.com/u/34696?v=4"},"body":"I know nothing about the subject matter of your email, but the date appears to \nbe wrong on this email message, hiding it back further in the history than it \nshould be. Just a warning, as the last few emails you sent all seem to be like \nthis.\n\nSome of the relevant mail headers from this mail:\n\n>Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n>\tid S1752826Ab0IXMH3 (ORCPT <rfc822;thleetest9@gmail.com>\n>\t+ 99 others); Fri, 24 Sep 2010 08:07:29 -0400\n>Received: from caprica.metux.de ([82.165.128.25]:38054 \"EHLO\n>\tmailgate.caprica.metux.de\" rhost-flags-OK-OK-OK-FAIL)\n>\tby vger.kernel.org with ESMTP id S1752237Ab0IXMH3 (ORCPT\n>\t<rfc822;git@vger.kernel.org>); Fri, 24 Sep 2010 08:07:29 -0400\n>Received: from mailgate.caprica.metux.de (localhost.localdomain [127.0.0.1])\n>\tby mailgate.caprica.metux.de (8.14.4/8.14.4) with ESMTP id o8OBuZHp005578;\n>\tFri, 24 Sep 2010 14:08:05 +0200\n>Received: (from uucp@localhost)\n>\tby mailgate.caprica.metux.de (8.14.4/8.14.4/Submit) with UUCP id \n>\to8NKgxSa008244; Thu, 23 Sep 2010 22:42:59 +0200\n>Received: (from weigelt@localhost)\n>\tby nibiru.metux.de (8.12.10/8.12.10) id o8L7uL3d031552;\n>\tTue, 21 Sep 2010 09:56:21 +0200\n>Date:\tTue, 21 Sep 2010 09:56:21 +0200\n"},{"id":"151487","messageId":"AANLkTimYSBPvfAJH7HG+zuo6G4OEQ359t=XL3EncMhy9@mail.gmail.com","threadId":"25171","inReplyTo":"201009241036.45388.ComputerDruid@gmail.com","subject":"Re: Mirror plain directory under git","fromName":"Tong Sun","fromEmail":"suntong@cpan.org","sentAt":"2010-09-24T15:24:55Z","receivedAt":"2010-09-24T15:24:55Z","isPatch":false,"sender":{"key":"suntong@cpan.org","avatar":null},"body":"First of all, thanks a lot Enrico for your answer. I was just about to\ngave up, and start coding for rcs. Your answer is extremely helpful.\n\nOn Fri, Sep 24, 2010 at 10:36 AM, Daniel Johnson\n<computerdruid@gmail.com> wrote:\n> I know nothing about the subject matter of your email, but the date appears to\n> be wrong on this email message, hiding it back further in the history than it\n> should be. Just a warning, as the last few emails you sent all seem to be like\n> this.\n\nOk, I took the liberty to look into the issue, and it seems that,\nEnrico, it's your mailgate.caprica.metux.de mail gateway that is\ncausing the delay -- taking 3 days for your email to come out of it:\n\nReceived: by x1.dev; 24 Sep 2010 12:07:27 -0000\nReceived: by 16.mx.develooper.com (qpsmtpd/0.80); Fri, 24 Sep 2010\n05:07:22 -0700\nReceived: by mailgate.caprica.metux.de (8.14.4/8.14.4); Fri, 24 Sep\n2010 14:08:05 +0200\nReceived: (from uucp@localhost) by mailgate.caprica.metux.de\n(8.14.4/8.14.4/Submit); Thu, 23 Sep 2010 22:42:59 +0200\nReceived: (from weigelt@localhost) by nibiru.metux.de\n(8.12.10/8.12.10) id o8L7uL3d031552; Tue, 21 Sep 2010 09:56:21 +0200\nDate: Tue, 21 Sep 2010 09:56:21 +0200\n\nHTH\n\nTong\n"},{"id":"151738","messageId":"20100924202015.GC29566@nibiru.local","threadId":"25171","inReplyTo":"AANLkTimYSBPvfAJH7HG+zuo6G4OEQ359t=XL3EncMhy9@mail.gmail.com","subject":"Re: Mirror plain directory under git","fromName":"Enrico Weigelt","fromEmail":"weigelt@metux.de","sentAt":"2010-09-24T20:20:15Z","receivedAt":"2010-09-24T20:20:15Z","isPatch":false,"sender":{"key":"weigelt@metux.de","avatar":null},"body":"* Tong Sun <suntong@cpan.org> wrote:\n\n> Ok, I took the liberty to look into the issue, and it seems that,\n> Enrico, it's your mailgate.caprica.metux.de mail gateway that is\n> causing the delay -- taking 3 days for your email to come out of it:\n\nYep. I some trouble with my relay - quota was exceeded and so\nall the mails were stuck in uucp spools instead of being relayed ;-o\n\n\ncu\n-- \n----------------------------------------------------------------------\n Enrico Weigelt, metux IT service -- http://www.metux.de/\n\n phone:  +49 36207 519931  email: weigelt@metux.de\n mobile: +49 151 27565287  icq:   210169427         skype: nekrad666\n----------------------------------------------------------------------\n Embedded-Linux / Portierung / Opensource-QM / Verteilte Systeme\n----------------------------------------------------------------------\n"}]}