<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/builtin/pull.c, branch v2.34.2</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.34.2</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.34.2'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2021-11-23T22:48:04Z</updated>
<entry>
<title>Merge branch 'ev/pull-already-up-to-date-is-noop' into maint</title>
<updated>2021-11-23T22:48:04Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2021-11-23T22:48:04Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=ad03180c5cf233b2de6b7e3388d96d2126d7a5d9'/>
<id>urn:sha1:ad03180c5cf233b2de6b7e3388d96d2126d7a5d9</id>
<content type='text'>
"git pull" with any strategy when the other side is behind us
should succeed as it is a no-op, but doesn't.

* ev/pull-already-up-to-date-is-noop:
  pull: should be noop when already-up-to-date
</content>
</entry>
<entry>
<title>pull: should be noop when already-up-to-date</title>
<updated>2021-11-18T22:38:53Z</updated>
<author>
<name>Erwin Villejo</name>
<email>erwin.villejo@gmail.com</email>
</author>
<published>2021-11-17T07:55:50Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=ea1954af771253660cd84dc73b8f2832327c9c02'/>
<id>urn:sha1:ea1954af771253660cd84dc73b8f2832327c9c02</id>
<content type='text'>
The already-up-to-date pull bug was fixed for --ff-only but it did not
include the case where --ff or --ff-only are not specified. This updates
the --ff-only fix to include the case where --ff or --ff-only are not
specified in command line flags or config.

Signed-off-by: Erwin Villejo &lt;erwin.villejo@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'jc/fix-pull-ff-only-when-already-up-to-date'</title>
<updated>2021-11-10T23:01:19Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2021-11-10T23:01:19Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=7c7cf62c485f527bee6d3eb7e37dcfbf8064cab2'/>
<id>urn:sha1:7c7cf62c485f527bee6d3eb7e37dcfbf8064cab2</id>
<content type='text'>
"git pull --ff-only" and "git pull --rebase --ff-only" should make
it a no-op to attempt pulling from a remote that is behind us, but
instead the command errored out by saying it was impossible to
fast-forward, which may technically be true, but not a useful thing
to diagnose as an error.  This has been corrected.

* jc/fix-pull-ff-only-when-already-up-to-date:
  pull: --ff-only should make it a noop when already-up-to-date
</content>
</entry>
<entry>
<title>Merge branch 'ar/fix-git-pull-no-verify'</title>
<updated>2021-11-04T19:07:46Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2021-11-04T19:07:46Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=a876f0b95c95d58436045454ea7c8b51c5f96c2e'/>
<id>urn:sha1:a876f0b95c95d58436045454ea7c8b51c5f96c2e</id>
<content type='text'>
"git pull --no-verify" did not affect the underlying "git merge".

* ar/fix-git-pull-no-verify:
  pull: honor --no-verify and do not call the commit-msg hook
</content>
</entry>
<entry>
<title>pull: --ff-only should make it a noop when already-up-to-date</title>
<updated>2021-10-29T07:15:39Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2021-10-20T17:28:44Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=361cb52383fb986f76a34506bdec9a1dd11133f0'/>
<id>urn:sha1:361cb52383fb986f76a34506bdec9a1dd11133f0</id>
<content type='text'>
Earlier, we made sure that "git pull --ff-only" (and "git -c
pull.ff=only pull") errors out when our current HEAD is not an
ancestor of the tip of the history we are merging, but the condition
to trigger the error was implemented incorrectly.

Imagine you forked from a remote branch, built your history on top
of it, and then attempted to pull from them again.  If they have not
made any update in the meantime, our current HEAD is obviously not
their ancestor, and this new error triggers.

Without the --ff-only option, we just report that there is no need
to pull; we did the same historically with --ff-only, too.

Make sure we do not fail with the recently added check to restore
the historical behaviour.

Reported-by: Kenneth Arnold &lt;ka37@calvin.edu&gt;
Helped-by: Jeff King &lt;peff@peff.net&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>pull: honor --no-verify and do not call the commit-msg hook</title>
<updated>2021-10-28T16:52:09Z</updated>
<author>
<name>Alex Riesen</name>
<email>raa.lkml@gmail.com</email>
</author>
<published>2021-10-28T15:46:19Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=47bfdfb3fd3b4752d2292a6744fae9abe37b8f1e'/>
<id>urn:sha1:47bfdfb3fd3b4752d2292a6744fae9abe37b8f1e</id>
<content type='text'>
The option was incorrectly auto-translated to "--no-verify-signatures",
which causes the unexpected effect of the hook being called.
And an even more unexpected effect of disabling verification of signatures.

The manual page describes the option to behave same as the similarly
named option of "git merge", which seems to be the original intention
of this option in the "pull" command.

Signed-off-by: Alexander Riesen &lt;raa.lkml@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'js/retire-preserve-merges'</title>
<updated>2021-10-18T22:47:56Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2021-10-18T22:47:56Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=223a1bfb5821387981c700654e4edd2443c5a7fc'/>
<id>urn:sha1:223a1bfb5821387981c700654e4edd2443c5a7fc</id>
<content type='text'>
The "--preserve-merges" option of "git rebase" has been removed.

* js/retire-preserve-merges:
  sequencer: restrict scope of a formerly public function
  rebase: remove a no-longer-used function
  rebase: stop mentioning the -p option in comments
  rebase: remove obsolete code comment
  rebase: drop the internal `rebase--interactive` command
  git-svn: drop support for `--preserve-merges`
  rebase: drop support for `--preserve-merges`
  pull: remove support for `--rebase=preserve`
  tests: stop testing `git rebase --preserve-merges`
  remote: warn about unhandled branch.&lt;name&gt;.rebase values
  t5520: do not use `pull.rebase=preserve`
</content>
</entry>
<entry>
<title>Merge branch 'js/run-command-close-packs'</title>
<updated>2021-09-20T22:20:45Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2021-09-20T22:20:45Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=c042ad5ad58d4e43aadc806850e76fef73848d2c'/>
<id>urn:sha1:c042ad5ad58d4e43aadc806850e76fef73848d2c</id>
<content type='text'>
The run-command API has been updated so that the callers can easily
ask the file descriptors open for packfiles to be closed immediately
before spawning commands that may trigger auto-gc.

* js/run-command-close-packs:
  Close object store closer to spawning child processes
  run_auto_maintenance(): implicitly close the object store
  run-command: offer to close the object store before running
  run-command: prettify the `RUN_COMMAND_*` flags
  pull: release packs before fetching
  commit-graph: when closing the graph, also release the slab
</content>
</entry>
<entry>
<title>Close object store closer to spawning child processes</title>
<updated>2021-09-09T19:56:11Z</updated>
<author>
<name>Johannes Schindelin</name>
<email>johannes.schindelin@gmx.de</email>
</author>
<published>2021-09-09T09:47:08Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=c4dee2c0851f3a6b202afd2c9d979ed417f4bcdc'/>
<id>urn:sha1:c4dee2c0851f3a6b202afd2c9d979ed417f4bcdc</id>
<content type='text'>
In many cases where we spawned child processes that _may_ trigger a
repack, we explicitly closed the object store first (so that the
`repack` process can delete the `.pack` files, which would otherwise not
be possible on Windows since files cannot be deleted as long as they as
still in use).

Wherever possible, we now use the new `close_object_store` bit of the
`run_command()` API, to delay closing the object store even further.
This makes the code easier to maintain because it is now more obvious
that we only release those file handles because of those child
processes.

Signed-off-by: Johannes Schindelin &lt;johannes.schindelin@gmx.de&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>pull: release packs before fetching</title>
<updated>2021-09-08T19:17:15Z</updated>
<author>
<name>Johannes Schindelin</name>
<email>johannes.schindelin@gmx.de</email>
</author>
<published>2021-09-08T08:29:31Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=7e44ff7a3983ad0c7be5c9edcfea2e8355ce9a65'/>
<id>urn:sha1:7e44ff7a3983ad0c7be5c9edcfea2e8355ce9a65</id>
<content type='text'>
On Windows, files cannot be removed nor renamed if there are still
handles held by a process. To remedy that, we try to release all open
handles to any `.pack` file before e.g. repacking (which would want to
remove the original `.pack` file(s) after it is done).

Since the `read_cache_unmerged()` and/or the `get_oid()` call in `git
pull` can cause `.pack` files to be opened, we need to release the open
handles before calling `git fetch`: the latter process might want to
spawn an auto-gc, which in turn might want to repack the objects.

This commit is similar in spirit to 5bdece0d705 (gc/repack: release
packs when needed, 2018-12-15).

This fixes https://github.com/git-for-windows/git/issues/3336.

Signed-off-by: Johannes Schindelin &lt;johannes.schindelin@gmx.de&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
</feed>
