<feed xmlns='http://www.w3.org/2005/Atom'>
<title>user/sven/git.git/git-pull.sh, branch v1.8.3.3</title>
<subtitle>Git
</subtitle>
<id>https://git.stealer.net/cgit.cgi/user/sven/git.git/atom?h=v1.8.3.3</id>
<link rel='self' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/atom?h=v1.8.3.3'/>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/'/>
<updated>2013-07-15T17:35:43Z</updated>
<entry>
<title>Merge branch 'jk/pull-into-dirty-unborn' into maint</title>
<updated>2013-07-15T17:35:43Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2013-07-15T17:35:43Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=d2db8f78c469f4b346a048b5deed7c6fdd4b8d05'/>
<id>urn:sha1:d2db8f78c469f4b346a048b5deed7c6fdd4b8d05</id>
<content type='text'>
"git pull" into nothing trashed "local changes" that were in the
index.

* jk/pull-into-dirty-unborn:
  pull: merge into unborn by fast-forwarding from empty tree
  pull: update unborn branch tip after index
</content>
</entry>
<entry>
<title>pull: merge into unborn by fast-forwarding from empty tree</title>
<updated>2013-06-20T22:51:35Z</updated>
<author>
<name>Thomas Rast</name>
<email>trast@inf.ethz.ch</email>
</author>
<published>2013-06-20T22:38:28Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=b4dc085a8dc2ec2fb5f6366fa672222b807ed655'/>
<id>urn:sha1:b4dc085a8dc2ec2fb5f6366fa672222b807ed655</id>
<content type='text'>
The logic for pulling into an unborn branch was originally
designed to be used on a newly-initialized repository
(d09e79c, git-pull: allow pulling into an empty repository,
2006-11-16).  It thus did not initially deal with
uncommitted changes in the unborn branch.  The case of an
_unstaged_ untracked file was fixed by 4b3ffe5 (pull: do not
clobber untracked files on initial pull, 2011-03-25).
However, it still clobbered existing staged files, both when
the file exists in the merged commit (it will be
overwritten), and when it does not (it will be deleted).

We fix this by doing a two-way merge, where the "current"
side of the merge is an empty tree, and the "target" side is
HEAD (already updated to FETCH_HEAD at this point).  This
amounts to claiming that all work in the index was done vs.
an empty tree, and thus all content of the index is
precious.

Note that this use of read-tree just gives us protection
against overwriting index and working tree changes. It will
not actually result in a 3-way merge conflict in the index.
This is fine, as this is a rare situation, and the conflict
would not be interesting anyway (it must, by definition, be
an add/add conflict with the whole content conflicting). And
it makes it simpler for the user to recover, as they have no
HEAD to "git reset" back to.

Reported-by: Stefan Schüßler &lt;mail@stefanschuessler.de&gt;
Signed-off-by: Thomas Rast &lt;trast@inf.ethz.ch&gt;
Signed-off-by: Jeff King &lt;peff@peff.net&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>pull: update unborn branch tip after index</title>
<updated>2013-06-20T22:51:25Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2013-06-20T22:36:31Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=9f48f2bd9ae8db8cdce3a8e2c9b6dc33b2a55ee1'/>
<id>urn:sha1:9f48f2bd9ae8db8cdce3a8e2c9b6dc33b2a55ee1</id>
<content type='text'>
When commit d09e79c taught git to pull into an unborn
branch, it first updated the unborn branch to point at the
pulled commit, and then used read-tree to update the index
and working tree. That ordering made sense, since any
failure of the latter step would be due to filesystem
errors, and one could then recover with "git reset --hard".

Later, commit 4b3ffe5 added extra safety for existing files
in the working tree by asking read-tree to bail out when it
would overwrite such a file. This error mode is much less
"your pull failed due to random errors" and more like "we
reject this pull because it would lose data". In that case,
it makes sense not to update the HEAD ref, just as a regular
rejected merge would do.

This patch reverses the order of the update-ref and
read-tree calls, so that we do not touch the HEAD ref at all if a
merge is rejected. This also means that we would not update
HEAD in case of a transient filesystem error, but those are
presumably less rare (and one can still recover by repeating
the pull, or by accessing FETCH_HEAD directly).

While we're reorganizing the code, we can drop the "exit 1"
from the end of our command chain. We exit immediately
either way, and just calling exit without an argument will
use the exit code from the last command.

Signed-off-by: Jeff King &lt;peff@peff.net&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>merge/pull: verify GPG signatures of commits being merged</title>
<updated>2013-04-01T02:23:59Z</updated>
<author>
<name>Sebastian Götte</name>
<email>jaseg@physik.tu-berlin.de</email>
</author>
<published>2013-03-31T16:02:24Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=efed0022492b81bf59d29193c4ffe96492dd9e9b'/>
<id>urn:sha1:efed0022492b81bf59d29193c4ffe96492dd9e9b</id>
<content type='text'>
When --verify-signatures is specified on the command-line of git-merge
or git-pull, check whether the commits being merged have good gpg
signatures and abort the merge in case they do not. This allows e.g.
auto-deployment from untrusted repo hosts.

Signed-off-by: Sebastian Götte &lt;jaseg@physik-pool.tu-berlin.de&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>pull: Apply -q and -v options to rebase mode as well</title>
<updated>2013-03-17T06:30:08Z</updated>
<author>
<name>Peter Eisentraut</name>
<email>peter@eisentraut.org</email>
</author>
<published>2013-03-15T02:26:08Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=ce4c4d4ec3df274349f20431c61ed85cea038026'/>
<id>urn:sha1:ce4c4d4ec3df274349f20431c61ed85cea038026</id>
<content type='text'>
git pull passed -q and -v only to git merge, but they can be useful for
git rebase as well, so pass them there, too.

In particular, using -q shuts up the "Already up-to-date." message.
Especially, a new test script runs the same "pull --rebase" twice to
make sure both cases are quiet, when it has something to fetch and
when it is already up to date.

Signed-off-by: Peter Eisentraut &lt;peter@eisentraut.org&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>git-pull: Avoid merge-base on detached head</title>
<updated>2012-10-25T09:32:11Z</updated>
<author>
<name>Phil Hord</name>
<email>hordp@cisco.com</email>
</author>
<published>2012-10-23T20:39:56Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=e980765c59c173e9a10ce1069c763645b87fd50c'/>
<id>urn:sha1:e980765c59c173e9a10ce1069c763645b87fd50c</id>
<content type='text'>
git pull --rebase does some clever tricks to find the base
for $upstream, but it forgets that we may not have any
branch at all.  When this happens, git merge-base reports its
"usage" help in the middle of an otherwise successful
rebase operation, because git-merge is called with one too
few parameters.

Since we do not need the merge-base trick in the case of a
detached HEAD, detect this condition and bypass the clever
trick and the usage noise.

Signed-off-by: Phil Hord &lt;hordp@cisco.com&gt;
Signed-off-by: Jeff King &lt;peff@peff.net&gt;
</content>
</entry>
<entry>
<title>Make git-{pull,rebase} message without tracking information friendlier</title>
<updated>2012-03-05T07:00:57Z</updated>
<author>
<name>Carlos Martín Nieto</name>
<email>cmn@elego.de</email>
</author>
<published>2012-03-04T04:41:26Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=3c02396adc0d8836bccc4fbc95edbb3ca8c1f508'/>
<id>urn:sha1:3c02396adc0d8836bccc4fbc95edbb3ca8c1f508</id>
<content type='text'>
The current message is too long and at too low a level for anybody
to understand it if they don't know about the configuration format
already.

The text about setting up a remote is superfluous and doesn't help
understand or recover from the error that has happened.  Show the
usage more prominently and explain how to set up the tracking
information. If there is only one remote, that name is used instead
of the generic &lt;remote&gt;.

Also simplify the message we print on detached HEAD to remove
unnecessary information which is better left for the documentation.

Signed-off-by: Carlos Martín Nieto &lt;cmn@elego.de&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>"git pull" doesn't know "--edit"</title>
<updated>2012-02-13T03:24:47Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2012-02-11T18:21:03Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=8580830084c8917ac41d18e39dba276b237f598e'/>
<id>urn:sha1:8580830084c8917ac41d18e39dba276b237f598e</id>
<content type='text'>
Ok, so now "git merge" defaults to editing when interactive - lovely. But
when testing that, I noticed that while you can say

   git merge --[no-]edit ..branch..

that does not work with "git pull". You get a message like

  error: unknown option `no-edit'
  usage: git fetch [&lt;options&gt;] [&lt;repository&gt; [&lt;refspec&gt;...]]
     or: git fetch [&lt;options&gt;] &lt;group&gt;
     or: git fetch --multiple [&lt;options&gt;] [(&lt;repository&gt; | &lt;group&gt;)...]
     or: git fetch --all [&lt;options&gt;]

      -v, --verbose         be more verbose
      -q, --quiet           be more quiet
      --all                 fetch from all remotes
  ...

which is because that stupid shell script doesn't know about the new
flags, and just passes it to "git fetch" instead.

Now, I really wanted to just make "git pull" a built-in instead of that
nasty shell script, but I'm lazy. So here's the trivial updates to
git-pull.sh to at least teach it about -e/--edit/--no-edit.

Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'ab/pull-rebase-config'</title>
<updated>2011-12-09T21:37:01Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2011-12-09T21:37:01Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=1ee740e66975adbab080301ebd364e253be3d513'/>
<id>urn:sha1:1ee740e66975adbab080301ebd364e253be3d513</id>
<content type='text'>
* ab/pull-rebase-config:
  pull: introduce a pull.rebase option to enable --rebase
</content>
</entry>
<entry>
<title>pull: introduce a pull.rebase option to enable --rebase</title>
<updated>2011-11-07T16:43:11Z</updated>
<author>
<name>Ævar Arnfjörð Bjarmason</name>
<email>avarab@gmail.com</email>
</author>
<published>2011-11-06T09:50:10Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=6b37dff17f176d7e87efa93b4cf521dd725de247'/>
<id>urn:sha1:6b37dff17f176d7e87efa93b4cf521dd725de247</id>
<content type='text'>
Currently we either need to set branch.&lt;name&gt;.rebase for existing
branches if we'd like "git pull" to mean "git pull --rebase", or have
the forethought of setting "branch.autosetuprebase" before we create
the branch.

Introduce a "pull.rebase" option to globally configure "git pull" to
mean "git pull --rebase" for any branch.

This option will be considered at a lower priority than
branch.&lt;name&gt;.rebase, i.e. we could set pull.rebase=true and
branch.&lt;name&gt;.rebase=false and the latter configuration option would
win.

Reviewed-by: Sverre Rabbelier &lt;srabbelier@gmail.com&gt;
Reviewed-by: Fernando Vezzosi &lt;buccia@repnz.net&gt;
Reviewed-by: Eric Herman &lt;eric@freesa.org&gt;
Signed-off-by: Ævar Arnfjörð Bjarmason &lt;avarab@gmail.com&gt;
Liked-by: Johannes Schindelin &lt;Johannes.Schindelin@gmx.de&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
</feed>
