<feed xmlns='http://www.w3.org/2005/Atom'>
<title>tools/git-repo.git/project.py, branch v2.12</title>
<subtitle>Mirror of gerrit.googlesource.com/git-repo</subtitle>
<id>https://git.enea.com/cgit/tools/git-repo.git/atom?h=v2.12</id>
<link rel='self' href='https://git.enea.com/cgit/tools/git-repo.git/atom?h=v2.12'/>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/tools/git-repo.git/'/>
<updated>2021-01-21T19:41:52+00:00</updated>
<entry>
<title>sync: Added --use-superproject option and support for superproject.</title>
<updated>2021-01-21T19:41:52+00:00</updated>
<author>
<name>Raman Tenneti</name>
<email>rtenneti@google.com</email>
</author>
<published>2021-01-15T03:17:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/tools/git-repo.git/commit/?id=6a872c9daeec58dda61786e6f65591330709f6ad'/>
<id>urn:sha1:6a872c9daeec58dda61786e6f65591330709f6ad</id>
<content type='text'>
Added "--use-superporject" option to sync.py to fetch project SHAs from
superproject. If there are any missing projects in superprojects, it
prints the missing entries and exits. If there are no missing entries,
it will use SHAs from superproject to fetch the projects from git.

Tested the code with the following commands.

$ ./run_tests tests/test_manifest_xml.py
$ ./run_tests -v tests/test_git_superproject.py
$ ./run_tests -v

Tested the sync code by copying all the repo changes into my Android
AOSP checkout and adding &lt;superporject&gt; tag to default.xml. With
local modification to the code to print the status,

.../WORKING_DIRECTORY$ repo sync --use-superproject
repo: executing 'git clone' url: sso://android/platform/superproject
repo: executing 'git ls-tree'
Success: []

Bug: https://crbug.com/gerrit/13709
Tested-by: Raman Tenneti &lt;rtenneti@google.com&gt;
Change-Id: Id18665992428dd684c04b0e0b3a52f46316873a0
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/293822
Reviewed-by: Mike Frysinger &lt;vapier@google.com&gt;
</content>
</entry>
<entry>
<title>drop pyversion &amp; is_python3 checking</title>
<updated>2021-01-06T18:53:58+00:00</updated>
<author>
<name>Mike Frysinger</name>
<email>vapier@google.com</email>
</author>
<published>2019-06-13T06:24:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/tools/git-repo.git/commit/?id=acf63b28928b33d1335dfed1af7e2d8fc6bb5fc4'/>
<id>urn:sha1:acf63b28928b33d1335dfed1af7e2d8fc6bb5fc4</id>
<content type='text'>
We're committed to Python 3 at this point, so purge all the
is_python3 related dynamic checks.

Bug: https://crbug.com/gerrit/10418
Change-Id: I4c8b405d6de359b8b83223c9f4b9c8ffa18ea1a2
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/292383
Reviewed-by: Chris Mcdonald &lt;cjmcdonald@google.com&gt;
Tested-by: Mike Frysinger &lt;vapier@google.com&gt;
</content>
</entry>
<entry>
<title>strip python2-only coding:utf-8 &amp; print_function settings</title>
<updated>2021-01-06T18:53:05+00:00</updated>
<author>
<name>Mike Frysinger</name>
<email>vapier@google.com</email>
</author>
<published>2021-01-01T13:42:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/tools/git-repo.git/commit/?id=784ccfc040dc8efa1a64d3c7d4070b66beb15d08'/>
<id>urn:sha1:784ccfc040dc8efa1a64d3c7d4070b66beb15d08</id>
<content type='text'>
We're committed to Python 3 at this point, so clean up boilerplate.

Bug: https://crbug.com/gerrit/10418
Change-Id: Ib1719ba2eb65c53b94881a1a1bf203ddfcaaafed
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/292382
Reviewed-by: Chris Mcdonald &lt;cjmcdonald@google.com&gt;
Tested-by: Mike Frysinger &lt;vapier@google.com&gt;
</content>
</entry>
<entry>
<title>project: detach HEAD in internal worktree checkout.</title>
<updated>2020-12-26T07:30:40+00:00</updated>
<author>
<name>Remy Böhmer</name>
<email>oss@bohmer.net</email>
</author>
<published>2020-12-15T17:49:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/tools/git-repo.git/commit/?id=1469c28ec3e221cf08a9f83a415945443eac0be4'/>
<id>urn:sha1:1469c28ec3e221cf08a9f83a415945443eac0be4</id>
<content type='text'>
When checkout is done with Git worktrees then the HEAD in the
bare-git repositories point to the initialized default (e.g.
'refs/heads/master'). This default branch does not exist
locally and is not automatically created.
When a user now creates a branch in any git repository named
'master' then it is no longer possible to get rid of this branch,
neither is it possible to switch to another branch and switch
back to this master branch. Git concludes the 'master' branch is
already checked out (in the bare Git) and that results in a
lockdown of this master branch.

To repoduce this issue, run these commands in a repo tree
checked out with --worktree:
- git checkout master # assuming the remote repo has a master branch,
                      # a local tracking branch master is created here
- git checkout -b temp
- git checkout master # This one now fails
- git branch -d master # fails too
The failure is caused by Git assuming the master branch is checked out
by the bare git repository since HEAD is pointing towards it.

To workaround this, we always detach HEAD in the bare-git when
syncing.  We don't need it to point to a ref in general, but we
would like it to be valid so git tools "just work" if they're run
in here.

Signed-off-by: Remy Bohmer &lt;oss@bohmer.net&gt;
Change-Id: I15c96604363c41f0d01c42f533174393097daeb5
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/290985
Reviewed-by: Mike Frysinger &lt;vapier@google.com&gt;
</content>
</entry>
<entry>
<title>Fix --reference option under Windows</title>
<updated>2020-11-23T09:17:32+00:00</updated>
<author>
<name>Remy Bohmer</name>
<email>github@bohmer.net</email>
</author>
<published>2020-11-21T09:57:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/tools/git-repo.git/commit/?id=169b0218b384f04426d7509757a8684f957967bf'/>
<id>urn:sha1:169b0218b384f04426d7509757a8684f957967bf</id>
<content type='text'>
When intializing a new repo with the --reference option on Windows 10
the objects/info/alternates in each git repository is created with
Windows line endings (\r\n), leading to the following error:

error: object directory C:/&lt;PATH_TO_MIRROR&gt;/&lt;REPO_NAME&gt;.git/objects?
does not exist; check .git/objects/info/alternates

This can be fixed by simply using unix line endings on both
Windows and unix platforms.

Reported-by: Francisco Javier Alvarez Garcia &lt;javier.alvarez.garcia.17@gmail.com&gt;
Follow-up-from: I268fe029ede68802c21037b0f2ae8a95afb85e48
Bug: https://crbug.com/gerrit/13208
Change-Id: I6da60c4ca957778b3c42ab6b9ad85c40483f0042
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/289431
Reviewed-by: Mike Frysinger &lt;vapier@google.com&gt;
Tested-by: Remy Bohmer &lt;oss@bohmer.net&gt;
</content>
</entry>
<entry>
<title>Always use Unix EOL for worktree .git and gitdir files</title>
<updated>2020-11-20T20:53:43+00:00</updated>
<author>
<name>Remy Bohmer</name>
<email>github@bohmer.net</email>
</author>
<published>2020-11-20T20:19:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/tools/git-repo.git/commit/?id=44bc9643ed1b53ef72a0f4089c80ca8ef7310c7a'/>
<id>urn:sha1:44bc9643ed1b53ef72a0f4089c80ca8ef7310c7a</id>
<content type='text'>
Worktree .git and gitdir reference files are written by Git with
Unix line ending, even on Windows &amp; macOS. The conversion to
relative paths makes these files end with DOS line endings in
Windows.  The Git integration in Visual Studio 2019 cannot deal
with these DOS line endings and considers these worktrees invalid.

Signed-off-by: Remy Bohmer &lt;github@bohmer.net&gt;
Change-Id: I088cfd994f3cc31db4e0ca7791fa0a4ee3ac222f
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/289310
Reviewed-by: Mike Frysinger &lt;vapier@google.com&gt;
Tested-by: Remy Bohmer &lt;linux@bohmer.net&gt;
</content>
</entry>
<entry>
<title>project: do not update local published/ refs in dryrun mode</title>
<updated>2020-11-20T04:08:19+00:00</updated>
<author>
<name>Mike Frysinger</name>
<email>vapier@google.com</email>
</author>
<published>2020-11-20T00:18:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/tools/git-repo.git/commit/?id=d7f8683daf1d47bb060a1f054453be6779accede'/>
<id>urn:sha1:d7f8683daf1d47bb060a1f054453be6779accede</id>
<content type='text'>
Bug: https://crbug.com/gerrit/13087
Change-Id: I197e6d6d07c7d325ac294b597d42e895f77c737f
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/289182
Reviewed-by: Michael Mortensen &lt;mmortensen@google.com&gt;
Tested-by: Mike Frysinger &lt;vapier@google.com&gt;
</content>
</entry>
<entry>
<title>manifest_xml: refactor manifest parsing from client management</title>
<updated>2020-11-18T19:10:57+00:00</updated>
<author>
<name>Mike Frysinger</name>
<email>vapier@google.com</email>
</author>
<published>2020-09-06T18:53:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/tools/git-repo.git/commit/?id=8c1e9cbef161f2ff12dadbacf26affd23876fde9'/>
<id>urn:sha1:8c1e9cbef161f2ff12dadbacf26affd23876fde9</id>
<content type='text'>
We conflate the manifest &amp; parsing logic with the management of the
repo client checkout in a single class.  This makes testing just one
part (the manifest parsing) hard as it requires a full checkout too.

Start splitting the two apart into separate classes to make it easy
to reason about &amp; test.

Change-Id: Iaf897c93db9c724baba6044bfe7a589c024523b2
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/288682
Reviewed-by: Michael Mortensen &lt;mmortensen@google.com&gt;
Tested-by: Mike Frysinger &lt;vapier@google.com&gt;
</content>
</entry>
<entry>
<title>Move RepoHook class from project.py file to dedicated file</title>
<updated>2020-11-03T22:08:08+00:00</updated>
<author>
<name>Remy Bohmer</name>
<email>github@bohmer.net</email>
</author>
<published>2020-09-10T08:38:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/tools/git-repo.git/commit/?id=16c1328fecdbd950bb4f2c24f9c49a8ed0992c50'/>
<id>urn:sha1:16c1328fecdbd950bb4f2c24f9c49a8ed0992c50</id>
<content type='text'>
The project.py file is huge and contains multiple
classes. By moving it to seperate class files the code
becomes more readable and maintainable.

Signed-off-by: Remy Bohmer &lt;github@bohmer.net&gt;
Change-Id: Ida9d99d31751d627ae1ea0373418080696d2e14b
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/281293
Reviewed-by: Mike Frysinger &lt;vapier@google.com&gt;
Tested-by: Remy Bohmer &lt;linux@bohmer.net&gt;
</content>
</entry>
<entry>
<title>init: use the remote default manifest branch</title>
<updated>2020-09-09T05:46:07+00:00</updated>
<author>
<name>Mike Frysinger</name>
<email>vapier@google.com</email>
</author>
<published>2020-09-06T19:51:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/tools/git-repo.git/commit/?id=50a81de2bc9f2074d56c368f651cf9f50c8d8a87'/>
<id>urn:sha1:50a81de2bc9f2074d56c368f651cf9f50c8d8a87</id>
<content type='text'>
Instead of hardcoding "master" as our default, use the remote server's
default branch instead.  For most people, this should be the same as
"master" already.  For projects moving to "main", it means we'll use
the new name automatically rather than forcing people to use -b main.

For repositories that never set up a default HEAD, we should still use
the historical "master" default.

Bug: https://crbug.com/gerrit/13339
Change-Id: I4117c81a760c9495f98dbb1111a3e6c127f45eba
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/280799
Reviewed-by: Michael Mortensen &lt;mmortensen@google.com&gt;
Tested-by: Mike Frysinger &lt;vapier@google.com&gt;
</content>
</entry>
</feed>
