{"id":21423854,"url":"https://github.com/ossystems/gitdm","last_synced_at":"2025-03-16T20:41:05.049Z","repository":{"id":8267136,"uuid":"9719381","full_name":"OSSystems/gitdm","owner":"OSSystems","description":"Fork from git://git.lwn.net/gitdm.git for to collect information about projects O.S. Systems participate","archived":false,"fork":false,"pushed_at":"2022-09-28T23:24:09.000Z","size":187,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":12,"default_branch":"master","last_synced_at":"2025-01-23T07:12:57.638Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/OSSystems.png","metadata":{"files":{"readme":"README","changelog":"changelogs","contributing":null,"funding":null,"license":"COPYING","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-04-27T18:42:41.000Z","updated_at":"2024-11-08T11:01:11.000Z","dependencies_parsed_at":"2023-01-11T17:21:00.005Z","dependency_job_id":null,"html_url":"https://github.com/OSSystems/gitdm","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OSSystems%2Fgitdm","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OSSystems%2Fgitdm/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OSSystems%2Fgitdm/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OSSystems%2Fgitdm/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/OSSystems","download_url":"https://codeload.github.com/OSSystems/gitdm/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243933373,"owners_count":20370988,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-22T21:18:30.443Z","updated_at":"2025-03-16T20:41:05.016Z","avatar_url":"https://github.com/OSSystems.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"The code in this directory makes up the \"git data miner,\" a simple hack\nwhich attempts to figure things out from the revision history in a git\nrepository. \n\n\nINSTALLING GITDM\n\ngitdm is a python script and doesn't need to be properly installed like other\nnormal programs. You just have to adjust your PATH variable, pointing it to\nthe directory of gitdm or alternatively create a symbolic link of the script\ninside /usr/bin.\n\nBefore actually runnning gitdm you may want also to update the configuration\nfile (gitdm.config) with the needed information.\n\n\nRUNNING GITDM\n\nRun it like this:\n\n   git log -p -M [details] | gitdm [options]\n\nAlternatively, you can run with:\n\n   git log --numstat -M [details] | gitdm -n [options]\n\nThe [details] tell git which changesets are of interest; the [options] can\nbe:\n\n\t-a\tIf a patch contains signoff lines from both Andrew Morton \n\t\tand Linus Torvalds, omit Linus's.\n\n\t-b dir\tSpecify the base directory to fetch the configuration files.\n\n\t-c file Specify the name of the gitdm configuration file.  \n\t   \tBy default, \"./gitdm.config\" is used.\n\n\t-d\tOmit the developer reports, giving employer information\n         \tonly.\n\n\t-D\tRather than create the usual statistics, create a file (datelc.csv)\n\t\tproviding lines changed per day, where the first column displays\n\t\tthe changes happened only on that day and the second sums the day\n\t\tit happnened with the previous ones. This option is suitable for\n\t\tfeeding to a tool like gnuplot.\n\n\t-h file\tGenerate HTML output to the given file\n\n\t-H file\tExport individual developer raw data as CSV. These data could be\n\t\tused to evaluate the fidelity of developers.\n\n\t-l num\tOnly list the top \u003cnum\u003e entries in each report.\n\n\t-n\tUse --numstat instead of generated patches to get the statistics.\n\n\t-o file\tWrite text output to the given file (default is stdout).\n\n\t-p prefix Dump out the database categorized by changeset and by file type.\n\t\tIt requires -n, otherwise it is not possible to get separated results.\n\n\t-r pat\tOnly generate statistics for changes to files whose \n\t\tname matches the given regular expression.\n\n\t-s\tIgnore Signed-off-by lines which match the author of \n\t\teach patch.\n\n\t-t\tGenerate a report by type of contribution (code, documentation, etc.).\n\t\tIt requires -n, otherwise this option is ignored silently.\n\n\t-u \tGroup all unknown developers under the \"(Unknown)\"\n\t\temployer.\n\n\t-x file\tExport raw statistics as CSV.\n\n\t-w\tAggregate the data by weeks instead of months in the\n\t\tCSV file when -x is used.\n\n\t-z \tDump out the hacker database to \"database.dump\".\n\nA typical command line used to generate the \"who wrote 2.6.x\" LWN articles\nlooks like:\n\n    git log -p -M v2.6.19..v2.6.20 | \\\n\tgitdm -u -s -a -o results -h results.html\n\nor:\n\n    git log --numstat -M v2.6.19..v2.6.20 | \\\n\tgitdm -u -s -a -n -o results -h results.html\n\nCONFIGURATION FILE\n\nThe main purpose of the configuration file is to direct the mapping of\nemail addresses onto employers.  Please note that the config file parser is\nexceptionally stupid and unrobust at this point, but it gets the job done.  \n\nBlank lines and lines beginning with \"#\" are ignored.  Everything else\nspecifies a file with some sort of mapping:\n\nEmailAliases file\n\n\tDevelopers often post code under a number of different email\n\taddresses, but it can be desirable to group them all together in\n\tthe statistics.  An EmailAliases file just contains a bunch of\n\tlines of the form:\n\n\t\talias@address  canonical@address\n\n\tAny patches originating from alias@address will be treated as if\n\tthey had come from canonical@address.\n\n    It may happen that some people set their git user data in the\n    following form: \"joe.hacker@acme.org \u003cJoe Hacker\u003e\". The \n    \"Joe Hacker\" is then considered as the email... but gitdm says\n    it is a \"Funky\" email. An alias line in the following form can\n    be used to alias these commits aliased to the correct email\n    address:\n\n        \"Joe Hacker\" joe.hacker@acme.org\n\n\nEmailMap file\n\n\tMap email addresses onto employers.  These files contain lines\n\tlike:\n\n\t\t[user@]domain  employer  [\u003c yyyy-mm-dd]\n\n\tIf the \"user@\" portion is missing, all email from the given domain\n\twill be treated as being associated with the given employer.  If a\n\tdate is provided, the entry is only valid up to that date;\n\totherwise it is considered valid into the indefinite future.  This\n\tfeature can be useful for properly tracking developers' work when\n\tthey change employers but do not change email addresses.\n\n\nGroupMap file employer\n\n\tThis is a variant of EmailMap provided for convenience; it contains\n\temail addresses only, all of which are associated with the given\n\temployer.\n\nVirtualEmployer name\n    nn% employer1\n    ...\nend\n\n\tThis construct (which appears in the main configuration file)\n    \tallows causes the creation of a fake employer with the given\n    \t\"name\".  It directs that any contributions attributed to that\n    \temployer should be split to other (real) employers using the given\n    \tpercentages.  The functionality works, but is primitive - there is,\n\tfor example, no check to ensure that the percentages add up to\n    \tsomething rational.\n\nFileTypeMap file\n\n\tMap file names/extensions onto file types.  These files contain lines\n\tlike:\n\n\t\torder \u003ctype1\u003e,\u003ctype2\u003e,...,\u003ctypeN\u003e\n\n\t\tfiletype \u003ctype\u003e \u003cregex\u003e\n\t\t...\n\n\tThis construct allows fine graned reports by type of contribution\n\t(build, code, image, multimedia, documentation, etc.)\n\n\tOrder is important because it is possible to have overlapping between\n\tfilenames.  For instance, ltmain.sh fits better as 'build' instead of\n\t'code' (the filename instead of '\\.sh$').  The first element in order\n\thas precedence over the next ones.\n\n\nOTHER TOOLS\n\nA few other tools have been added to this repository:\n\n  treeplot\n\tReads a set of commits, then generates a graphviz file charting the\n\tflow of patches into the mainline.  Needs to be smarter, but, then,\n\tso does everything else in this directory.\n\n  findoldfiles\n\tSimple brute-force crawler which outputs the names of any files\n\twhich have not been touched since the original (kernel) commit.\n\n  committags\n\tI needed to be able to quickly associate a given commit with the\n\tmajor release which contains it.  First attempt used \n\t\"git tags --contains=\"; after it ran for a solid week, I concluded\n\tthere must be a better way.  This tool just reads through the repo,\n\tremembering tags, and creating a Python dictionary containing the\n\tassociation.  The result is an ugly 10mb pickle file, but, even so,\n\tit's still a better way.\n\n  linetags\n\tCrawls through a directory hierarchy, counting how many lines of\n\tcode are associated with each major release.  Needs the pickle file\n\tfrom committags to get the job done.\n\n\nNOTES AND CREDITS\n\nGitdm was written by Jonathan Corbet; many useful contributions have come\nfrom Greg Kroah-Hartman.\n\nPlease note that this tool is provided in the hope that it will be useful,\nbut it is not put forward as an example of excellence in design or\nimplementation.  Hacking on gitdm tends to stop the moment it performs\nwhatever task is required of it at the moment.  Patches to make it less\nhacky, less ugly, and more robust are welcome.\n\nJonathan Corbet\ncorbet@lwn.net\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fossystems%2Fgitdm","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fossystems%2Fgitdm","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fossystems%2Fgitdm/lists"}