summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* sync: fix manifest sync-j handlingMike Frysinger2022-12-082-29/+89
| | | | | | | | | | | | | Since --jobs defaults to 0, not None, we never pull the value out of the manifest. Treat values of 0 and None the same to fix. Bug: http://b/239712300 Bug: http://b/260908907 Change-Id: I9b1026682072366616825fd72f90bd90c10a252f Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/354254 Tested-by: Mike Frysinger <vapier@google.com> Reviewed-by: Josip Sokcevic <sokcevic@google.com> Reviewed-by: Sam Saccone <samccone@google.com>
* sync: Fix undefined variable in _FetchOneKarsten Tausche2022-12-081-2/+3
| | | | | | | | | | | | | | | | If syncing in _FetchOne fails with GitError, sync_result does not get set. There's already a separate local variable for success; do the same for remote_fetched instead of referring to the conditionally defined named tuple. This bug is originally caused by a combination of ad8aa697 "sync: only print error.GitError, don't raise that exception." and 1eddca84 "sync: use namedtuples for internal return values". Change-Id: I0f9dbafb97f8268044e5a56a6f92cf29bc23ca6a Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/354176 Tested-by: Karsten Tausche <karsten@fairphone.com> Reviewed-by: LaMont Jones <lamontjones@google.com>
* sync: finish marking REPO_AUTO_GC=1 as deprecated.LaMont Jones2022-12-051-5/+3
| | | | | | | | | | The wrong revision of the change was submitted as d793553804c76677444709ebefd70f6e01c29525. Change-Id: I6f3e4993cf40c30ccf0d69020177db8fe5f76b8c Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/353934 Tested-by: LaMont Jones <lamontjones@google.com> Reviewed-by: Sam Saccone <samccone@google.com>
* test_manifest_config_properties: use assertEqualDaniel Kutik2022-12-051-4/+4
| | | | | | | | | | | The method assertEquals is an deprecated alias for assertEqual. See: https://docs.python.org/3/library/unittest.html#deprecated-aliases Change-Id: Id94ba6d6055bdc18b87c53e8729902bb278855aa Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/354035 Reviewed-by: Mike Frysinger <vapier@google.com> Tested-by: Daniel Kutik <daniel.kutik@lavawerk.com>
* sync: cleanup output when not doing GCLaMont Jones2022-12-021-13/+14
| | | | | | | | | | | | | Do not use a progress bar when not doing GC, and restrict activity in that case to only repairing preciousObject state. This also includes additional cleanup based on review comments from previous changes. Change-Id: I48581c9d25da358bc7ae15f40e98d55bec142331 Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/353514 Tested-by: LaMont Jones <lamontjones@google.com> Reviewed-by: Mike Frysinger <vapier@google.com>
* Revert "sync: save any cruft after calling git gc."LaMont Jones2022-12-021-45/+4
| | | | | | | | | | | | This bug-cacher related code is no longer needed. This reverts commit 891e8f72ce3551a19c377456574bbfbeac5c8b8e. Change-Id: Ia94a2690ff149427fdcafacd39f5008cd60827d5 Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/353774 Reviewed-by: Mike Frysinger <vapier@google.com> Reviewed-by: Sam Saccone <samccone@google.com> Tested-by: LaMont Jones <lamontjones@google.com>
* sync: mark REPO_AUTO_GC=1 as deprecated.LaMont Jones2022-12-021-1/+5
| | | | | | | | | | | | | REPO_AUTO_GC was introduced as a way for users to restore the previous default behavior, since the default changed at the same time as the option was added. As such, it should be marked as deprecated, and removed entirely in a future release. Change-Id: Ib73d98fbea693e7057cc4587928c225a9e4beab2 Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/353734 Reviewed-by: Sam Saccone <samccone@google.com> Tested-by: LaMont Jones <lamontjones@google.com> Reviewed-by: Mike Frysinger <vapier@google.com>
* Fix ManifestProject.partial_clone_exclude property.Joanna Wang2022-12-023-5/+90
| | | | | | | | | | Bug: b/256358360 Change-Id: Ic6e3a049aa38827123d0324c8b14157562c5986e Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/353574 Reviewed-by: Mike Frysinger <vapier@google.com> Tested-by: Joanna Wang <jojwang@google.com> Reviewed-by: Josip Sokcevic <sokcevic@google.com>
* release-process: update to use ./release/sign-tag.pyMike Frysinger2022-12-011-17/+10
| | | | | | | | | | We have a helper script for signing releases now, so point the docs to that rather than the multiple manual steps. Change-Id: I309e883dbce1894650e31682d9975cf0d6bdeca3 Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/352834 Tested-by: Mike Frysinger <vapier@google.com> Reviewed-by: Josip Sokcevic <sokcevic@google.com>
* wrapper.py: Replacing load_module() with exec_module()Daniel Kutik2022-11-281-7/+7
| | | | | | | | | | | | Fixed "DeprecationWarning: the load_module() method is deprecated and slated for removal in Python 3.12; use exec_module() instead." in wrapper.py. Additionally removed Python 2 code (imp.load_source()). Test: tox Signed-off-by: Daniel Kutik <daniel.kutik@lavawerk.com> Change-Id: Ib7cc19b1c545f6449e034c4b01b582cf6cf4b581 Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/353237 Reviewed-by: Mike Frysinger <vapier@google.com>
* Fixed wrapper related warnings in testsDaniel Kutik2022-11-282-8/+9
| | | | | | | | | | | Multiple "Could not find reference" warnings in test_wrapper.py and test_git_command.py resolved. Test: tox Signed-off-by: Daniel Kutik <daniel.kutik@lavawerk.com> Change-Id: Ic254c378bbdae6bc3f8f29682ababb37db76adfe Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/353235 Reviewed-by: Mike Frysinger <vapier@google.com>
* test_capture: allow both Unix and Windows line sepDaniel Kutik2022-11-281-1/+3
| | | | | | | | | | | On Linux/macOS we allow \n in the end of the line. On Windows we allow both \r\n and \n. Here we also allow Unix line seperators as tests might be excuted in for example git-shell. Change-Id: I3975b563cf95407da92e5479980e670eb748b30e Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/353181 Tested-by: Daniel Kutik <daniel.kutik@lavawerk.com> Reviewed-by: Mike Frysinger <vapier@google.com>
* test_bad_path_name_checks: allow Windows path sepDaniel Kutik2022-11-281-1/+1
| | | | | | | | | | With this change if a path ends with '/' on Linux/macOS and ends with either '/' or '\' on Windows, the test will pass. Signed-off-by: Daniel Kutik <daniel.kutik@lavawerk.com> Change-Id: Id7d1b134f9c0bdf7ceaf149af304bbf90cbd7b21 Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/353180 Reviewed-by: Mike Frysinger <vapier@google.com>
* test: Fix char encoding issues on windowsDaniel Kutik2022-11-271-2/+2
| | | | | | | | | | | Some tests were failing due to Windows not using utf-8 by default when executing the tests. Enforcing usage of utf-8 resolves these issues. Signed-off-by: Daniel Kutik <daniel.kutik@lavawerk.com> Change-Id: If42f6be2a2b688a6105ecf4fcdb541aade24519a Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/353179 Reviewed-by: Mike Frysinger <vapier@google.com>
* test: fix path seperator errors on windowsDaniel Kutik2022-11-273-20/+20
| | | | | | | | | | Fixing multiple errors when running tests on Windows related to path seperator being different ('\' instead of '/'). Signed-off-by: Daniel Kutik <daniel.kutik@lavawerk.com> Change-Id: I26b44d092b925edecab46a4d88e77dd9dcb8df28 Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/353178 Reviewed-by: Mike Frysinger <vapier@google.com>
* tox: Allow passing positional argumentsDaniel Kutik2022-11-271-1/+1
| | | | | | | | | | | | Allows us to pass on arguments to run_tests and pytest after -- when executing tox. E.g.: To run all tests verbose in a test class: tox -- -v tests/test_project.py::ReviewableBranchTests Signed-off-by: Daniel Kutik <daniel.kutik@lavawerk.com> Change-Id: Ibd78856c6d4053c769f3d0b6130ebc8145275f78 Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/353176 Reviewed-by: Mike Frysinger <vapier@google.com>
* trace: make test timeout after 2minDaniel Kutik2022-11-261-1/+1
| | | | | | | | | | Before this commit, the test was hanging forever when run on a Windows host. This should resolve that issue. Signed-off-by: Daniel Kutik <daniel.kutik@lavawerk.com> Change-Id: Id9ea6d54926b797db3d2978a2ae2930088201eec Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/353125 Reviewed-by: Mike Frysinger <vapier@google.com>
* tox: Make all tests timeout after 5minDaniel Kutik2022-11-261-1/+6
| | | | | | | | | | | Use pytest-timeout to make sure tests don't get stuck for more than 5 minutes. In future individual tests can exceed this timeout by being decorated with @pytest.mark.timeout(600). Signed-off-by: Daniel Kutik <daniel.kutik@lavawerk.com> Change-Id: I8f5b61a20230c22a86fd5636297c78f41369449a Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/353124 Reviewed-by: Mike Frysinger <vapier@google.com>
* Update GH Action test-ci.yml dependenciesDaniel Kutik2022-11-261-3/+3
| | | | | | | | | | | Updating version of checkout and setup-python actions. Also making sure we install tox, tox-gh-actions into our venv. Changes based on tox-gh-actions README. Signed-off-by: Daniel Kutik <daniel.kutik@lavawerk.com> Change-Id: I18946a8b41d5a3c350deee3ddbde77b4c0b3bdfe Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/353123 Reviewed-by: Mike Frysinger <vapier@google.com>
* tox: enable python 3.10 testingDaniel Kutik2022-11-252-2/+3
| | | | | | | | | | | | Note that in YAML, Python version 3.10 would be parsed as 3.1, hence I put all the Python versions in quotes. More on this: https://github.com/actions/setup-python/issues/160 Signed-off-by: Daniel Kutik <daniel.kutik@lavawerk.com> Change-Id: Iba380a6a6a6de8486486c8981e712c7bf4dfe759 Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/353019 Reviewed-by: Mike Frysinger <vapier@google.com>
* Resolved DeprecationWarning for currentThread()Daniel Kutik2022-11-251-1/+1
| | | | | | | | | | | | | In Python 3.10 onwards we see a DeprecationWarning: currentThread() is deprecated, use current_thread() instead. Same goes for getName(), replaced by name attribute. Test: tox (python 3.6 - 3.10) Signed-off-by: Daniel Kutik <daniel.kutik@lavawerk.com> Change-Id: I80ec819752a5276cff3b2dadba0ec10cc92d09a4 Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/353018 Reviewed-by: Mike Frysinger <vapier@google.com>
* Set repo version to 2.30 (current)Josip Sokcevic2022-11-231-1/+1
| | | | | | | Change-Id: Ie01ea8475b978f950471b0a52fc576e59060c6c5 Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/352694 Reviewed-by: Jonathan Nieder <jrn@google.com> Tested-by: Josip Sokcevic <sokcevic@google.com>
* Extract env building into a testable helper.v2.30Sam Saccone2022-11-162-29/+89
| | | | | | | | | | | | | Previously env dict building was untested and mixed with other mutative actions. Extract the dict building into a dedicated function and author tests to ensure the functionality is working as expected. BUG: b/255376186 BUG: https://crbug.com/gerrit/16247 Change-Id: I0c88e53eb285c5c3fb27f8e6b3a903aedb8e02a8 Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/351874 Reviewed-by: LaMont Jones <lamontjones@google.com> Tested-by: Sam Saccone <samccone@google.com>
* Do not set ALT object dirs when said path resolves to the same dir.Sam Saccone2022-11-161-2/+4
| | | | | | | | | | | Due to symlink resolution git was treating this as two different directories even if the paths were the same. This mitigates the git core bug inside of repo (while the git core fix is being worked on). Bug: b/255376186 Bug: https://crbug.com/gerrit/16247 Change-Id: I12458ee04c307be916851dddd36231997bc8839e Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/351836 Tested-by: Sam Saccone <samccone@google.com> Reviewed-by: LaMont Jones <lamontjones@google.com>
* tests: Fix update-manpages test.LaMont Jones2022-11-161-1/+1
| | | | | | | Change-Id: I58d85e06edeb9208a782957acc982e996c026ed2 Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/351854 Reviewed-by: Sam Saccone <samccone@google.com> Tested-by: LaMont Jones <lamontjones@google.com>
* subcmds: display correct path multitree messagesLaMont Jones2022-11-153-17/+21
| | | | | | | | | Correct usage of project.relpath for multi manifest workspaces. Change-Id: Idc32873552fcdae6eec7b03dde2b2f31134b72fd Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/347534 Reviewed-by: Xin Li <delphij@google.com> Tested-by: LaMont Jones <lamontjones@google.com>
* update-manpages: explicitly strip color codesLaMont Jones2022-11-143-7/+49
| | | | | | | | | | | | On some systems, help2man produces color codes in the output. Remove them to avoid manpage churn. Also begin adding unit tests. Change-Id: I3f0204b19d9cae524d3cb5fcfb61ee309b0931fc Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/349655 Tested-by: LaMont Jones <lamontjones@google.com> Reviewed-by: Xin Li <delphij@google.com>
* repo_trace: drop notification of trace file name.LaMont Jones2022-11-141-6/+15
| | | | | | | | | | The trace file is local to the workspace. We shouldn't tell the user that on every command that they run. Change-Id: I8674ab485bd5142814a043a225bf8aaca7795752 Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/351234 Tested-by: LaMont Jones <lamontjones@google.com> Reviewed-by: Xin Li <delphij@google.com>
* repo_trace: adjust formatting, update man page.LaMont Jones2022-11-142-36/+36
| | | | | | | | | No behavior change in this CL. Change-Id: Iab1eb01864ea8a5aec3a683200764d20786b42de Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/351474 Tested-by: LaMont Jones <lamontjones@google.com> Reviewed-by: Xin Li <delphij@google.com>
* upload: track projects by path, rather than nameLaMont Jones2022-11-141-5/+7
| | | | | | | | | | | | Since the same project can be checked out in multiple paths, we need to track the "to be uploaded" projects by path, rather than project name. Bug: crbug.com/gerrit/16260 Test: manual Change-Id: Ic3dc81bb8acb34886baa6299e90a49c7ba372957 Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/351054 Reviewed-by: Xin Li <delphij@google.com> Tested-by: LaMont Jones <lamontjones@google.com>
* trace: restore Progress indicator.v2.29.9LaMont Jones2022-11-102-11/+6
| | | | | | | | | | | If we are not tracing to stderr, then we should still have progress indication. Change-Id: Ifc9678e1fccbd92251e972fcf25aad6369d60e15 Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/351195 Reviewed-by: Sam Saccone <samccone@google.com> Tested-by: LaMont Jones <lamontjones@google.com> Reviewed-by: Xin Li <delphij@google.com>
* sync: REPO_AUTO_GC=1 to restore old behavior.LaMont Jones2022-11-101-2/+10
| | | | | | | | | | Add an environment variable to restore previous behavior, since the older version of repo does not support `--auto-gc`. Change-Id: I874dfb8fc3533a97b8adfd52125eb3d1d75e2f3c Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/351194 Reviewed-by: Sam Saccone <samccone@google.com> Tested-by: LaMont Jones <lamontjones@google.com>
* Fix TRACE_FILE renaming.v2.29.8Joanna Wang2022-11-093-13/+14
| | | | | | | | | Bug: b/258073923 Change-Id: I997961056388e1550711f73a6310788b5c7ad4d4 Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/350934 Tested-by: Joanna Wang <jojwang@google.com> Reviewed-by: LaMont Jones <lamontjones@google.com>
* sync: no garbage collection by defaultLaMont Jones2022-11-084-4/+43
| | | | | | | | | | | Adds --auto-gc and --no-auto-gc (default) options to control sync's behavior around calling `git gc`. Bug: b/184882274 Change-Id: I4d6ca3b233d79566f27e876ab2d79f238ebc12a9 Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/344535 Reviewed-by: Xin Li <delphij@google.com> Tested-by: LaMont Jones <lamontjones@google.com>
* Improve always-on-traceLaMont Jones2022-11-082-10/+17
| | | | | | | | | | | | Notes to the user need to go to stderr, and tracing should not be on for fast exiting invocations (such as --help). This makes it so that release/update-manpages works. Change-Id: Ib183193c868a78c295a184c01c4532cd53d512eb Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/350794 Tested-by: LaMont Jones <lamontjones@google.com> Reviewed-by: Xin Li <delphij@google.com>
* Merge branch stable into main (--strategy=ours).LaMont Jones2022-11-080-0/+0
|\ | | | | | | | | | | | | | | | | This will allow the next repo release to be a fast-forward on stable. * origin/stable: v2.29.7: Revert back to v2.29.5 Change-Id: I3e52f76766807c58f56d3e246fa142ed55ede59b
| * v2.29.7: Revert back to v2.29.5v2.29.7LaMont Jones2022-11-0815-379/+149
|/ | | | | | | This change reverts stable to v2.29.5, to fix clients that received v2.29.6, and keep future updates simpler. Change-Id: I2f5c52c466b7321665c9699ccdbf98f928483fee
* GitcInit: fix gitc-init failurev2.29.6Woody Lin2022-11-041-1/+2
| | | | | | | | | | | | Aligns argument usage of refactored GitcManifest (8c1e9cbef "manifest_xml: refactor manifest parsing from client management") to fix the `repo gitc-init` error: `fatal: manifest_file must be abspath`. Change-Id: I1728032cce3f39ed1077bbb7ef714410c2c49e1a Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/350374 Tested-by: Woody Lin <woodylin@google.com> Reviewed-by: LaMont Jones <lamontjones@google.com> Reviewed-by: Xin Li <delphij@google.com>
* sync: clear preciousObjects when set in error.LaMont Jones2022-11-034-31/+126
| | | | | | | | | | | | | | If this is a project that is not using object sharing (there is only one copy of the remote project) then clear preciousObjects. To override this for a project, run: git config --replace-all repo.preservePreciousObjects true Change-Id: If3ea061c631c5ecd44ead84f68576012e2c7405c Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/350235 Reviewed-by: Jonathan Nieder <jrn@google.com> Tested-by: LaMont Jones <lamontjones@google.com>
* Set tracing to always on and save to .repo/TRACE_FILE.Joanna Wang2022-11-0313-110/+244
| | | | | | | | | | | | - add `--trace_to_stderr` option so stderr will include trace outputs and any other errors that get sent to stderr - while TRACE_FILE will only include trace outputs piggy-backing on: https://gerrit-review.googlesource.com/c/git-repo/+/349154 Change-Id: I3895a84de4b2784f17fac4325521cd5e72e645e2 Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/350114 Reviewed-by: LaMont Jones <lamontjones@google.com> Tested-by: Joanna Wang <jojwang@google.com>
* tests: Make the tests pass for Python < 3.8Peter Kjellerstedt2022-10-281-7/+7
| | | | | | | | | | | | | | | | Before Python 3.8, xml.dom.minidom sorted the attributes of an element when writing it to a file, while later versions output the attributes in the order they were created. Avoid these differences by sorting the attributes for each element before comparing the generated manifests with the expected ones. This corresponds to commit 5d58c18, but for new tests introduced since it was integrated. Change-Id: I5c360656a0968e6e8d57eb068c8e87da7dfa61c1 Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/349917 Reviewed-by: LaMont Jones <lamontjones@google.com>
* init: add --manifest-depth for shallow manifest clonev2.29.5LaMont Jones2022-10-275-4/+28
| | | | | | | | | | | | | | | | | | | People rarely care about the history of the manifest repo. Add a parameter to specify depth for the manifest. For now, make the default behavior the same as the current behavior. At a future date, the default will be changed to 1. People who need the full history should begin passing --manifest-depth=0 to preserve the behavior when the default changes. We can't reuse the existing --depth option because that applies to all projects we clone, not just the manifest repo. Bug: https://crbug.com/gerrit/16193, https://crbug.com/gerrit/16358 Change-Id: I9130fed3eaed656435c778a85cfe9d04e3a4a6a0 Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/349814 Tested-by: LaMont Jones <lamontjones@google.com> Reviewed-by: Xin Li <delphij@google.com>
* Revert "init: change --depth default to 1 for manifest repo"LaMont Jones2022-10-274-15/+0
| | | | | | | | | | | | This reverts commit 076d54652e0025e1360f66e483926477b910b02e. Reason for revert: crbug.com/gerrit/16358 Change-Id: I2970eb50677cca69786f71edffe4aa5271cf139f Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/349834 Reviewed-by: Sam Saccone <samccone@google.com> Tested-by: LaMont Jones <lamontjones@google.com> Reviewed-by: Xin Li <delphij@google.com>
* sync: uninitialized variable on mirror sync failureLaMont Jones2022-10-261-0/+1
| | | | | | | | | | | | When repo sync fails, if the workspace is a mirror, an uninitialized variable is referenced. Bug: crbug.com/gerrit/16356 Change-Id: I1dba9f92319b9cbfd18460327560a395c88a089f Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/349654 Reviewed-by: Sam Saccone <samccone@google.com> Reviewed-by: Xin Li <delphij@google.com> Tested-by: LaMont Jones <lamontjones@google.com>
* sync: do not require python 3.9v2.29.4LaMont Jones2022-10-251-5/+5
| | | | | | | | | | | | Use pre-3.9 syntax for NamedTuple, so that users do not need to have python 3.9 or later installed. Bug: b/255632143, crbug.com/gerrit/16355 Test: manually verified with python 3.8 Change-Id: I488d2d5267ed98d5c55c233cc789e629f1911c9d Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/349395 Tested-by: LaMont Jones <lamontjones@google.com> Reviewed-by: Jonathan Nieder <jrn@google.com>
* sync: only use --cruft when git supports it.v2.29.3LaMont Jones2022-09-221-3/+9
| | | | | | | | | | | git gc --cruft was added in 2.37.0. Bug: https://crbug.com/gerrit/16270 Change-Id: I71e46741e33472a92f16d6f11c51a23e1e55d869 Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/346577 Reviewed-by: Emily Shaffer <emilyshaffer@google.com> Tested-by: LaMont Jones <lamontjones@google.com> Reviewed-by: Mike Frysinger <vapier@google.com>
* project: Add a missing call to _CopyAndLinkFilesPeter Kjellerstedt2022-09-201-0/+2
| | | | | | | | | | | | | If a file that is copied using a <copyfile> tag is modified and not committed or if it is committed to a detached head, then running `repo sync` would update the target file as expected. However, if the modified file is committed to a local branch, then running `repo sync' would not update the target file as expected. Change-Id: Ic98e37d1c2e51fd1bf15abf149c7d06190cfd6d2 Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/344475 Reviewed-by: Mike Frysinger <vapier@google.com>
* manifest: allow extend-project to override dest-branch and upstreamErik Elmeke2022-09-203-0/+38
| | | | | | | | Bug: https://crbug.com/gerrit/16238 Change-Id: Id6eff34791525b3df690e160c911c0286331984b Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/345144 Tested-by: Erik Elmeke <erik@haleytek.corp-partner.google.com> Reviewed-by: Mike Frysinger <vapier@google.com>
* sync: use namedtuples for internal return valuesLaMont Jones2022-09-193-21/+103
| | | | | | | | | | | | | Replace tuple returns with namedtuples, to simplify adding new fields. Extend the Sync_NetworkHalf return value to: - success: True if successful (the former return value) - remote_fetched: True if we called `git fetch` Change-Id: If63c24c2f849523f77fa19c05bbf23a5e9a20ba9 Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/344534 Reviewed-by: Mike Frysinger <vapier@google.com> Tested-by: LaMont Jones <lamontjones@google.com>
* sync: incorporate review feedback.LaMont Jones2022-09-191-31/+32
| | | | | | | | | | This incorporates feedback from https://gerrit-review.googlesource.com/c/git-repo/+/345114 Change-Id: I04433d6435b967858f1ffb355217d90bc48c1e5d Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/345894 Tested-by: LaMont Jones <lamontjones@google.com> Reviewed-by: Mike Frysinger <vapier@google.com>