<feed xmlns='http://www.w3.org/2005/Atom'>
<title>tools/git-repo.git/subcmds/init.py, branch v1.13.11</title>
<subtitle>Mirror of gerrit.googlesource.com/git-repo</subtitle>
<id>https://git.enea.com/cgit/tools/git-repo.git/atom?h=v1.13.11</id>
<link rel='self' href='https://git.enea.com/cgit/tools/git-repo.git/atom?h=v1.13.11'/>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/tools/git-repo.git/'/>
<updated>2020-02-07T20:54:52+00:00</updated>
<entry>
<title>Fix inverted logic around [gitc-]init and -c</title>
<updated>2020-02-07T20:54:52+00:00</updated>
<author>
<name>Dan Willemsen</name>
<email>dwillemsen@google.com</email>
</author>
<published>2020-02-07T01:00:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/tools/git-repo.git/commit/?id=619a2b58871e03ecc4f40b93a183206b51853fa5'/>
<id>urn:sha1:619a2b58871e03ecc4f40b93a183206b51853fa5</id>
<content type='text'>
Instead of not using '-c' for '--current-branch' when using gitc, we
were only using '-c' when using gitc, so we still had the conflict with
the gitc option, and other users still couldn't use '-c'.

Test: repo init -u https://android.googlesource.com/platform/manifest; repo init -c
Test: repo gitc-init -u ... -b ... -c testing
Change-Id: I71e4950a49c281418249f0783c6a2ea34f0d3e2b
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/253795
Reviewed-by: Mike Frysinger &lt;vapier@google.com&gt;
Tested-by: Dan Willemsen &lt;dwillemsen@google.com&gt;
(cherry picked from commit 93293ca47f3a898b30eecf21e7b4e1038780c867)
</content>
</entry>
<entry>
<title>init: handle -c conflicts with gitc-init</title>
<updated>2020-02-05T18:04:11+00:00</updated>
<author>
<name>Mike Frysinger</name>
<email>vapier@google.com</email>
</author>
<published>2020-02-05T05:01:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/tools/git-repo.git/commit/?id=75c02fe4cb5a22135e292c3083220e1f3d4cb349'/>
<id>urn:sha1:75c02fe4cb5a22135e292c3083220e1f3d4cb349</id>
<content type='text'>
We keep getting requests for init to support -c.  This conflicts with
gitc-init which allocates -c for its own use.  Lets make this dynamic
so we keep it with "init" but omit it for "gitc-init".

Bug: https://crbug.com/gerrit/10200
Change-Id: Ibf69c2bbeff638e28e63cb08926fea0c622258db
(cherry picked from commit 66098f707a1a3f352aac4c4bb2c4f88da070ca2a)
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/253392
Tested-by: Mike Frysinger &lt;vapier@google.com&gt;
Reviewed-by: Mike Frysinger &lt;vapier@google.com&gt;
</content>
</entry>
<entry>
<title>init: Add '-c' as an alias to '--current-branch'</title>
<updated>2020-01-24T14:46:58+00:00</updated>
<author>
<name>Diogo Ferreira</name>
<email>diogo@underdev.org</email>
</author>
<published>2019-10-18T11:39:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/tools/git-repo.git/commit/?id=0eb2d3c8a0c59955e6b760f84904badc95b7fde8'/>
<id>urn:sha1:0eb2d3c8a0c59955e6b760f84904badc95b7fde8</id>
<content type='text'>
This makes it consistent with the short option for current-branch in
repo sync.

Change-Id: I2848e87f45a66ef8d829576d0c0c4c0f7a8636a0
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/241700
Tested-by: Diogo Ferreira &lt;deovferreira@gmail.com&gt;
Reviewed-by: David Pursehouse &lt;dpursehouse@collab.net&gt;
Reviewed-by: Mike Frysinger &lt;vapier@google.com&gt;
</content>
</entry>
<entry>
<title>split out cli validation from execution</title>
<updated>2019-08-28T03:54:11+00:00</updated>
<author>
<name>Mike Frysinger</name>
<email>vapier@google.com</email>
</author>
<published>2019-08-27T05:10:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/tools/git-repo.git/commit/?id=ae6cb08ae52d488a4cc6892f811c1c1acf8c3c12'/>
<id>urn:sha1:ae6cb08ae52d488a4cc6892f811c1c1acf8c3c12</id>
<content type='text'>
A common pattern in our subcommands is to verify the arguments &amp;
options before executing things.  For some subcommands, that check
stage is quite long which makes the execution function even bigger.
Lets split that logic out of the execute phase so it's easier to
manage these.

This is most noticeable in the sync subcommand whose Execute func
is quite large, and the option checking makes up ~15% of it.

The manifest command's Execute can be simplified significantly as
the optparse configuration always sets output_file to a string.

Change-Id: I7097847ff040e831345e63de6b467ee17609990e
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/234834
Reviewed-by: David Pursehouse &lt;dpursehouse@collab.net&gt;
Tested-by: Mike Frysinger &lt;vapier@google.com&gt;
</content>
</entry>
<entry>
<title>Add support for partial clone.</title>
<updated>2019-07-16T00:23:16+00:00</updated>
<author>
<name>Xin Li</name>
<email>delphij@google.com</email>
</author>
<published>2019-06-03T18:24:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/tools/git-repo.git/commit/?id=745be2ede1e67421275afc00c04d996d9d6908ee'/>
<id>urn:sha1:745be2ede1e67421275afc00c04d996d9d6908ee</id>
<content type='text'>
A new option, --partial-clone is added to 'repo init' which tells repo
to utilize git's partial clone functionality, which reduces disk and
bandwidth usage when downloading by omitting blob downloads initially.
Different from restricting clone-depth, the user will have full access
to change history, etc., as the objects are downloaded on demand.

Change-Id: I60326744875eac16521a007bd7d5481112a98749
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/229532
Reviewed-by: Mike Frysinger &lt;vapier@google.com&gt;
Tested-by: Xin Li &lt;delphij@google.com&gt;
</content>
</entry>
<entry>
<title>use print() instead of sys.stdout.write()</title>
<updated>2019-07-11T06:26:40+00:00</updated>
<author>
<name>Mike Frysinger</name>
<email>vapier@google.com</email>
</author>
<published>2019-07-04T21:35:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/tools/git-repo.git/commit/?id=ab85fe7c535bfa97c067354d8a23e39b849f6728'/>
<id>urn:sha1:ab85fe7c535bfa97c067354d8a23e39b849f6728</id>
<content type='text'>
We're relying on sys.stdout.write() to flush its buffer which isn't
guaranteed, and is not the case in Python 3.  Change to use print()
everywhere to be standard, and utilize the end= keyword to get the
EOL semantics we need.

We can't use print's flush= keyword as that's only in Python 3.
Leave behind a TODO to clean it up when we can drop Python 2.

Bug: https://crbug.com/gerrit/10418
Change-Id: I562128c7f1e6d154f4a6ecdf33a70fa2811dc2af
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/230392
Tested-by: Mike Frysinger &lt;vapier@google.com&gt;
Reviewed-by: David Pursehouse &lt;dpursehouse@collab.net&gt;
</content>
</entry>
<entry>
<title>set default file encoding to utf-8</title>
<updated>2019-06-13T14:30:52+00:00</updated>
<author>
<name>Mike Frysinger</name>
<email>vapier@google.com</email>
</author>
<published>2019-06-13T06:30:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/tools/git-repo.git/commit/?id=f601376e13e6beca7ab8d660e00d6c14714f305f'/>
<id>urn:sha1:f601376e13e6beca7ab8d660e00d6c14714f305f</id>
<content type='text'>
There's no reason to support any other encoding in these files.
This only affects the files themselves and not streams they open.

Bug: https://crbug.com/gerrit/10418
Change-Id: I053cb40cd3666ce5c8a0689b9dd938f24ca765bf
</content>
</entry>
<entry>
<title>Honor --depth during repo init</title>
<updated>2019-05-21T16:47:21+00:00</updated>
<author>
<name>Nasser Grainawi</name>
<email>nasser@codeaurora.org</email>
</author>
<published>2019-05-21T16:41:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/tools/git-repo.git/commit/?id=d92464e8efb880ea234b24b7a053b977152e5d0b'/>
<id>urn:sha1:d92464e8efb880ea234b24b7a053b977152e5d0b</id>
<content type='text'>
If a user is asking for a shallow clone of the repos, they probably
expect a shallow clone of the manifest repo too. For very large
manifest repos, this can be a huge space and time savings. For one real-world
repo, a 'repo init --no-tags --current-branch' used 350MB of disk space and
took 7 minutes. Adding --depth 1 and this change reduced it to 10MB and 2.5
minutes.

Change-Id: I6fa662e174e623ede8861efc862ce26d65d4958d
</content>
</entry>
<entry>
<title>init: Remove -c short option for --current-branch</title>
<updated>2018-12-20T19:55:02+00:00</updated>
<author>
<name>Ereth McKnight-MacNeil</name>
<email>ereth@google.com</email>
</author>
<published>2018-12-20T05:28:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/tools/git-repo.git/commit/?id=12ee5446e9eb8b9d0ae5425fb1e00bf05f93facd'/>
<id>urn:sha1:12ee5446e9eb8b9d0ae5425fb1e00bf05f93facd</id>
<content type='text'>
This option conflicts with the gitc-init -c short option.

Bug: https://crbug.com/gerrit/10200
Change-Id: I06f37564429ca0bd4c0bbea6066daae4f663c838
</content>
</entry>
<entry>
<title>init: --dissociate option to copy objects borrowed with --reference</title>
<updated>2018-10-19T18:51:23+00:00</updated>
<author>
<name>Nikolai Merinov</name>
<email>n.merinov@inango-systems.com</email>
</author>
<published>2018-10-19T10:07:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/tools/git-repo.git/commit/?id=09f0abb0efde83cfc4b850ebdc41f6ed3b61a123'/>
<id>urn:sha1:09f0abb0efde83cfc4b850ebdc41f6ed3b61a123</id>
<content type='text'>
"repo init --reference" has two purposes: to decrease bandwidth used
at clone time, and to decrease disk usage afterward, by using the
reference repositories as an alternate store of objects even after
the clone. The downside is that it makes the borrowing repositories
dependent on the reference repositories, so it is easy to end up
with missing objects by mistake after a cleanup operation like "git
gc".

To prevent that, v2.3.0-rc0~30^2 (clone: --dissociate option to mark
that reference is only temporary, 2014-10-14), "git clone" gained a
--dissociate option that makes --reference reuse objects from the
reference repository at clone time but copy them over instead of
using the reference as an alternate. This is more straightforward to
use than plain --reference, at the cost of higher disk usage.

Introduce a --dissociate to "repo init" that brings the same benefits
to repo. The option is simply passed on to "git clone".

Change-Id: Ib50a549eb71e0a2b3e234aea57537923962a80d4
</content>
</entry>
</feed>
