Re: [git-users] Retrieve logs from remote git repo and than get diffs for the past month
Current script basically gets every single branch, clones it, makes diffs and dumps them to files, but I'm a bit concerned about the future. We have just recently started switching to SVN and most of our repositories is still within that outdated scm. The thing is that some of them have 2K+ revisions. When I will have to produce a report for that whats than. :| Looks like we will have to get some server side solution that's gonna run next to our GitLab. On 31 March 2016 at 14:24, Nelson Efrain A. Cruz wrote: > If I'm not wrong, you can't avoid clone the repo. But the good thing is that > all the commands to produce the diffs will run really fast because they all > run locally. > > Anyway you can add to your script the cloning part. > > El jue., 31 de mar. de 2016 a la(s) 04:10, Sebastian Tarach > escribió: >> >> In the company I work for I was requested to write script/app that would >> retrieve all diffs in the past month for each author and put them in >> separate files. I was quite surprised when I found out I can't do that >> remotely but I have clone the repository first. Well it's not a big deal for >> our ~12 repos but it is a bit time consuming. Obviously in such case >> ls-remote was no help. We have such script for SVN and obviously do to it's >> centralized nature such this is possible. Therefore I'm wondering did I miss >> something? Maybe it actually is possible but I didn't do my research right? >> >> ~thanks >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Git for human beings" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to git-users+unsubscr...@googlegroups.com. >> For more options, visit https://groups.google.com/d/optout. > > -- > You received this message because you are subscribed to a topic in the > Google Groups "Git for human beings" group. > To unsubscribe from this topic, visit > https://groups.google.com/d/topic/git-users/a635fTLiiMg/unsubscribe. > To unsubscribe from this group and all its topics, send an email to > git-users+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups "Git for human beings" group. To unsubscribe from this group and stop receiving emails from it, send an email to git-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [git-users] Retrieve logs from remote git repo and than get diffs for the past month
If I'm not wrong, you can't avoid clone the repo. But the good thing is that all the commands to produce the diffs will run really fast because they all run locally. Anyway you can add to your script the cloning part. El jue., 31 de mar. de 2016 a la(s) 04:10, Sebastian Tarach < star...@gmail.com> escribió: > In the company I work for I was requested to write script/app that would > retrieve all diffs in the past month for each author and put them in > separate files. I was quite surprised when I found out I can't do that > remotely but I have clone the repository first. Well it's not a big deal > for our ~12 repos but it is a bit time consuming. Obviously in such case > ls-remote was no help. We have such script for SVN and obviously do to it's > centralized nature such this is possible. Therefore I'm wondering did I > miss something? Maybe it actually is possible but I didn't do my research > right? > > ~thanks > > -- > You received this message because you are subscribed to the Google Groups > "Git for human beings" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to git-users+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "Git for human beings" group. To unsubscribe from this group and stop receiving emails from it, send an email to git-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [git-users] Retrieve logs from remote git repo and than get diffs for the past month
On Thu, 31 Mar 2016 00:10:50 -0700 (PDT) Sebastian Tarach wrote: > In the company I work for I was requested to write script/app that > would retrieve all diffs in the past month for each author and put > them in separate files. I was quite surprised when I found out I > can't do that remotely but I have clone the repository first. Well > it's not a big deal for our ~12 repos but it is a bit time consuming. > Obviously in such case ls-remote was no help. We have such script for > SVN and obviously do to it's centralized nature such this is > possible. Therefore I'm wondering did I miss something? Maybe it > actually is possible but I didn't do my research right? No, it's not possible with plain Git. The reason is that different repositories "talk to each other" only to exchange their histories, and the protocol to do this is only concerned with effectively (in time and space) figuring out what bits of that history is missing in the receiving repository compared to that in the sending one, extracting it, packing and transferring. Remote queries involving history traversals are not supported by the Git wire protocol. You're correct in that the centralized nature of Subversion repositories helps: since the client's snapshot of the repository contains only a single server's revision (or even a part of it), all queries about the repository have to be answered by the server and hence must be supported by its wire protocol. With Git, each repository is local, and there is no server (what you call "the server" when talking about Git repositories is merely a convention / policy having nothing to do with Git). Basically I see two approaches to alleviate your problem: 1) Make locally available clones of the repos you have to measure and make sure they are synchronized with their "reference" sources ("origins") periodically. Then running your script against them will require only a small amount of history transferred -- to make the repos up-to-date. 2) Execute your script on the server. This might sound counter-intuitively but the so-called "bare" repos typically used to keep "shared" repos (those located on "the server") perfectly support all history traversal commands such as `git log` (and `git rev-list` which powers it), `git diff` etc. So I'd either write a simple CGI application or would make that script executable via an SSH session. The actual details depend on your exact configuration. -- You received this message because you are subscribed to the Google Groups "Git for human beings" group. To unsubscribe from this group and stop receiving emails from it, send an email to git-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[git-users] Retrieve logs from remote git repo and than get diffs for the past month
In the company I work for I was requested to write script/app that would retrieve all diffs in the past month for each author and put them in separate files. I was quite surprised when I found out I can't do that remotely but I have clone the repository first. Well it's not a big deal for our ~12 repos but it is a bit time consuming. Obviously in such case ls-remote was no help. We have such script for SVN and obviously do to it's centralized nature such this is possible. Therefore I'm wondering did I miss something? Maybe it actually is possible but I didn't do my research right? ~thanks -- You received this message because you are subscribed to the Google Groups "Git for human beings" group. To unsubscribe from this group and stop receiving emails from it, send an email to git-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.