{"thread":{"id":"34044","subject":"Is there a library for monitoring a git repository for any changes?","startedAt":"2013-06-07T03:16:53Z","lastAt":"2013-06-07T13:00:46Z","messageCount":2,"participants":["Robert Martin","Magnus Bäck"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"219582","messageId":"CABaQ0JgJaCY-LXHjXMq_7NTgHf2GqN4Ond7rm61jfLAV-gEgRQ@mail.gmail.com","threadId":"34044","inReplyTo":null,"subject":"Is there a library for monitoring a git repository for any changes?","fromName":"Robert Martin","fromEmail":"rdmartin3@gmail.com","sentAt":"2013-06-07T03:16:53Z","receivedAt":"2013-06-07T03:16:53Z","isPatch":false,"sender":{"key":"rdmartin3@gmail.com","avatar":null},"body":"Hi git,\n\nI want to work on a visualization program for git. I was hoping there\nwas a library that would allow me to monitor a git repo for changes.\nConsider it like inotify, but for a git repository (in fact, I think\nit would probably have inotify under the hood).\n\nThis hypothetical library would trigger an event any time the\nrepository was modified, i.e. any time the graph that represents\nhistory was changed.\n\nIs there such a library? If not, is there a better way to monitor the\nrepository so that I wouldn't need to write it myself? Would anyone\nelse be interested if I wrote it myself?\n\nCheers,\n\n\nRobert\n"},{"id":"219627","messageId":"20130607130042.GA28057@google.com","threadId":"34044","inReplyTo":"CABaQ0JgJaCY-LXHjXMq_7NTgHf2GqN4Ond7rm61jfLAV-gEgRQ@mail.gmail.com","subject":"Re: Is there a library for monitoring a git repository for any changes?","fromName":"Magnus Bäck","fromEmail":"baeck@google.com","sentAt":"2013-06-07T13:00:46Z","receivedAt":"2013-06-07T13:00:46Z","isPatch":false,"sender":{"key":"baeck@google.com","avatar":null},"body":"On Thursday, June 06, 2013 at 23:16 EDT,\n     Robert Martin <rdmartin3@gmail.com> wrote:\n\n> I want to work on a visualization program for git. I was hoping there\n> was a library that would allow me to monitor a git repo for changes.\n> Consider it like inotify, but for a git repository (in fact, I think\n> it would probably have inotify under the hood).\n> \n> This hypothetical library would trigger an event any time the\n> repository was modified, i.e. any time the graph that represents\n> history was changed.\n> \n> Is there such a library? If not, is there a better way to monitor the\n> repository so that I wouldn't need to write it myself? Would anyone\n> else be interested if I wrote it myself?\n\n'git ls-remote'? Either run periodically or, if the monitored git is\nlocal, triggered via inotify. If you have control over the git perhaps\na post-receive hook would be useful too.\n\n-- \nMagnus Bäck\nbaeck@google.com\n"}]}