{"id":23219632,"url":"https://github.com/barcek/glep","last_synced_at":"2026-05-04T05:39:48.237Z","repository":{"id":157419471,"uuid":"625884827","full_name":"barcek/glep","owner":"barcek","description":"grep across repos | cross-repository inspection | command-line tool | AWK (Gawk)","archived":false,"fork":false,"pushed_at":"2025-01-09T21:24:47.000Z","size":61,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-05T15:12:01.149Z","etag":null,"topics":["awk","command-line-tool","dx","gawk","git","shell"],"latest_commit_sha":null,"homepage":"","language":"Awk","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/barcek.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-04-10T10:18:14.000Z","updated_at":"2025-01-11T10:54:49.000Z","dependencies_parsed_at":"2024-12-18T21:36:16.606Z","dependency_job_id":"e2fb7263-3c01-4e3b-83c9-89d99404015a","html_url":"https://github.com/barcek/glep","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/barcek/glep","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/barcek%2Fglep","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/barcek%2Fglep/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/barcek%2Fglep/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/barcek%2Fglep/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/barcek","download_url":"https://codeload.github.com/barcek/glep/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/barcek%2Fglep/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32596533,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-03T22:12:39.696Z","status":"online","status_checked_at":"2026-05-04T02:00:06.625Z","response_time":58,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["awk","command-line-tool","dx","gawk","git","shell"],"created_at":"2024-12-18T21:36:11.306Z","updated_at":"2026-05-04T05:39:48.209Z","avatar_url":"https://github.com/barcek.png","language":"Awk","funding_links":[],"categories":[],"sub_categories":[],"readme":"# glep\n\nGrep across multiple git repositories.\n\nReturns matching commit log entries or diff lines, or a specific full diff, for all git repositories in the parent directory. Includes a preview option for the key shell commands generated and a self-test.\n\n## Why?\n\nFor insight and consistency across projects more quickly and simply.\n\n## How?\n\nThe `glep` command takes one or more arguments, the search terms:\n\n```\nglep \u003csearch_term\u003e[ ...]\n```\n\nThe default root directory is the parent - `../` - which is set close to the top of the source file. The terms are sought for the root directory, if a git repo, and for each top-level git repo in the root.\n\nThe search is performed by default in the output of `git log` using `--branches=*`, `--oneline` and `--format=\"%S | %as %an | %h %s\"`, with the matching log entries printed preceded by the path to the given git repo.\n\nThe git repositories to be included can be listed with the `=list` or `=l` flag (see [Options](#options) below).\n\n### Overriding the root\n\nOne term may be an alternative root directory, preceded by the two characters '=/':\n\n```\nglep =/\u003cpath_to_root\u003e[ ...]\n```\n\n### Setting output format\n\nOne term may also be an alternative format string, preceded by the two characters '=%':\n\n```\nglep =%\u003cformat_string\u003e[ ...]\n```\n\nThis will be passed to `git log` with the `--format` flag to set the structure of each line of output.\n\n### Filtering by author\n\nOne term may also be all or part of the commit author name, preceded by the two characters '=@':\n\n```\nglep =@\u003cauthor_name\u003e[ ...]\n```\n\nThis will be passed to `git log` with the `--author` flag to filter the results.\n\n### Displaying a diff\n\nOne term may instead be a seven-character hexadecimal commit object name, preceded by the two characters '=#':\n\n```\nglep =#\u003cobject_name\u003e[ ...]\n```\n\nIf this is the sole search term provided, the entire diff for that commit is shown, per `git show`. With additional search terms, only the matching lines of the diff are printed.\n\n### Prefixes\n\n- `=/` - an alternative root directory ('../' by default); secondary prefix `=\u003e` also available\n- `=%` - an alternative format string ('%S | %as %an | %h %s' by default)\n- `=@` - the commit author\n- `=#` - a seven-character hexadecimal commit object name\n\n## Source\n\nThe script invokes itself and is assumed in doing so to have been made both executable, via a command like `chmod +x glep`, and available from any directory, e.g. by placing it in the '/bin' or '/usr/bin' directory.\n\nThe hashbang at the top of the file assumes the presence of Gawk in '/usr/bin', the source code that Gawk, several other utils and Git itself are installed and can be invoked directly, e.g. Git with `git`. A list can be found close to the top of the file, as well as in the help text.\n\n### Defaults\n\nThe following sets of core default values are defined in the `defaults_set` function close to the base of the source file:\n\n- `settings`, for the root directory and format string for output, and at runtime user-provided values\n- `variants`, for the specially formatted search terms (`t`) and option flags (`f`)\n\n### Making changes\n\nRunning the self-test after making changes plus extending or adding test cases to cover new behaviour is recommended. The self-test is run with the `=test` or `=T` flag (see [Options](#options) below). The test cases are set in the `test_perform` function at the base of the file.\n\n## Options\n\nThe following can be passed to `glep` as if a search term:\n\n- `=regexp-extended` / `=e`, to use extended regular expressions in search terms\n- `=preview` / `=p`, to show the command for the root directory then exit\n- `=list` / `=l`, to list the git repositories included, not searching\n- `=version` / `=v`, to show name and version number then exit\n- `=help` / `=h`, to show help text, incl. terms and flags, then exit\n- `=test` / `=T`, to perform the self-test then exit\n\nNote for all flags the use of the leading character `=`. Flags using the more common `-`/`--` are interpreted as options for Gawk itself.\n\n## Development plan\n\nThe following are the expected next steps in the development of the code base. The general medium-term aim is a more configurable, portable and robust implementation. Pull requests are welcome for these and other potential improvements.\n\n- add a +/- number and pre-/post-date term for commit range\n- revise help text generation for listing order and width\n- add automatic dependency checking with notification\n- extend argument handling for short flag clustering\n- allow for an alternative executable name\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbarcek%2Fglep","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbarcek%2Fglep","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbarcek%2Fglep/lists"}