<feed xmlns='http://www.w3.org/2005/Atom'>
<title>tools/git-repo.git/git_command.py, branch v2.19</title>
<subtitle>Mirror of gerrit.googlesource.com/git-repo</subtitle>
<id>https://git.enea.com/cgit/tools/git-repo.git/atom?h=v2.19</id>
<link rel='self' href='https://git.enea.com/cgit/tools/git-repo.git/atom?h=v2.19'/>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/tools/git-repo.git/'/>
<updated>2021-07-01T16:27:43+00:00</updated>
<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>
<entry>
<title>git_command: switch version caches to functools</title>
<updated>2021-05-06T18:36:25+00:00</updated>
<author>
<name>Mike Frysinger</name>
<email>vapier@google.com</email>
</author>
<published>2021-05-06T04:28:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/tools/git-repo.git/commit/?id=8e768eaaa722a99405f6542ac718880c8c22f060'/>
<id>urn:sha1:8e768eaaa722a99405f6542ac718880c8c22f060</id>
<content type='text'>
Simplifies the code a bit to use the stdlib cache helper.

Change-Id: I778e90100ce748a71cc3a5a5d67dda403334315e
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/305482
Reviewed-by: Raman Tenneti &lt;rtenneti@google.com&gt;
Tested-by: Mike Frysinger &lt;vapier@google.com&gt;
</content>
</entry>
<entry>
<title>git_command: pass GIT_DIR on Windows with /</title>
<updated>2021-02-28T16:07:20+00:00</updated>
<author>
<name>Mike Frysinger</name>
<email>vapier@google.com</email>
</author>
<published>2021-02-27T18:06:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/tools/git-repo.git/commit/?id=4510be51c1e4852258dd97fb043a250a6e3abfc7'/>
<id>urn:sha1:4510be51c1e4852258dd97fb043a250a6e3abfc7</id>
<content type='text'>
When using Git under Windows, it seems that Git doesn't always parse
GIT_DIR correctly when it uses the Windows \ form, but does when it
uses / only.

For example, when using worktrees:
$ GIT_DIR='C:\Users\vapier\Desktop\repo\breakpad\tools\test\.git' git worktree list
fatal: not a git repository: ..\..\.repo\worktrees\linux-syscall-support.git\worktrees\test
$ GIT_DIR='C:/Users/vapier/Desktop/repo/breakpad/tools/test/.git' git worktree list
C:/Users/vapier/Desktop/repo/breakpad/.repo/worktrees/linux-syscall-support.git  fd00dbbd0c06 (detached HEAD)
..\..\..\..\..\src\src\third_party\lss\.git                                      fd00dbbd0c06 (detached HEAD)
..\..\..\..\..\tools\test\.git                                                   fd00dbbd0c06 (detached HEAD)

Change-Id: I666c03ae845ecb55d7f9800731ea6987d3e7f401
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/298622
Reviewed-by: Michael Mortensen &lt;mmortensen@google.com&gt;
Tested-by: Mike Frysinger &lt;vapier@google.com&gt;
</content>
</entry>
<entry>
<title>git_command: switch process capturing over to subprocess</title>
<updated>2021-02-23T00:36:51+00:00</updated>
<author>
<name>Mike Frysinger</name>
<email>vapier@google.com</email>
</author>
<published>2021-02-16T22:18:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/tools/git-repo.git/commit/?id=c87c1863b1df392042c8859b81475a65315c8a9d'/>
<id>urn:sha1:c87c1863b1df392042c8859b81475a65315c8a9d</id>
<content type='text'>
Now that these code paths are all synchronous, there's no need to run
our own poll loop to read &amp; pass thru/save output.  Delete all of that
and just let the subprocess module take care of it all.

Change-Id: Ic27fe71b6f964905cf280ce2b183bb7ee46f4a0d
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/297422
Reviewed-by: Michael Mortensen &lt;mmortensen@google.com&gt;
Reviewed-by: Jonathan Nieder &lt;jrn@google.com&gt;
Tested-by: Mike Frysinger &lt;vapier@google.com&gt;
</content>
</entry>
<entry>
<title>git_command: make execution synchronous</title>
<updated>2021-02-20T08:41:10+00:00</updated>
<author>
<name>Mike Frysinger</name>
<email>vapier@google.com</email>
</author>
<published>2021-02-16T20:45:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/tools/git-repo.git/commit/?id=c5bbea8db364b88558acc434be16ec82c04737e5'/>
<id>urn:sha1:c5bbea8db364b88558acc434be16ec82c04737e5</id>
<content type='text'>
Every use of GitCommand in the tree just calls Wait as soon as it's
instantiated.  Move the bulk of the logic into the init path to make
the call synchronous to simplify.  We'll cleanup the users of the
Wait API to follup commits -- having this split makes it easier to
track down regressions.

Change-Id: I1e8c519efa912da723749ff7663558c04c1f491c
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/297244
Reviewed-by: Jonathan Nieder &lt;jrn@google.com&gt;
Tested-by: Mike Frysinger &lt;vapier@google.com&gt;
</content>
</entry>
<entry>
<title>git_command: rework stdin handling</title>
<updated>2021-02-17T15:15:16+00:00</updated>
<author>
<name>Mike Frysinger</name>
<email>vapier@google.com</email>
</author>
<published>2021-02-16T20:38:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/tools/git-repo.git/commit/?id=f37b9827a966258a0adc2012a7c5c89cf89e4a0f'/>
<id>urn:sha1:f37b9827a966258a0adc2012a7c5c89cf89e4a0f</id>
<content type='text'>
We only provide input to GitCommand in one place, so inline the logic
to be more synchronous and similar to subprocess.run.  This makes the
code simpler and easier to understand.

Change-Id: Ibe498fedf608774bae1f807fc301eb67841c468b
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/297142
Reviewed-by: Michael Mortensen &lt;mmortensen@google.com&gt;
Tested-by: Mike Frysinger &lt;vapier@google.com&gt;
</content>
</entry>
<entry>
<title>git_command: use subprocess.run for version info</title>
<updated>2021-02-16T16:26:43+00:00</updated>
<author>
<name>Mike Frysinger</name>
<email>vapier@google.com</email>
</author>
<published>2021-02-16T07:38:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/tools/git-repo.git/commit/?id=f307916f22c633d9d918158bd13f4bced581af17'/>
<id>urn:sha1:f307916f22c633d9d918158bd13f4bced581af17</id>
<content type='text'>
The code is a bit simpler &amp; easier to reason about.

Change-Id: If125ea7d776cdfa38a0440a2b03583de079c4839
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/297023
Reviewed-by: Michael Mortensen &lt;mmortensen@google.com&gt;
Tested-by: Mike Frysinger &lt;vapier@google.com&gt;
</content>
</entry>
<entry>
<title>git_command.py: Handle unicode decode error</title>
<updated>2021-01-28T17:38:24+00:00</updated>
<author>
<name>Gaurav Pathak</name>
<email>gaurav.pathak@pantacor.com</email>
</author>
<published>2021-01-26T12:40:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/tools/git-repo.git/commit/?id=db3128f2ec8feedd16f0379aedd39287f4186c54'/>
<id>urn:sha1:db3128f2ec8feedd16f0379aedd39287f4186c54</id>
<content type='text'>
repo diffmanifests saves git commit messages in buf and uses default
utf-8 decoding, in some scenarios git commit message can itself contain
a non UTF-8 character due to a typo or incorrect i18n.commitEncoding.

e.g.
d354d9afe923 [PATCH] fbcon: don\xb4t call set_par() in fbcon_init() if vc_mode == KD_GRAPHICS

Convert the buf containing git commits to string if decoding to utf-8
encounters an error.

Signed-off-by: Gaurav Pathak &lt;gaurav.pathak@pantacor.com&gt;
Change-Id: If818562f0faaa5062c765fbea11dc0e1c86a24d7
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/294742
Reviewed-by: Mike Frysinger &lt;vapier@google.com&gt;
</content>
</entry>
</feed>
