<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/git.git, branch sb/submodule-update-dot-branch</title>
<subtitle>github.com: git/git.git
</subtitle>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/git.git/'/>
<entry>
<title>t7406: fix breakage on OSX</title>
<updated>2016-08-10T18:27:22+00:00</updated>
<author>
<name>Stefan Beller</name>
<email>sbeller@google.com</email>
</author>
<published>2016-08-10T17:56:07+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/git.git/commit/?id=967d7f898c30bad41824c3f77962266b7cd7be32'/>
<id>967d7f898c30bad41824c3f77962266b7cd7be32</id>
<content type='text'>
On OSX `wc` prefixes the output of numbers with whitespace, such
that the `commit_count` would be "SP &lt;NUMBER&gt;". When using that in

    git submodule update --init --depth=$commit_count

the depth would be empty and the number is interpreted as the
pathspec.  Fix this by not using `wc` and rather instruct rev-list
to count.

Another way to fix this is to remove the `=` sign after the
`--depth` argument as then we are allowed to have more than just one
whitespace between `--depth` and the actual number.  Prefer the
solution of rev-list counting as that is expected to be slightly
faster and more self-contained within Git.

Reported-by: Lars Schneider &lt;larsxschneider@gmail.com&gt;
Helped-by: Junio C Hamano &lt;gitster@pobox.com&gt;,
Signed-off-by: Stefan Beller &lt;sbeller@google.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
On OSX `wc` prefixes the output of numbers with whitespace, such
that the `commit_count` would be "SP &lt;NUMBER&gt;". When using that in

    git submodule update --init --depth=$commit_count

the depth would be empty and the number is interpreted as the
pathspec.  Fix this by not using `wc` and rather instruct rev-list
to count.

Another way to fix this is to remove the `=` sign after the
`--depth` argument as then we are allowed to have more than just one
whitespace between `--depth` and the actual number.  Prefer the
solution of rev-list counting as that is expected to be slightly
faster and more self-contained within Git.

Reported-by: Lars Schneider &lt;larsxschneider@gmail.com&gt;
Helped-by: Junio C Hamano &lt;gitster@pobox.com&gt;,
Signed-off-by: Stefan Beller &lt;sbeller@google.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>submodule update: allow '.' for branch value</title>
<updated>2016-08-03T23:13:22+00:00</updated>
<author>
<name>Stefan Beller</name>
<email>sbeller@google.com</email>
</author>
<published>2016-08-03T20:44:04+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/git.git/commit/?id=4d7bc52b178bffe9e484c4dcd92d5353e2ce716f'/>
<id>4d7bc52b178bffe9e484c4dcd92d5353e2ce716f</id>
<content type='text'>
Gerrit has a "superproject subscription" feature[1], that triggers a
commit in a superproject that is subscribed to its submodules.
Conceptually this Gerrit feature can be done on the client side with
Git via (except for raciness, error handling etc):

  while [ true ]; do
    git -C &lt;superproject&gt; submodule update --remote --force
    git -C &lt;superproject&gt; commit -a -m "Update submodules"
    git -C &lt;superproject&gt; push
  done

for each branch in the superproject. To ease the configuration in Gerrit
a special value of "." has been introduced for the submodule.&lt;name&gt;.branch
to mean the same branch as the superproject[2], such that you can create a
new branch on both superproject and the submodule and this feature
continues to work on that new branch.

Now we find projects in the wild with such a .gitmodules file.
The .gitmodules used in these Gerrit projects do not conform
to Gits understanding of how .gitmodules should look like.
This teaches Git to deal gracefully with this syntax as well.

The redefinition of "." does no harm to existing projects unaware of
this change, as "." is an invalid branch name in Git, so we do not
expect such projects to exist.

Signed-off-by: Stefan Beller &lt;sbeller@google.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Gerrit has a "superproject subscription" feature[1], that triggers a
commit in a superproject that is subscribed to its submodules.
Conceptually this Gerrit feature can be done on the client side with
Git via (except for raciness, error handling etc):

  while [ true ]; do
    git -C &lt;superproject&gt; submodule update --remote --force
    git -C &lt;superproject&gt; commit -a -m "Update submodules"
    git -C &lt;superproject&gt; push
  done

for each branch in the superproject. To ease the configuration in Gerrit
a special value of "." has been introduced for the submodule.&lt;name&gt;.branch
to mean the same branch as the superproject[2], such that you can create a
new branch on both superproject and the submodule and this feature
continues to work on that new branch.

Now we find projects in the wild with such a .gitmodules file.
The .gitmodules used in these Gerrit projects do not conform
to Gits understanding of how .gitmodules should look like.
This teaches Git to deal gracefully with this syntax as well.

The redefinition of "." does no harm to existing projects unaware of
this change, as "." is an invalid branch name in Git, so we do not
expect such projects to exist.

Signed-off-by: Stefan Beller &lt;sbeller@google.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>submodule--helper: add remote-branch helper</title>
<updated>2016-08-03T23:11:35+00:00</updated>
<author>
<name>Stefan Beller</name>
<email>sbeller@google.com</email>
</author>
<published>2016-08-03T20:44:03+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/git.git/commit/?id=92bbe7ccf1fedac825f2c6ab4c8de91dc5370fd2'/>
<id>92bbe7ccf1fedac825f2c6ab4c8de91dc5370fd2</id>
<content type='text'>
In a later patch we want to enhance the logic for the branch selection.
Rewrite the current logic to be in C, so we can directly use C when
we enhance the logic.

Signed-off-by: Stefan Beller &lt;sbeller@google.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In a later patch we want to enhance the logic for the branch selection.
Rewrite the current logic to be in C, so we can directly use C when
we enhance the logic.

Signed-off-by: Stefan Beller &lt;sbeller@google.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>submodule-config: keep configured branch around</title>
<updated>2016-08-01T21:42:07+00:00</updated>
<author>
<name>Stefan Beller</name>
<email>sbeller@google.com</email>
</author>
<published>2016-07-29T00:44:07+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/git.git/commit/?id=b5944f3476dbaee15649b0fa02b2b35aaa149dc3'/>
<id>b5944f3476dbaee15649b0fa02b2b35aaa149dc3</id>
<content type='text'>
The branch field will be used in a later patch by `submodule update`.

Signed-off-by: Stefan Beller &lt;sbeller@google.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The branch field will be used in a later patch by `submodule update`.

Signed-off-by: Stefan Beller &lt;sbeller@google.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>submodule--helper: fix usage string for relative-path</title>
<updated>2016-08-01T21:41:53+00:00</updated>
<author>
<name>Stefan Beller</name>
<email>sbeller@google.com</email>
</author>
<published>2016-07-29T00:44:06+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/git.git/commit/?id=2de26ae1dc89236ff5d0d0657b0eb884b6c331b5'/>
<id>2de26ae1dc89236ff5d0d0657b0eb884b6c331b5</id>
<content type='text'>
Internally we call the underscore version of relative_path, but externally
we present an API with no underscores.

Signed-off-by: Stefan Beller &lt;sbeller@google.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Internally we call the underscore version of relative_path, but externally
we present an API with no underscores.

Signed-off-by: Stefan Beller &lt;sbeller@google.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>submodule update: narrow scope of local variable</title>
<updated>2016-08-01T21:41:51+00:00</updated>
<author>
<name>Stefan Beller</name>
<email>sbeller@google.com</email>
</author>
<published>2016-07-29T00:44:05+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/git.git/commit/?id=341238ebc4c95a351db2e047a0ca2340766b48e8'/>
<id>341238ebc4c95a351db2e047a0ca2340766b48e8</id>
<content type='text'>
Signed-off-by: Stefan Beller &lt;sbeller@google.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Stefan Beller &lt;sbeller@google.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>submodule update: respect depth in subsequent fetches</title>
<updated>2016-08-01T21:41:02+00:00</updated>
<author>
<name>Stefan Beller</name>
<email>sbeller@google.com</email>
</author>
<published>2016-07-29T00:44:04+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/git.git/commit/?id=6cbf454a2eaa016efff04bd696dc1ec24b515c11'/>
<id>6cbf454a2eaa016efff04bd696dc1ec24b515c11</id>
<content type='text'>
When depth is given the user may have a reasonable expectation that
any remote operation is using the given depth. Add a test to demonstrate
we still get the desired sha1 even if the depth is too short to
include the actual commit.

Signed-off-by: Stefan Beller &lt;sbeller@google.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When depth is given the user may have a reasonable expectation that
any remote operation is using the given depth. Add a test to demonstrate
we still get the desired sha1 even if the depth is too short to
include the actual commit.

Signed-off-by: Stefan Beller &lt;sbeller@google.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>t7406: future proof tests with hard coded depth</title>
<updated>2016-08-01T21:40:56+00:00</updated>
<author>
<name>Stefan Beller</name>
<email>sbeller@google.com</email>
</author>
<published>2016-07-29T00:44:03+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/git.git/commit/?id=d4470c5a46f0fa965b1916308025d031545005fe'/>
<id>d4470c5a46f0fa965b1916308025d031545005fe</id>
<content type='text'>
The prior hard coded depth was chosen to be exactly the length from the
recorded gitlink to the tip of the remote, so if you add more commits
to the remote before, this test will not test its intention any more.

Signed-off-by: Stefan Beller &lt;sbeller@google.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The prior hard coded depth was chosen to be exactly the length from the
recorded gitlink to the tip of the remote, so if you add more commits
to the remote before, this test will not test its intention any more.

Signed-off-by: Stefan Beller &lt;sbeller@google.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Sync with maint</title>
<updated>2016-07-28T21:21:18+00:00</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2016-07-28T21:21:18+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/git.git/commit/?id=f8f7adce9fc50a11a764d57815602dcb818d1816'/>
<id>f8f7adce9fc50a11a764d57815602dcb818d1816</id>
<content type='text'>
* maint:
  Some fixes for 2.9.3
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* maint:
  Some fixes for 2.9.3
</pre>
</div>
</content>
</entry>
<entry>
<title>Eighth batch of topics for 2.10</title>
<updated>2016-07-28T21:20:48+00:00</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2016-07-28T20:14:53+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/git.git/commit/?id=8213178c86d5583ff809c582d6727ad17b6a0bed'/>
<id>8213178c86d5583ff809c582d6727ad17b6a0bed</id>
<content type='text'>
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
