<feed xmlns='http://www.w3.org/2005/Atom'>
<title>tools/git-repo.git/git_command.py, branch v2.32</title>
<subtitle>Mirror of gerrit.googlesource.com/git-repo</subtitle>
<id>https://git.enea.com/cgit/tools/git-repo.git/atom?h=v2.32</id>
<link rel='self' href='https://git.enea.com/cgit/tools/git-repo.git/atom?h=v2.32'/>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/tools/git-repo.git/'/>
<updated>2023-01-05T18:43:12+00:00</updated>
<entry>
<title>Fix flake8 warnings for some files</title>
<updated>2023-01-05T18:43:12+00:00</updated>
<author>
<name>Sergiy Belozorov</name>
<email>sergiyb@chromium.org</email>
</author>
<published>2023-01-05T17:57:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/tools/git-repo.git/commit/?id=78e82ec78e9bd4677c2e1f941b046d126f2f0ba7'/>
<id>urn:sha1:78e82ec78e9bd4677c2e1f941b046d126f2f0ba7</id>
<content type='text'>
Change-Id: If67f8660cfb0479f0e710b3566285ef401fcf077
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/355969
Tested-by: Sergiy Belozorov &lt;sergiyb@chromium.org&gt;
Reviewed-by: Mike Frysinger &lt;vapier@google.com&gt;
</content>
</entry>
<entry>
<title>Extract env building into a testable helper.</title>
<updated>2022-11-16T18:26:49+00:00</updated>
<author>
<name>Sam Saccone</name>
<email>samccone@google.com</email>
</author>
<published>2022-11-15T23:57:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/tools/git-repo.git/commit/?id=d686365449ade2480a23f86531a5b6630fcbb7a0'/>
<id>urn:sha1:d686365449ade2480a23f86531a5b6630fcbb7a0</id>
<content type='text'>
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 &lt;lamontjones@google.com&gt;
Tested-by: Sam Saccone &lt;samccone@google.com&gt;
</content>
</entry>
<entry>
<title>Do not set ALT object dirs when said path resolves to the same dir.</title>
<updated>2022-11-16T18:26:49+00:00</updated>
<author>
<name>Sam Saccone</name>
<email>samccone@google.com</email>
</author>
<published>2022-11-15T22:59:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/tools/git-repo.git/commit/?id=d3cadf18569afa3918be4bbc3f502cd70b650d59'/>
<id>urn:sha1:d3cadf18569afa3918be4bbc3f502cd70b650d59</id>
<content type='text'>
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 &lt;samccone@google.com&gt;
Reviewed-by: LaMont Jones &lt;lamontjones@google.com&gt;
</content>
</entry>
<entry>
<title>Set tracing to always on and save to .repo/TRACE_FILE.</title>
<updated>2022-11-03T21:07:07+00:00</updated>
<author>
<name>Joanna Wang</name>
<email>jojwang@google.com</email>
</author>
<published>2022-11-03T20:51:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/tools/git-repo.git/commit/?id=a6c52f566acfbff5b0f37158c0d33adf05d250e5'/>
<id>urn:sha1:a6c52f566acfbff5b0f37158c0d33adf05d250e5</id>
<content type='text'>
- 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 &lt;lamontjones@google.com&gt;
Tested-by: Joanna Wang &lt;jojwang@google.com&gt;
</content>
</entry>
<entry>
<title>git_command: fix input passing</title>
<updated>2022-08-22T19:34:59+00:00</updated>
<author>
<name>Mike Frysinger</name>
<email>vapier@google.com</email>
</author>
<published>2022-08-19T06:11:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/tools/git-repo.git/commit/?id=63a5657ecfe1585ceda3231bfe8a6c8d9c3dafad'/>
<id>urn:sha1:63a5657ecfe1585ceda3231bfe8a6c8d9c3dafad</id>
<content type='text'>
After reworking this function to use subprocess for output capturing
in commit c87c1863b1df392042c8859b81475a65315c8a9d ("git_command:
switch process capturing over to subprocess"), passing input via
stdin write no longer works.  We have to pass it via communicate(),
and we have to pass it a string instead of bytes (since we always
use encoding='utf-8' now).  This is fine since the only user of the
input= setting today is already passing in a string.

Bug: https://crbug.com/gerrit/16151
Change-Id: Ic58db1e568b8f8aa840a6d62c5a157c14aa6d9bc
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/343515
Tested-by: Mike Frysinger &lt;vapier@google.com&gt;
Reviewed-by: LaMont Jones &lt;lamontjones@google.com&gt;
</content>
</entry>
<entry>
<title>add a few more docs to existing funcs</title>
<updated>2022-08-18T17:31:01+00:00</updated>
<author>
<name>Mike Frysinger</name>
<email>vapier@google.com</email>
</author>
<published>2020-12-08T03:04:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/tools/git-repo.git/commit/?id=790f4cea7aa95667296e0aa22eb0690df91c45e8'/>
<id>urn:sha1:790f4cea7aa95667296e0aa22eb0690df91c45e8</id>
<content type='text'>
Change-Id: I27317a59aba67c05ca1fd333e8f064c0edccb209
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/343185
Reviewed-by: LaMont Jones &lt;lamontjones@google.com&gt;
Tested-by: Mike Frysinger &lt;vapier@google.com&gt;
</content>
</entry>
<entry>
<title>project: store objects in project-objects directly</title>
<updated>2022-01-19T17:24:51+00:00</updated>
<author>
<name>Mike Frysinger</name>
<email>vapier@google.com</email>
</author>
<published>2021-12-23T22:36:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/tools/git-repo.git/commit/?id=67d6cdf2bc752f02cd294abe3a45811c2019de35'/>
<id>urn:sha1:67d6cdf2bc752f02cd294abe3a45811c2019de35</id>
<content type='text'>
In order to stop sharing objects/ directly between shared projects,
we have to fetch the remote objects into project-objects/ manually.
So instead of running git operations in the individual project dirs
and relying on .git/objects being symlinked to project-objects/,
tell git to store any objects it fetches in project-objects/.

We do this by leveraging the GIT_OBJECT_DIRECTORY override.  This
has been in git forever, or at least since v1.7.2 which is what we
already hard require.  This tells git to save new objects to the
specified path no matter where it's being run otherwise.

We still otherwise run git in the project-specific dir so that it
can find the right set of refs that it wants to compare against,
including local refs.  For that reason, we also have to leverage
GIT_ALTERNATE_OBJECT_DIRECTORIES to tell git where to find objects
that are not in the upstream remote.  This way git doesn't blow up
when it can't find objects only associated with local commits.

As it stands right now, the practical result is the same: since we
symlink the project objects/ dir to the project-objects/ tree, the
default objects dir, the one we set $GIT_OBJECT_DIRECTORY to, and
the one we set $GIT_ALTERNATE_OBJECT_DIRECTORIES to are actually
all the same.  So this commit by itself should be safe.  But in a
follow up commit, we can replace the symlink with a separate dir
and git will keep working.

Bug: https://crbug.com/gerrit/15553
Change-Id: Ie4e654aec3e1ee307eee925a54908a2db6a5869f
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/328100
Reviewed-by: Jack Neus &lt;jackneus@google.com&gt;
Tested-by: Mike Frysinger &lt;vapier@google.com&gt;
</content>
</entry>
<entry>
<title>Add the ability to administratively enroll repo into using superproject.</title>
<updated>2021-07-01T16:27:43+00:00</updated>
<author>
<name>Xin Li</name>
<email>delphij@google.com</email>
</author>
<published>2021-06-16T17:19:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/tools/git-repo.git/commit/?id=0cb6e92ac561878cc7f6d711648e732b498f943f'/>
<id>urn:sha1:0cb6e92ac561878cc7f6d711648e732b498f943f</id>
<content type='text'>
Repo will remember a choice and an expiration time of the choice, per
user, about whether to use superproject by default. When not specified
from command line and the choice is not expired, repo would use the
user default value.

When a user default value is not present and when the system wide
enable default is provided in git's system configuration, repo would
ask the user for a confirmation which will be valid for two weeks.

git_config.py: Add support for system config. When reading system
	config, we would use --system to avoid hardcoding a path as the
	value may be different on some other distributions.

git_superproject.py: Add a new subroutine, _UseSuperproject(), which
	returns whether superproject should be used and whether it
	is from a user configuration.

	The value is determined in the following order:

	1. If the user specifies either --use-superproject or
	--no-use-superproject, then that choice is being used.

	2. If neither is specified, we would then check the saved value
	(upon repo init) and use that choice when there was a choice.

	3. We then check if there is a saved and unexpired value for
	user's choice in their ~/.gitconfig, and use the unexpired
	choice, if available.

	4. Finally, if all the above didn't give us a decision, and if
	the git system configuration is providing a rollout hint, present
	a prompt to user for their decision and save it in ~/.gitconfig.

subcmds/sync.py: Make use of the new UseSuperproject() provided by
git_superproject.py.

While there also silent stderr from git describe when determining the
version of repo.

Bug: [google internal] b/190688390
Change-Id: Iad3ee03026342ee500e5d65e2f0fa600d7637613
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/309762
Reviewed-by: Mike Frysinger &lt;vapier@google.com&gt;
Tested-by: Xin Li &lt;delphij@google.com&gt;
</content>
</entry>
<entry>
<title>ssh: rewrite proxy management for multiprocessing usage</title>
<updated>2021-05-10T21:16:06+00:00</updated>
<author>
<name>Mike Frysinger</name>
<email>vapier@google.com</email>
</author>
<published>2021-05-06T04:44:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/tools/git-repo.git/commit/?id=339f2df1ddd741070e340ec01d6882dd1eee617c'/>
<id>urn:sha1:339f2df1ddd741070e340ec01d6882dd1eee617c</id>
<content type='text'>
We changed sync to use multiprocessing for parallel work.  This broke
the ssh proxy code as it's all based on threads.  Rewrite the logic to
be multiprocessing safe.

Now instead of the module acting as a stateful object, callers have to
instantiate a new ProxyManager class that holds all the state, an pass
that down to any users.

Bug: https://crbug.com/gerrit/12389
Change-Id: I4b1af116f7306b91e825d3c56fb4274c9b033562
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/305486
Tested-by: Mike Frysinger &lt;vapier@google.com&gt;
Reviewed-by: Chris Mcdonald &lt;cjmcdonald@google.com&gt;
</content>
</entry>
<entry>
<title>ssh: move all ssh logic to a common place</title>
<updated>2021-05-06T19:09:16+00:00</updated>
<author>
<name>Mike Frysinger</name>
<email>vapier@google.com</email>
</author>
<published>2021-05-05T19:53:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/tools/git-repo.git/commit/?id=5291eafa412117b80ebbf645fc51559dd0b2caaf'/>
<id>urn:sha1:5291eafa412117b80ebbf645fc51559dd0b2caaf</id>
<content type='text'>
We had ssh logic sprinkled between two git modules, and neither was
quite the right home for it.  This largely moves the logic as-is to
its new home.  We'll leave major refactoring to followup commits.

Bug: https://crbug.com/gerrit/12389
Change-Id: I300a8f7dba74f2bd132232a5eb1e856a8490e0e9
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/305483
Reviewed-by: Chris Mcdonald &lt;cjmcdonald@google.com&gt;
Tested-by: Mike Frysinger &lt;vapier@google.com&gt;
</content>
</entry>
</feed>
