https://github.com/esrlabs/josh Skip to content Sign up * Why GitHub? Features - + Mobile - + Actions - + Codespaces - + Packages - + Security - + Code review - + Issues - + Integrations - + GitHub Sponsors - + Customer stories- * Team * Enterprise * Explore + Explore GitHub - Learn and contribute + Topics - + Collections - + Trending - + Learning Lab - + Open source guides - Connect with others + The ReadME Project - + Events - + Community forum - + GitHub Education - + GitHub Stars program - * Marketplace * Pricing Plans - + Compare plans - + Contact Sales - + Education - [ ] [search-key] * # In this repository All GitHub | Jump to | * No suggested jump to results * # In this repository All GitHub | Jump to | * # In this organization All GitHub | Jump to | * # In this repository All GitHub | Jump to | Sign in Sign up {{ message }} esrlabs / josh * Notifications * Star 426 * Fork 13 Just One Single History esrlabs.github.io/josh/ MIT License 426 stars 13 forks Star Notifications * Code * Issues 8 * Pull requests 0 * Discussions * Actions * Security * Insights More * Code * Issues * Pull requests * Discussions * Actions * Security * Insights master Switch branches/tags [ ] Branches Tags Could not load branches Nothing to show {{ refName }} default View all branches Could not load tags Nothing to show {{ refName }} default View all tags 6 branches 8 tags Code Clone HTTPS GitHub CLI [https://github.com/e] Use Git or checkout with SVN using the web URL. [gh repo clone esrlab] Work fast with our official CLI. Learn more. * Open with GitHub Desktop * Download ZIP Launching GitHub Desktop If nothing happens, download GitHub Desktop and try again. Go back Launching GitHub Desktop If nothing happens, download GitHub Desktop and try again. Go back Launching Xcode If nothing happens, download Xcode and try again. Go back Launching Visual Studio Code Your codespace will open once ready. There was a problem preparing your codespace, please try again. Latest commit @dhermes @LMG dhermes and LMG Typo: fever -> fewer ... c6f4349 Jul 15, 2021 Typo: fever -> fewer c6f4349 Git stats * 976 commits Files Permalink Failed to load latest commit information. Type Name Latest commit message Commit time .github Fix rust cache May 4, 2021 docs Update doc: pushing from second workspace May 23, 2021 josh-proxy Update dependencies Jul 11, 2021 josh-ui Update dependencies May 21, 2021 scripts Update Makefile for vim integration Apr 30, 2021 src Support passing parameters to graphql queries Jul 2, 2021 tests Support passing parameters to graphql queries Jul 2, 2021 .dockerignore Add gerrit polling mode Jul 22, 2020 .gitattributes Update .gitattributes Mar 15, 2021 .gitignore Add .idea to gitignore Apr 21, 2021 Cargo.lock Bump env_logger from 0.8.4 to 0.9.0 Jul 15, 2021 Cargo.toml Bump handlebars from 4.0.1 to 4.1.0 Jul 5, 2021 Dockerfile Cleanup Dockerfile Apr 30, 2021 LICENSE adde license file' Jul 7, 2016 Makefile Update Makefile for vim integration Apr 30, 2021 README.md Typo: fever -> fewer Jul 15, 2021 banner.png Banner Apr 6, 2021 run-josh.sh Set user in config Mar 29, 2021 run-tests.sh Update build workflow to include all targets and tests Apr 21, 2021 rustfmt.toml Reformat with 100 columns Mar 17, 2021 View code Use cases Partial cloning Project composition / Workspaces Simplified CI/CD GraphQL API Caching proxy README.md Just One Single History Build Status Combine the advantages of a monorepo with those of multirepo setups by leveraging a blazingly-fast, incremental, and reversible implementation of git history filtering. josh-proxy can be integrated with any http based git host: $ docker run -p 8000:8000 -e JOSH_REMOTE=https://github.com -v josh-vol:/data/git esrlabs/josh-proxy:latest Use cases Partial cloning Reduce scope and size of clones by treating subdirectories of the monorepo as individual repositories. $ git clone http://josh/monorepo.git:/path/to/library.git The partial repo will act as a normal git repository but only contain the files found in the subdirectory and only commits affecting those files. The partial repo supports both fetch as well as push operation. This helps not just to improve performance on the client due to having fewer files in the tree, it also enables collaboration on parts of the monorepo with other parties utilizing git's normal distributed development features. For example, this makes it easy to mirror just selected parts of your repo to public github repositories or specific customers. Project composition / Workspaces Simplify code sharing and dependency management. Beyond just subdirectories, Josh supports filtering, re-mapping and composition of arbitrary virtual repositories from the content found in the monorepo. The mapping itself is also stored in the repository and therefore versioned alongside the code. Central monorepo Project workspace.josh file workspaces dependencies = :/modules:[ Folders and files ::tools/ Folders and in project1.git ::library1/ files in ] central.git Folders and files libs/library1 = :/modules/library1 in project2.git Workspaces act as normal git repos: $ git clone http://josh/central.git:workspace=workspaces/project1.git Simplified CI/CD With everything stored in one repo, CI/CD systems only need to look into one source for each particular deliverable. However in traditional monorepo environments dependency mangement is handled by the build system. Build systems are usually taylored to specific languages and need their input already checked out on the filesystem. So the question: "What deliverables are affected by a given commit and need to be rebuild?" cannot be answered without cloning the entire repository and understanding how the languages used handle dependencies. In particular when using C familiy languages, hidden dependencies on header files are easy to miss. For this reason limiting the visibility of files to the compiler by sandboxing is pretty much a requirement for reproducible builds. With Josh, each deliverable gets it's own virtual git repository with dependencies declared in the workspace.josh file. This means answering the above question becomes as simple as comparing commit ids. Furthermore due to the tree filtering each build is guaranteed to be perfectly sandboxed and only sees those parts of the monorepo that have actually been mapped. This also means the deliverables to be re-build can be determined without cloning any repos like typically necessary with normal build tools. GraphQL API It is often desireable to access content stored in git without requiring a clone of the repository. This is usefull for CI/CD systems or web frontends such as dashboards. Josh exposes a GraphQL API for that purpose. For example, it can be used to find all workspaces currently present in the tree: query { rev(at:"refs/heads/master", filter:"::**/workspace.josh") { files { path } } } Caching proxy Even without using the more advanced features like partial cloning or workspaces, josh-proxy can act as a cache to reduce traffic between locations or keep your CI from performing many requests to the main git host. About Just One Single History esrlabs.github.io/josh/ Topics git workflow monorepo scm Resources Readme License MIT License Releases 8 r21.05.05: Add Working with workspaces doc Latest May 5, 2021 + 7 releases Packages 0 No packages published Contributors 11 * @christian-schilling * @LMG * @dependabot-preview * @dependabot * @marcmo * @phimuemue * @Nicoretti * @arthurbragaa * @robw-23 * @dhermes * @tazjin Languages * Rust 90.3% * CSS 6.5% * Python 1.5% * Shell 0.9% * JavaScript 0.3% * Dockerfile 0.2% * Other 0.3% * (c) 2021 GitHub, Inc. * Terms * Privacy * Security * Status * Docs * Contact GitHub * Pricing * API * Training * Blog * About You can't perform that action at this time. You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.