summaryrefslogtreecommitdiff
path: root/src/other_tools/ops_maps/git_update_map.cpp
AgeCommit message (Collapse)Author
2025-02-11checkout locations: support extra environment variables to inheritKlaus Aehlig
2024-11-14other_tools/ops_maps: Implement IWYU suggestionsPaul Cristian Sarbu
Also follow-up changes to ensure build success.
2024-07-23just-mr: Use statistics and progress instances update mapPaul Cristian Sarbu
...instead of using the singletons.
2024-07-05Pass StorageConfig and Storage to just-mr mapsMaksim Denisov
2024-07-05Pass StorageConfig to git_repo and git_repo_remoteMaksim Denisov
2024-03-08just-mr: Fix shell out executionOliver Reiche
... by avoiding reusing temp dirs for execute. While we are at it, also refactor LocalFetchViaTmpRepo() to create its own empty temp dirs, that cannot be reused by the caller.
2024-02-20git repo fetch: support "inherit env"Klaus Aehlig
When fetching git repositories, just-mr routinely shells out to git. In this case, allow the user to specify via "inherit env", which environment variables from the host environment should be made available in this action. Typical variables to inherit are ones providing credentials, like SSH_AUTH_SOCK. As the repository description specifies the commit that will be taken, and hence the resulting tree, correctness is not affected by the environement leaking in here.
2023-11-02Decoupling symlinks map and CAS utilities from just-mrPaul Cristian Sarbu
This is required in order to make them available to 'just serve' in a minimal just installation.
2023-03-23just-mr: Add git binary optionPaul Cristian Sarbu
In the rare cases that we need to shell out to git, let the user configure what binary to use. Option resolves in the same way as the just executable, including allowing it to be set via just-mrrc. Updates all cases of shelling out to git (fetch and commit update). Update just-mr and just-mrrc docs accordingly.
2023-03-23just-mr: Update calls to fetch and update operations...Paul Cristian Sarbu
...to ensure the temporary directories exist before they are needed, as expected by those methods. This way, the TmpDir class takes care to also clean up after itself. Also, pass the local launcher to the methods that now shell out.
2023-03-23just-mr: Shell out to system Git for update commit from SSH remote...Paul Cristian Sarbu
...due to limitations in SSH support in libgit2. In this case, we simply execute 'git ls-remote <repo> [<branch>]' and then parse the output. Remote interogation requires no local repository, so it is an asynchronious operation by default.
2023-03-20just-mr: rework progress reporting and statisticsKlaus Aehlig
To avoid unnecessary work, just-mr uses on-disk caches, including for the mapping of a distdir to the corresponding git tree. This, however, implies that the number of repositories that are actually considered varies: in order to fetch a distdir repository, all involved archives have to be fetched, but if we have a cache hit none of them is even looked at. So, in order to have a consistent reporting only count top-level targets (i.e., the reachable repositories) in the statistics, not the archives implicitly contained in a distdir, nor low-level sub tasks. The actual fetch acitvity is shown separately by the task tracker.
2023-02-27Just-MR: Add progress reporting for update commandPaul Cristian Sarbu
Co-authored-by: Sascha Roloff <sascha.roloff@huawei.com>
2023-02-17structure cleanup: move remote operations of GitRepo to other_tools...Paul Cristian Sarbu
...in order to not include unwanted dependencies in just proper. The new class extends the GitRepo class used for just's Git tree operations and gets used in all of just-mr's async maps.
2023-01-24GitRepo: Remove refspec argument in retrieving commit from remote...Paul Cristian Sarbu
...and use instead the branch name. A valid direct refspec (as those retrieved by a remote_ls call) will always end in the branch name, so checking the last path component ('/'-delimited substring) of a retrieved refspec is enough.
2022-12-23Just-MR: Remove wrong pass-by-reference when wrapping loggersPaul Cristian Sarbu
Passing the logger by reference would require the caller to be kept alive. Also, being a shared_ptr, the logger can be passed by value at almost no cost.
2022-12-21Just-MR: Add git commit update mapPaul Cristian Sarbu