<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/git-pull.sh, branch v2.5.2</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.5.2</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.5.2'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2015-08-25T23:08:58Z</updated>
<entry>
<title>pull: pass upload_pack only when it was given</title>
<updated>2015-08-25T23:08:58Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2015-08-25T23:06:53Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=13e0e28f530ae3e337c95b2e5c524f6904968cc0'/>
<id>urn:sha1:13e0e28f530ae3e337c95b2e5c524f6904968cc0</id>
<content type='text'>
The upload_pack shell variable is initialized to an empty string, so
conditional expansion with ${upload_pack+"$upload_pack"} would not
work very well.  You need a colon there.

Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>pull.sh: quote $upload_pack when passing it to git-fetch</title>
<updated>2015-07-30T21:14:32Z</updated>
<author>
<name>Matthieu Moy</name>
<email>Matthieu.Moy@imag.fr</email>
</author>
<published>2015-07-30T20:40:03Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=22d6857d46de7ca28445c40782ba87a66416790d'/>
<id>urn:sha1:22d6857d46de7ca28445c40782ba87a66416790d</id>
<content type='text'>
The previous code broke for example

  git pull --upload-pack 'echo --foo'

Reported-by: Joey Hess &lt;id@joeyh.name&gt;
Fix-suggested-by: Junio C Hamano &lt;gitster@pobox.com&gt;
Signed-off-by: Matthieu Moy &lt;Matthieu.Moy@imag.fr&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>pull: use git-rev-parse --parseopt for option parsing</title>
<updated>2015-06-02T20:36:23Z</updated>
<author>
<name>Paul Tan</name>
<email>pyokagan@gmail.com</email>
</author>
<published>2015-06-02T14:22:53Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=e3b601da2af53cbb9a63e59113d524a8d946ea12'/>
<id>urn:sha1:e3b601da2af53cbb9a63e59113d524a8d946ea12</id>
<content type='text'>
To enable unambiguous parsing of abbreviated options, bundled short
options, separate form options and to provide consistent usage help, use
git-rev-parse --parseopt for option parsing. With this, simplify the
option parsing code.

Signed-off-by: Paul Tan &lt;pyokagan@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>pull: handle git-fetch's options as well</title>
<updated>2015-06-02T20:36:22Z</updated>
<author>
<name>Paul Tan</name>
<email>pyokagan@gmail.com</email>
</author>
<published>2015-06-02T14:22:52Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=eb2a8d9ed3fca2ba2f617b704992d483605f3bb6'/>
<id>urn:sha1:eb2a8d9ed3fca2ba2f617b704992d483605f3bb6</id>
<content type='text'>
While parsing the command-line arguments, git-pull stops parsing at the
first unrecognized option, assuming that any subsequent options are for
git-fetch, and can thus be kept in the shell's positional parameters
list, so that it can be passed to git-fetch via the expansion of "$@".

However, certain functions in git-pull assume that the positional
parameters do not contain any options:

* error_on_no_merge_candidates() uses the number of positional
  parameters to determine which error message to print out, and will
  thus print the wrong message if git-fetch's options are passed in as
  well.

* the call to get_remote_merge_branch() assumes that the positional
  parameters only contains the optional repo and refspecs, and will
  thus silently fail if git-fetch's options are passed in as well.

* --dry-run is a valid git-fetch option, but if provided after any
  git-fetch options, it is not recognized by git-pull and thus git-pull
  will continue to run the merge or rebase.

Fix these bugs by teaching git-pull to parse git-fetch's options as
well. Add tests to prevent regressions.

This removes the limitation where git-fetch's options have to come after
git-merge's and git-rebase's options on the command line. Update the
documentation to reflect this.

Signed-off-by: Paul Tan &lt;pyokagan@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'pt/pull-ff-vs-merge-ff'</title>
<updated>2015-05-26T20:24:44Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2015-05-26T20:24:43Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=22a1ae6ef2ba77a20113bbee6f706ec47e6440c5'/>
<id>urn:sha1:22a1ae6ef2ba77a20113bbee6f706ec47e6440c5</id>
<content type='text'>
The pull.ff configuration was supposed to override the merge.ff
configuration, but it didn't.

* pt/pull-ff-vs-merge-ff:
  pull: parse pull.ff as a bool or string
  pull: make pull.ff=true override merge.ff
</content>
</entry>
<entry>
<title>Merge branch 'pt/pull-log-n'</title>
<updated>2015-05-26T20:24:43Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2015-05-26T20:24:43Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=14230580af96353b911ec1de85517d71c8cfe6b8'/>
<id>urn:sha1:14230580af96353b911ec1de85517d71c8cfe6b8</id>
<content type='text'>
"git pull --log" and "git pull --no-log" worked as expected, but
"git pull --log=20" did not.

* pt/pull-log-n:
  pull: handle --log=&lt;n&gt;
</content>
</entry>
<entry>
<title>Merge branch 'pt/pull-tags-error-diag'</title>
<updated>2015-05-22T19:41:56Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2015-05-22T19:41:56Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=cc77b996120c548fd52799eee28c802358e260a7'/>
<id>urn:sha1:cc77b996120c548fd52799eee28c802358e260a7</id>
<content type='text'>
There was a dead code that used to handle "git pull --tags" and
show special-cased error message, which was made irrelevant when
the semantics of the option changed back in Git 1.9 days.

* pt/pull-tags-error-diag:
  pull: remove --tags error in no merge candidates case
</content>
</entry>
<entry>
<title>Merge branch 'jc/merge'</title>
<updated>2015-05-19T20:17:57Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2015-05-19T20:17:57Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=bcd1ecd08a644a19adfebb31a72a4e608e077c6d'/>
<id>urn:sha1:bcd1ecd08a644a19adfebb31a72a4e608e077c6d</id>
<content type='text'>
"git merge FETCH_HEAD" learned that the previous "git fetch" could
be to create an Octopus merge, i.e. recording multiple branches
that are not marked as "not-for-merge"; this allows us to lose an
old style invocation "git merge &lt;msg&gt; HEAD $commits..." in the
implementation of "git pull" script; the old style syntax can now
be deprecated.

* jc/merge:
  merge: deprecate 'git merge &lt;message&gt; HEAD &lt;commit&gt;' syntax
  merge: handle FETCH_HEAD internally
  merge: decide if we auto-generate the message early in collect_parents()
  merge: make collect_parents() auto-generate the merge message
  merge: extract prepare_merge_message() logic out
  merge: narrow scope of merge_names
  merge: split reduce_parents() out of collect_parents()
  merge: clarify collect_parents() logic
  merge: small leakfix and code simplification
  merge: do not check argc to determine number of remote heads
  merge: clarify "pulling into void" special case
  t5520: test pulling an octopus into an unborn branch
  t5520: style fixes
  merge: simplify code flow
  merge: test the top-level merge driver
</content>
</entry>
<entry>
<title>pull: parse pull.ff as a bool or string</title>
<updated>2015-05-18T18:22:38Z</updated>
<author>
<name>Paul Tan</name>
<email>pyokagan@gmail.com</email>
</author>
<published>2015-05-18T13:45:42Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=db9bb280ed7df7858a2de5d1d0334114dd837be0'/>
<id>urn:sha1:db9bb280ed7df7858a2de5d1d0334114dd837be0</id>
<content type='text'>
Since b814da8 (pull: add pull.ff configuration, 2014-01-15) git-pull
supported setting --(no-)ff via the pull.ff configuration value.
However, as it only matches the string values of "true" and "false", it
does not support other boolean aliases such as "on", "off", "1", "0".
This is inconsistent with the merge.ff setting, which supports these
aliases.

Fix this by using the bool_or_string_config function to retrieve the
value of pull.ff.

Signed-off-by: Paul Tan &lt;pyokagan@gmail.com&gt;
Reviewed-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: make pull.ff=true override merge.ff</title>
<updated>2015-05-18T18:22:27Z</updated>
<author>
<name>Paul Tan</name>
<email>pyokagan@gmail.com</email>
</author>
<published>2015-05-18T13:45:41Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=eb8dc05c3d364174a6b694e2850ffd6cfe32c6d3'/>
<id>urn:sha1:eb8dc05c3d364174a6b694e2850ffd6cfe32c6d3</id>
<content type='text'>
Since b814da8 (pull: add pull.ff configuration, 2014-01-15), running
git-pull with the configuration pull.ff=false or pull.ff=only is
equivalent to passing --no-ff and --ff-only to git-merge. However, if
pull.ff=true, no switch is passed to git-merge. This leads to the
confusing behavior where pull.ff=false or pull.ff=only is able to
override merge.ff, while pull.ff=true is unable to.

Fix this by adding the --ff switch if pull.ff=true, and add a test to
catch future regressions.

Furthermore, clarify in the documentation that pull.ff overrides
merge.ff.

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