]> git.ipfire.org Git - thirdparty/git.git/log
thirdparty/git.git
9 years agoMerge branch 'rs/strbuf-getcwd'
Junio C Hamano [Tue, 2 Sep 2014 20:27:45 +0000 (13:27 -0700)] 
Merge branch 'rs/strbuf-getcwd'

Reduce the use of fixed sized buffer passed to getcwd() calls
by introducing xgetcwd() helper.

* rs/strbuf-getcwd:
  use strbuf_add_absolute_path() to add absolute paths
  abspath: convert absolute_path() to strbuf
  use xgetcwd() to set $GIT_DIR
  use xgetcwd() to get the current directory or die
  wrapper: add xgetcwd()
  abspath: convert real_path_internal() to strbuf
  abspath: use strbuf_getcwd() to remember original working directory
  setup: convert setup_git_directory_gently_1 et al. to strbuf
  unix-sockets: use strbuf_getcwd()
  strbuf: add strbuf_getcwd()

9 years agoMerge branch 'ta/pretty-parse-config'
Junio C Hamano [Tue, 2 Sep 2014 20:27:39 +0000 (13:27 -0700)] 
Merge branch 'ta/pretty-parse-config'

* ta/pretty-parse-config:
  pretty.c: make git_pretty_formats_config return -1 on git_config_string failure

9 years agoMerge branch 'bc/archive-pax-header-mode'
Junio C Hamano [Tue, 2 Sep 2014 20:27:12 +0000 (13:27 -0700)] 
Merge branch 'bc/archive-pax-header-mode'

Implementations of "tar" that do not understand an extended pax
header would extract the contents of it in a regular file; make
sure the permission bits of this file follows the same tar.umask
configuration setting.

* bc/archive-pax-header-mode:
  archive: honor tar.umask even for pax headers

9 years agoMerge branch 'pr/remotes-in-hashmap'
Junio C Hamano [Tue, 2 Sep 2014 20:26:37 +0000 (13:26 -0700)] 
Merge branch 'pr/remotes-in-hashmap'

Optimize remotes configuration look-up in a repository with very
many remotes defined.

* pr/remotes-in-hashmap:
  use a hashmap to make remotes faster

9 years agoMerge branch 'jk/pretty-empty-format'
Junio C Hamano [Tue, 2 Sep 2014 20:25:03 +0000 (13:25 -0700)] 
Merge branch 'jk/pretty-empty-format'

"git log --pretty/format=" with an empty format string did not mean
the more obvious "No output whatsoever" but "Use default format",
which was counterintuitive.

* jk/pretty-empty-format:
  pretty: make empty userformats truly empty
  pretty: treat "--format=" as an empty userformat
  revision: drop useless string offset when parsing "--pretty"

9 years agoMerge branch 'ta/config-set'
Junio C Hamano [Tue, 2 Sep 2014 20:24:17 +0000 (13:24 -0700)] 
Merge branch 'ta/config-set'

Add in-core caching layer to let us avoid reading the same
configuration files number of times.

* ta/config-set:
  test-config: add tests for the config_set API
  add `config_set` API for caching config-like files

9 years agoMerge branch 'rs/init-no-duplicate-real-path'
Junio C Hamano [Tue, 2 Sep 2014 20:24:04 +0000 (13:24 -0700)] 
Merge branch 'rs/init-no-duplicate-real-path'

* rs/init-no-duplicate-real-path:
  init: avoid superfluous real_path() calls

9 years agoMerge branch 'mm/config-edit-global'
Junio C Hamano [Tue, 2 Sep 2014 20:23:19 +0000 (13:23 -0700)] 
Merge branch 'mm/config-edit-global'

Start "git config --edit --global" from a skeletal per-user
configuration file contents, instead of a total blank, when the
user does not already have any.  This immediately reduces the need
for a later "Have you forgotten setting core.user?" and we can add
more to the template as we gain more experience.

* mm/config-edit-global:
  commit: advertise config --global --edit on guessed identity
  home_config_paths(): let the caller ignore xdg path
  config --global --edit: create a template file if needed

9 years agoMerge branch 'jc/reopen-lock-file'
Junio C Hamano [Tue, 2 Sep 2014 20:20:12 +0000 (13:20 -0700)] 
Merge branch 'jc/reopen-lock-file'

There are cases where you lock and open to write a file, close it to
show the updated contents to external processes, and then have to
update the file again while still holding the lock, but the lockfile
API lacked support for such an access pattern.

* jc/reopen-lock-file:
  lockfile: allow reopening a closed but still locked file

9 years agoMerge git://github.com/git-l10n/git-po
Junio C Hamano [Fri, 29 Aug 2014 17:18:22 +0000 (10:18 -0700)] 
Merge git://github.com/git-l10n/git-po

* git://github.com/git-l10n/git-po:
  po/TEAMS: add new members to German translation team
  l10n: de.po: translate 38 new messages

9 years agopo/TEAMS: add new members to German translation team
Ralf Thielow [Tue, 26 Aug 2014 16:54:30 +0000 (18:54 +0200)] 
po/TEAMS: add new members to German translation team

Signed-off-by: Ralf Thielow <ralf.thielow@gmail.com>
9 years agol10n: de.po: translate 38 new messages
Ralf Thielow [Fri, 20 Jun 2014 15:22:48 +0000 (17:22 +0200)] 
l10n: de.po: translate 38 new messages

Translate 38 new messages came from git.pot update in fe05e19
(l10n: git.pot: v2.1.0 round 1 (38 new, 9 removed)).

Signed-off-by: Ralf Thielow <ralf.thielow@gmail.com>
9 years agoMerge branch 'jk/diff-tree-t-fix'
Junio C Hamano [Tue, 26 Aug 2014 18:16:26 +0000 (11:16 -0700)] 
Merge branch 'jk/diff-tree-t-fix'

Fix (rarely used) "git diff-tree -t" regression in 2.0.

* jk/diff-tree-t-fix:
  intersect_paths: respect mode in git's tree-sort

9 years agoMerge branch 'jk/pack-shallow-always-without-bitmap'
Junio C Hamano [Tue, 26 Aug 2014 18:16:25 +0000 (11:16 -0700)] 
Merge branch 'jk/pack-shallow-always-without-bitmap'

Reachability bitmaps do not work with shallow operations.
Fixes regression in 2.0.

* jk/pack-shallow-always-without-bitmap:
  pack-objects: turn off bitmaps when we see --shallow lines

9 years agoMerge branch 'jk/fix-profile-feedback-build'
Junio C Hamano [Tue, 26 Aug 2014 18:16:25 +0000 (11:16 -0700)] 
Merge branch 'jk/fix-profile-feedback-build'

Fix profile-feedback build broken in 2.1 for tarball releases.

* jk/fix-profile-feedback-build:
  Makefile: make perf tests optional for profile build

9 years agouse strbuf_add_absolute_path() to add absolute paths
René Scharfe [Mon, 28 Jul 2014 18:34:42 +0000 (20:34 +0200)] 
use strbuf_add_absolute_path() to add absolute paths

Signed-off-by: Rene Scharfe <l.s.r@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
9 years agoabspath: convert absolute_path() to strbuf
René Scharfe [Mon, 28 Jul 2014 18:33:55 +0000 (20:33 +0200)] 
abspath: convert absolute_path() to strbuf

Move most of the code of absolute_path() into the new function
strbuf_add_absolute_path() and in the process transform it to use
struct strbuf and xgetcwd() instead of a PATH_MAX-sized buffer,
which can be too small on some file systems.

Signed-off-by: Rene Scharfe <l.s.r@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
9 years agouse xgetcwd() to set $GIT_DIR
René Scharfe [Mon, 28 Jul 2014 18:31:57 +0000 (20:31 +0200)] 
use xgetcwd() to set $GIT_DIR

Instead of dying of a segmentation fault if getcwd() returns NULL, use
xgetcwd() to make sure to write a useful error message and then exit
in an orderly fashion.

Suggested-by: Jeff King <peff@peff.net>
Signed-off-by: Rene Scharfe <l.s.r@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
9 years agouse xgetcwd() to get the current directory or die
René Scharfe [Mon, 28 Jul 2014 18:30:39 +0000 (20:30 +0200)] 
use xgetcwd() to get the current directory or die

Convert several calls of getcwd() and die() to use xgetcwd() instead.
This way we get rid of fixed-size buffers (which can be too small
depending on the used file system) and gain consistent error messages.

Signed-off-by: Rene Scharfe <l.s.r@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
9 years agowrapper: add xgetcwd()
René Scharfe [Mon, 28 Jul 2014 18:29:50 +0000 (20:29 +0200)] 
wrapper: add xgetcwd()

Add the helper function xgetcwd(), which returns the current directory
or dies.  The returned string has to be free()d after use.

Helped-by: Duy Nguyen <pclouds@gmail.com>
Signed-off-by: Rene Scharfe <l.s.r@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
9 years agoabspath: convert real_path_internal() to strbuf
René Scharfe [Mon, 28 Jul 2014 18:28:30 +0000 (20:28 +0200)] 
abspath: convert real_path_internal() to strbuf

Use strbuf instead of fixed-sized buffers in real_path() in order to
avoid the size limitations of the latter.

Signed-off-by: Rene Scharfe <l.s.r@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
9 years agoabspath: use strbuf_getcwd() to remember original working directory
René Scharfe [Mon, 28 Jul 2014 18:27:34 +0000 (20:27 +0200)] 
abspath: use strbuf_getcwd() to remember original working directory

Store the original working directory in a strbuf instead of in a
fixed-sized buffer, in order to be able to handle longer paths.

Signed-off-by: Rene Scharfe <l.s.r@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
9 years agosetup: convert setup_git_directory_gently_1 et al. to strbuf
René Scharfe [Mon, 28 Jul 2014 18:26:40 +0000 (20:26 +0200)] 
setup: convert setup_git_directory_gently_1 et al. to strbuf

Convert setup_git_directory_gently_1() and its helper functions
setup_explicit_git_dir(), setup_discovered_git_dir() and
setup_bare_git_dir() to use a struct strbuf to hold the current working
directory.  Replacing the PATH_MAX-sized buffer used before removes a
path length limition on some file systems.  The functions are converted
all in one go because they all read and write the variable cwd.

Signed-off-by: Rene Scharfe <l.s.r@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
9 years agoMerge git://github.com/git-l10n/git-po
Junio C Hamano [Mon, 25 Aug 2014 22:12:58 +0000 (15:12 -0700)] 
Merge git://github.com/git-l10n/git-po

* git://github.com/git-l10n/git-po:
  l10n: de.po: improve message when switching branches
  l10n: de.po: fix typo
  po/TEAMS: Add Catalan team
  l10n: Add Catalan translation
  l10n: fr.po (2257t) update for version 2.1.0
  l10n: sv.po: Update Swedish translation (2257t0f0u)
  l10n: vi.po (2257t): Update translation
  l10n: Updated Bulgarian translation of git (2257t,0f,0u)
  l10n: zh_CN: translations for git v2.1.0-rc0
  l10n: git.pot: v2.1.0 round 1 (38 new, 9 removed)
  l10n: Updated Bulgarian translation of git (2247t,0f,0u)
  l10n: Updated Bulgarian translation of git (2228t,0f,0u)
  l10n: Fix more typos in the Swedish translations

9 years agol10n: de.po: improve message when switching branches
Ralf Thielow [Thu, 12 Jun 2014 18:15:55 +0000 (20:15 +0200)] 
l10n: de.po: improve message when switching branches

Suggested-by: Stefan Beller <stefanbeller@gmail.com>
Signed-off-by: Ralf Thielow <ralf.thielow@gmail.com>
9 years agol10n: de.po: fix typo
Ralf Thielow [Wed, 11 Jun 2014 16:10:45 +0000 (18:10 +0200)] 
l10n: de.po: fix typo

Reported-by: Hartmut Henkel
Signed-off-by: Ralf Thielow <ralf.thielow@gmail.com>
9 years agopo/TEAMS: Add Catalan team
Alex Henrie [Sat, 23 Aug 2014 02:10:30 +0000 (20:10 -0600)] 
po/TEAMS: Add Catalan team

Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
9 years agol10n: Add Catalan translation
Alex Henrie [Sat, 23 Aug 2014 02:10:22 +0000 (20:10 -0600)] 
l10n: Add Catalan translation

Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
9 years agointersect_paths: respect mode in git's tree-sort
Jeff King [Wed, 20 Aug 2014 02:14:30 +0000 (22:14 -0400)] 
intersect_paths: respect mode in git's tree-sort

When we do a combined diff, we individually diff against
each parent, and then use intersect_paths to do a parallel
walk through the sorted results and come up with a final
list of interesting paths.

The sort order here is that returned by the diffs, which
means it is in git's tree-order which sorts sub-trees as if
their paths have "/" at the end. When we do our parallel
walk, we need to use a comparison function which provides
the same order.

Since 8518ff8 (combine-diff: optimize combine_diff_path sets
intersection, 2014-01-20), we use a simple strcmp to
compare the pathnames, and get this wrong. It's somewhat
hard to trigger because normally a diff does not produce
tree entries at all, and therefore the sort order is the
same as a strcmp. However, if the "-t" option is used with
the diff, then we will produce diff_filepairs for both trees
and files.

We can use base_name_compare to do the comparison, just as
the tree-diff code does. Even though what we have are not
technically base names (they are full paths within the
tree), the end result is the same (we do not care about
interior slashes at all, only about the final character).

However, since we do not have the length of each path
stored, we take a slight shortcut: if neither of the entries
is a sub-tree then the comparison is equivalent to a strcmp.
This lets us skip the extra strlen calls in the common case
without having to reimplement base_name_compare from
scratch.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
9 years agoMakefile: make perf tests optional for profile build
Jeff King [Tue, 19 Aug 2014 06:12:03 +0000 (02:12 -0400)] 
Makefile: make perf tests optional for profile build

The perf tests need a repository to operate on; if none is
defined, we fall back to the repository containing our build
directory.  That fails, though, for an exported tarball of
git.git, which has no repository.

Since 5d7fd6d we run the perf tests as part of "make
profile". Therefore "make profile" fails out of the box on
released tarballs of v2.1.0.

We can fix this by making the perf tests optional; if they
are skipped, we still run the regular test suite, which
should give a lot of profile data (and is what we used to do
prior to 5d7fd6d anyway).

Signed-off-by: Jeff King <peff@peff.net>
Acked-by: Andi Kleen <ak@linux.intel.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
9 years agoGit 2.1 v2.1.0
Junio C Hamano [Fri, 15 Aug 2014 22:09:12 +0000 (15:09 -0700)] 
Git 2.1

Signed-off-by: Junio C Hamano <gitster@pobox.com>
9 years agotests: fix negated test_i18ngrep calls
Johannes Sixt [Wed, 13 Aug 2014 19:30:11 +0000 (21:30 +0200)] 
tests: fix negated test_i18ngrep calls

The helper function test_i18ngrep pretends that it found the expected
results when it is running under GETTEXT_POISON. For this reason, it must
not be used negated like so

   ! test_i18ngrep foo bar

because the test case would fail under GETTEXT_POISON. The function offers
a special syntax to test that a pattern is *not* found:

   test_i18ngrep ! foo bar

Convert incorrect uses to this syntax.

Signed-off-by: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
9 years agopack-objects: turn off bitmaps when we see --shallow lines
Jeff King [Tue, 12 Aug 2014 04:34:53 +0000 (00:34 -0400)] 
pack-objects: turn off bitmaps when we see --shallow lines

Reachability bitmaps do not work with shallow operations,
because they cache a view of the object reachability that
represents the true objects. Whereas a shallow repository
(or a shallow operation in a repository) is inherently
cutting off the object graph with a graft.

We explicitly disallow the use of bitmaps in shallow
repositories by checking is_repository_shallow(), and we
should continue to do that. However, we also want to
disallow bitmaps when we are serving a fetch to a shallow
client, since we momentarily take on their grafted view of
the world.

It used to be enough to call is_repository_shallow at the
start of pack-objects.  Upload-pack wrote the other side's
shallow state to a temporary file and pointed the whole
pack-objects process at this state with "git --shallow-file",
and from the perspective of pack-objects, we really were
in a shallow repo.  But since b790e0f (upload-pack: send
shallow info over stdin to pack-objects, 2014-03-11), we do
it differently: we send --shallow lines to pack-objects over
stdin, and it registers them itself.

This means that our is_repository_shallow check is way too
early (we have not been told about the shallowness yet), and
that it is insufficient (calling is_repository_shallow is
not enough, as the shallow grafts we register do not change
its return value). Instead, we can just turn off bitmaps
explicitly when we see these lines.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
9 years agoMerge branch 'master' of git://ozlabs.org/~paulus/gitk
Junio C Hamano [Sun, 10 Aug 2014 18:03:03 +0000 (11:03 -0700)] 
Merge branch 'master' of git://ozlabs.org/~paulus/gitk

* 'master' of git://ozlabs.org/~paulus/gitk:
  gitk: Updated Bulgarian translation (302t,0f,0u)
  gitk: Add keybinding to switch to parent commit

9 years agoGit 2.1-rc2 v2.1.0-rc2
Junio C Hamano [Fri, 8 Aug 2014 20:52:16 +0000 (13:52 -0700)] 
Git 2.1-rc2

Signed-off-by: Junio C Hamano <gitster@pobox.com>
9 years agogitk: Updated Bulgarian translation (302t,0f,0u)
Alexander Shopov [Sun, 3 Aug 2014 12:36:43 +0000 (15:36 +0300)] 
gitk: Updated Bulgarian translation (302t,0f,0u)

Signed-off-by: Alexander Shopov <ash@kambanaria.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
9 years agogitk: Add keybinding to switch to parent commit
Max Kirillov [Tue, 8 Jul 2014 20:45:35 +0000 (23:45 +0300)] 
gitk: Add keybinding to switch to parent commit

Signed-off-by: Max Kirillov <max@max630.net>
Signed-off-by: Paul Mackerras <paulus@samba.org>
9 years agoMerge branch 'mb/relnotes-2.1'
Junio C Hamano [Thu, 7 Aug 2014 16:44:17 +0000 (09:44 -0700)] 
Merge branch 'mb/relnotes-2.1'

* mb/relnotes-2.1:
  Release notes: grammatical fixes
  RelNotes: no more check_ref_format micro-optimization

9 years agoRelease notes: grammatical fixes
Marc Branchaud [Tue, 5 Aug 2014 16:50:45 +0000 (12:50 -0400)] 
Release notes: grammatical fixes

Signed-off-by: Marc Branchaud <marcnarc@xiplink.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
9 years agovarious contrib: Fix links in man pages
Stefan Beller [Thu, 7 Aug 2014 14:27:12 +0000 (16:27 +0200)] 
various contrib: Fix links in man pages

Inspired by 2147fa7e (2014-07-31 git-push: fix link in man page),
I grepped through the whole tree searching for 'gitlink:' occurrences.

Signed-off-by: Stefan Beller <stefanbeller@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
9 years agol10n: fr.po (2257t) update for version 2.1.0
Jean-Noel Avila [Tue, 5 Aug 2014 17:23:50 +0000 (19:23 +0200)] 
l10n: fr.po (2257t) update for version 2.1.0

Signed-off-by: Jean-Noel Avila <jn.avila@free.fr>
9 years agoRelNotes: no more check_ref_format micro-optimization
Junio C Hamano [Tue, 5 Aug 2014 18:44:23 +0000 (11:44 -0700)] 
RelNotes: no more check_ref_format micro-optimization

Signed-off-by: Junio C Hamano <gitster@pobox.com>
9 years agoMerge remote-tracking branch 'l10n/vi/vnwildman/master'
Jiang Xin [Tue, 5 Aug 2014 15:07:22 +0000 (23:07 +0800)] 
Merge remote-tracking branch 'l10n/vi/vnwildman/master'

* l10n/vi/vnwildman/master:
  l10n: vi.po (2257t): Update translation

9 years agoMerge branch 'master' of github.com:alshopov/git-po
Jiang Xin [Tue, 5 Aug 2014 14:41:00 +0000 (22:41 +0800)] 
Merge branch 'master' of github.com:alshopov/git-po

* 'master' of github.com:alshopov/git-po:
  l10n: Updated Bulgarian translation of git (2257t,0f,0u)

9 years agol10n: sv.po: Update Swedish translation (2257t0f0u)
Peter Krefting [Tue, 5 Aug 2014 12:49:51 +0000 (13:49 +0100)] 
l10n: sv.po: Update Swedish translation (2257t0f0u)

Signed-off-by: Peter Krefting <peter@softwolves.pp.se>
9 years agol10n: vi.po (2257t): Update translation
Tran Ngoc Quan [Tue, 5 Aug 2014 00:35:56 +0000 (07:35 +0700)] 
l10n: vi.po (2257t): Update translation

Signed-off-by: Tran Ngoc Quan <vnwildman@gmail.com>
9 years agoGit 2.1.0-rc1 v2.1.0-rc1
Junio C Hamano [Mon, 4 Aug 2014 21:05:06 +0000 (14:05 -0700)] 
Git 2.1.0-rc1

Signed-off-by: Junio C Hamano <gitster@pobox.com>
9 years agoMerge branch 'tf/maint-doc-push'
Junio C Hamano [Mon, 4 Aug 2014 21:03:45 +0000 (14:03 -0700)] 
Merge branch 'tf/maint-doc-push'

* tf/maint-doc-push:
  git-push: fix link in man page

9 years agoMerge branch 'ta/doc-config'
Junio C Hamano [Mon, 4 Aug 2014 21:03:25 +0000 (14:03 -0700)] 
Merge branch 'ta/doc-config'

* ta/doc-config:
  add documentation for writing config files

9 years agopretty.c: make git_pretty_formats_config return -1 on git_config_string failure
Tanay Abhra [Mon, 4 Aug 2014 14:41:15 +0000 (07:41 -0700)] 
pretty.c: make git_pretty_formats_config return -1 on git_config_string failure

`git_pretty_formats_config()` continues without checking git_config_string's
return value which can lead to a SEGFAULT. Instead return -1 when
git_config_string fails signalling `git_config()` to die printing the location
of the erroneous variable.

Signed-off-by: Tanay Abhra <tanayabh@gmail.com>
Reviewed-by: Matthieu Moy <Matthieu.Moy@imag.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
9 years agoarchive: honor tar.umask even for pax headers
brian m. carlson [Sun, 3 Aug 2014 03:02:03 +0000 (03:02 +0000)] 
archive: honor tar.umask even for pax headers

git archive's tar format uses extended pax headers to encode metadata
into the archive.  Most tar implementations correctly treat these as
metadata, but some that do not understand the pax format extract these
as files instead.  Apply the tar.umask setting to these entries to
prevent tampering by other users.

Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
9 years agol10n: Updated Bulgarian translation of git (2257t,0f,0u)
Alexander Shopov [Sun, 3 Aug 2014 10:04:51 +0000 (13:04 +0300)] 
l10n: Updated Bulgarian translation of git (2257t,0f,0u)

Sync with tags v2.1.0-rc1 and v2.0.4

Signed-off-by: Alexander Shopov <ash@kambanaria.org>
9 years agol10n: zh_CN: translations for git v2.1.0-rc0
Jiang Xin [Mon, 4 Aug 2014 08:23:15 +0000 (16:23 +0800)] 
l10n: zh_CN: translations for git v2.1.0-rc0

Translate 37 new messages (2257t0f0u) for git v2.1.0-rc0.

Signed-off-by: Jiang Xin <worldhello.net@gmail.com>
9 years agoMerge commit 'bg/alshopov/master'
Jiang Xin [Mon, 4 Aug 2014 08:38:00 +0000 (16:38 +0800)] 
Merge commit 'bg/alshopov/master'

* commit 'bg/alshopov/master':
  l10n: Updated Bulgarian translation of git (2247t,0f,0u)
  l10n: Updated Bulgarian translation of git (2228t,0f,0u)

9 years agoMerge remote-tracking branch 'sv/nafmo/master'
Jiang Xin [Mon, 4 Aug 2014 08:33:18 +0000 (16:33 +0800)] 
Merge remote-tracking branch 'sv/nafmo/master'

* sv/nafmo/master:
  l10n: Fix more typos in the Swedish translations

9 years agol10n: git.pot: v2.1.0 round 1 (38 new, 9 removed)
Jiang Xin [Mon, 4 Aug 2014 06:51:24 +0000 (14:51 +0800)] 
l10n: git.pot: v2.1.0 round 1 (38 new, 9 removed)

Generate po/git.pot from v2.1.0-rc0 for git v2.1.0 l10n round 1.

Signed-off-by: Jiang Xin <worldhello.net@gmail.com>
9 years agol10n: Updated Bulgarian translation of git (2247t,0f,0u)
Alexander Shopov [Sun, 3 Aug 2014 08:16:24 +0000 (11:16 +0300)] 
l10n: Updated Bulgarian translation of git (2247t,0f,0u)

Used make po/git.pot from git-l10n/git-po/master

Signed-off-by: Alexander Shopov <ash@kambanaria.org>
9 years agol10n: Updated Bulgarian translation of git (2228t,0f,0u)
Alexander Shopov [Fri, 27 Jun 2014 12:04:51 +0000 (15:04 +0300)] 
l10n: Updated Bulgarian translation of git (2228t,0f,0u)

Used po/git.pot from git-l10n/git-po/master

Signed-off-by: Alexander Shopov <ash@kambanaria.org>
9 years agogit-push: fix link in man page
Tony Finch [Thu, 31 Jul 2014 15:06:28 +0000 (16:06 +0100)] 
git-push: fix link in man page

Signed-off-by: Tony Finch <dot@dotat.at>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
9 years agoSync with 2.0.4
Junio C Hamano [Wed, 30 Jul 2014 21:25:46 +0000 (14:25 -0700)] 
Sync with 2.0.4

* maint:
  Git 2.0.4
  commit --amend: test specifies authorship but forgets to check

9 years agoUpdate draft release notes to 2.1
Junio C Hamano [Wed, 30 Jul 2014 21:25:14 +0000 (14:25 -0700)] 
Update draft release notes to 2.1

Signed-off-by: Junio C Hamano <gitster@pobox.com>
9 years agoMerge branch 'jk/more-push-completion'
Junio C Hamano [Wed, 30 Jul 2014 21:21:13 +0000 (14:21 -0700)] 
Merge branch 'jk/more-push-completion'

* jk/more-push-completion:
  completion: complete `git push --force-with-lease=`
  completion: add some missing options to `git push`
  completion: complete "unstuck" `git push --recurse-submodules`

9 years agoMerge branch 'sk/mingw-tests-workaround'
Junio C Hamano [Wed, 30 Jul 2014 21:21:12 +0000 (14:21 -0700)] 
Merge branch 'sk/mingw-tests-workaround'

Make tests pass on msysgit by mostly disabling ones that are
infeasible on that platform.

* sk/mingw-tests-workaround:
  t800[12]: work around MSys limitation
  t9902: mingw-specific fix for gitfile link files
  t4210: skip command-line encoding tests on mingw
  MinGW: disable legacy encoding tests
  t0110/MinGW: skip tests that pass arbitrary bytes on the command line
  MinGW: Skip test redirecting to fd 4

9 years agoMerge branch 'sk/mingw-uni-fix-more'
Junio C Hamano [Wed, 30 Jul 2014 21:21:09 +0000 (14:21 -0700)] 
Merge branch 'sk/mingw-uni-fix-more'

Most of these are battle-tested in msysgit and are needed to
complete what has been merged to 'master' already.

* sk/mingw-uni-fix-more:
  Win32: enable color output in Windows cmd.exe
  Win32: patch Windows environment on startup
  Win32: keep the environment sorted
  Win32: use low-level memory allocation during initialization
  Win32: reduce environment array reallocations
  Win32: don't copy the environment twice when spawning child processes
  Win32: factor out environment block creation
  Win32: unify environment function names
  Win32: unify environment case-sensitivity
  Win32: fix environment memory leaks
  Win32: Unicode environment (incoming)
  Win32: Unicode environment (outgoing)
  Revert "Windows: teach getenv to do a case-sensitive search"
  tests: do not pass iso8859-1 encoded parameter

9 years agoMerge branch 'ep/avoid-test-a-o'
Junio C Hamano [Wed, 30 Jul 2014 21:21:05 +0000 (14:21 -0700)] 
Merge branch 'ep/avoid-test-a-o'

* ep/avoid-test-a-o:
  t9814: fix misconversion from test $a -o $b to test $a || test $b

9 years agoGit 2.0.4 v2.0.4
Junio C Hamano [Wed, 30 Jul 2014 21:19:53 +0000 (14:19 -0700)] 
Git 2.0.4

Signed-off-by: Junio C Hamano <gitster@pobox.com>
9 years agopretty: make empty userformats truly empty
Jeff King [Tue, 29 Jul 2014 17:56:48 +0000 (13:56 -0400)] 
pretty: make empty userformats truly empty

If the user provides an empty format with "--format=", we
end up putting in extra whitespace that the user cannot
prevent. This comes from two places:

  1. If the format is missing a terminating newline, we add
     one automatically. This makes sense for --format=%h, but
     not for a truly empty format.

  2. We add an extra newline between the pretty-printed
     format and a diff or diffstat. If the format is empty,
     there's no point in doing so if there's nothing to
     separate.

With this patch, one can get a diff with no other cruft out
of "diff-tree --format= $commit".

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
9 years agopretty: treat "--format=" as an empty userformat
Jeff King [Tue, 29 Jul 2014 17:54:46 +0000 (13:54 -0400)] 
pretty: treat "--format=" as an empty userformat

Until now, we treated "--pretty=" or "--format=" as "give me
the default format". This was not planned nor documented,
but only what happened to work due to our parsing of
"--pretty" (which should give the default format).

Let's instead let these be an actual empty userformat.
Otherwise one must write out the annoyingly long
"--pretty=tformat:" to get the same behavior.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
9 years agorevision: drop useless string offset when parsing "--pretty"
Jeff King [Tue, 29 Jul 2014 17:53:40 +0000 (13:53 -0400)] 
revision: drop useless string offset when parsing "--pretty"

Once upon a time, we parsed pretty options by looking for
"--pretty" at the start of the string, and then feeding the
rest (including an "=") to get_commit_format. Later, commit
48ded91 (log --pretty: do not accept bogus "--prettyshort",
2008-05-25) split this into a separate check for "--pretty"
versus "--pretty=".

However, when parsing "--pretty", we still passed "arg+8" to
get_commit_format. This is useless, since it will always
point to the NUL terminator at the end of the string. We can
simply pass NULL instead; both parameters are treated the
same by get_commit_format.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
9 years agoadd documentation for writing config files
Tanay Abhra [Mon, 28 Jul 2014 10:42:26 +0000 (03:42 -0700)] 
add documentation for writing config files

Replace TODO introduced in commit 9c3c22 with documentation
explaining Git config API functions for writing configuration
files.

Signed-off-by: Tanay Abhra <tanayabh@gmail.com>
Reviewed-by: Matthieu Moy <Matthieu.Moy@grenoble-inp.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
9 years agocommit --amend: test specifies authorship but forgets to check
Fabian Ruch [Wed, 30 Jul 2014 09:45:11 +0000 (11:45 +0200)] 
commit --amend: test specifies authorship but forgets to check

The test case "--amend option copies authorship" specifies that the
git-commit option `--amend` uses the authorship of the replaced
commit for the new commit. Add the omitted check that this property
actually holds.

Signed-off-by: Fabian Ruch <bafain@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
9 years agouse a hashmap to make remotes faster
Patrick Reynolds [Tue, 29 Jul 2014 14:43:39 +0000 (14:43 +0000)] 
use a hashmap to make remotes faster

Remotes are stored as an array, so looking one up or adding one without
duplication is an O(n) operation.  Reading an entire config file full of
remotes is O(n^2) in the number of remotes.  For a repository with tens of
thousands of remotes, the running time can hit multiple minutes.

Hash tables are way faster.  So we add a hashmap from remote name to
struct remote and use it for all lookups.  The time to add a new remote to
a repo that already has 50,000 remotes drops from ~2 minutes to < 1
second.

We retain the old array of remotes so iterators proceed in config-file
order.

Signed-off-by: Patrick Reynolds <patrick.reynolds@github.com>
Reviewed-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
9 years agotest-config: add tests for the config_set API
Tanay Abhra [Mon, 28 Jul 2014 10:10:39 +0000 (03:10 -0700)] 
test-config: add tests for the config_set API

Expose the `config_set` C API as a set of simple commands in order to
facilitate testing. Add tests for the `config_set` API as well as for
`git_config_get_*()` family for the usual config files.

Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
Signed-off-by: Tanay Abhra <tanayabh@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
9 years agoadd `config_set` API for caching config-like files
Tanay Abhra [Mon, 28 Jul 2014 10:10:38 +0000 (03:10 -0700)] 
add `config_set` API for caching config-like files

Currently `git_config()` uses a callback mechanism and file rereads for
config values. Due to this approach, it is not uncommon for the config
files to be parsed several times during the run of a git program, with
different callbacks picking out different variables useful to themselves.

Add a `config_set`, that can be used to construct an in-memory cache for
config-like files that the caller specifies (i.e., files like `.gitmodules`,
`~/.gitconfig` etc.). Add two external functions `git_configset_get_value`
and `git_configset_get_value_multi` for querying from the config sets.
`git_configset_get_value` follows `last one wins` semantic (i.e. if there
are multiple matches for the queried key in the files of the configset the
value returned will be the last entry in `value_list`).
`git_configset_get_value_multi` returns a list of values sorted in order of
increasing priority (i.e. last match will be at the end of the list). Add
type specific query functions like `git_configset_get_bool` and similar.

Add a default `config_set`, `the_config_set` to cache all key-value pairs
read from usual config files (repo specific .git/config, user wide
~/.gitconfig, XDG config and the global /etc/gitconfig). `the_config_set`
is populated using `git_config()`.

Add two external functions `git_config_get_value` and
`git_config_get_value_multi` for querying in a non-callback manner from
`the_config_set`. Also, add type specific query functions that are
implemented as a thin wrapper around the `config_set` API.

Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
Signed-off-by: Tanay Abhra <tanayabh@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
9 years agoinit: avoid superfluous real_path() calls
René Scharfe [Mon, 28 Jul 2014 18:42:05 +0000 (20:42 +0200)] 
init: avoid superfluous real_path() calls

Feeding the result of a real_path() call to real_path() again doesn't
change that result -- the returned path won't get any more real.  Avoid
such a double call in set_git_dir_init() and for the same reason stop
calling real_path() before feeding paths to set_git_work_tree(), as the
latter already takes care of that.

Signed-off-by: Rene Scharfe <l.s.r@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
9 years agounix-sockets: use strbuf_getcwd()
René Scharfe [Mon, 28 Jul 2014 18:25:40 +0000 (20:25 +0200)] 
unix-sockets: use strbuf_getcwd()

Instead of using a PATH_MAX-sized buffer, which can be too small on some
file systems, use strbuf_getcwd(), which handles any path getcwd()
returns.  Also preserve the errno set by strbuf_getcwd() instead of
setting it to ENAMETOOLONG; that way a more appropriate error message
can be shown based on the actual reason for failing.

Signed-off-by: Rene Scharfe <l.s.r@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
9 years agostrbuf: add strbuf_getcwd()
René Scharfe [Mon, 28 Jul 2014 18:24:29 +0000 (20:24 +0200)] 
strbuf: add strbuf_getcwd()

Add strbuf_getcwd(), which puts the current working directory into a
strbuf.  Because it doesn't use a fixed-size buffer it supports
arbitrarily long paths, provided the platform's getcwd() does as well.
At least on Linux and FreeBSD it handles paths longer than PATH_MAX
just fine.

Suggested-by: Karsten Blees <karsten.blees@gmail.com>
Helped-by: Duy Nguyen <pclouds@gmail.com>
Signed-off-by: Rene Scharfe <l.s.r@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
9 years agoMerge branch 'maint'
Junio C Hamano [Mon, 28 Jul 2014 18:31:46 +0000 (11:31 -0700)] 
Merge branch 'maint'

* maint:
  t4013: test diff-tree's --stdin commit formatting
  diff-tree: avoid lookup_unknown_object
  object_as_type: set commit index
  alloc: factor out commit index
  add object_as_type helper for casting objects
  parse_object_buffer: do not set object type
  move setting of object->type to alloc_* functions
  alloc: write out allocator definitions
  alloc.c: remove the alloc_raw_commit_node() function

9 years agot4013: test diff-tree's --stdin commit formatting
Jeff King [Mon, 28 Jul 2014 18:01:57 +0000 (14:01 -0400)] 
t4013: test diff-tree's --stdin commit formatting

Once upon a time, git-log was just "rev-list | diff-tree",
and we did not bother to test it separately. These days git-log
is implemented internally, but we want to make sure that the
rev-list to diff-tree pipeline continues to function. Let's
add a basic sanity test.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
9 years agoMerge branch 'jk/misc-fixes-maint'
Junio C Hamano [Mon, 28 Jul 2014 18:30:41 +0000 (11:30 -0700)] 
Merge branch 'jk/misc-fixes-maint'

* jk/misc-fixes-maint:
  apply: avoid possible bogus pointer
  fix memory leak parsing core.commentchar
  transport: fix leaks in refs_from_alternate_cb
  free ref string returned by dwim_ref
  receive-pack: don't copy "dir" parameter

9 years agot1402: check for refs ending with a dot
Jeff King [Mon, 28 Jul 2014 15:48:11 +0000 (11:48 -0400)] 
t1402: check for refs ending with a dot

This has been illegal since cbdffe4 (check_ref_format(): tighten
refname rules, 2009-03-21), but we never tested it.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
9 years agoRevert "Merge branch 'dt/refs-check-refname-component-sse'"
Junio C Hamano [Mon, 28 Jul 2014 17:41:53 +0000 (10:41 -0700)] 
Revert "Merge branch 'dt/refs-check-refname-component-sse'"

This reverts commit 6f92e5ff3cdc813de8ef5327fd4bad492fb7d6c9, reversing
changes made to a02ad882a17b9d45f63ea448391ac5e9f7948222.

9 years agoRevert "Merge branch 'dt/refs-check-refname-component-sse-fix'"
Junio C Hamano [Mon, 28 Jul 2014 17:41:16 +0000 (10:41 -0700)] 
Revert "Merge branch 'dt/refs-check-refname-component-sse-fix'"

This reverts commit 779c99fd68dcdaff7d996a1985914154a36a272c, reversing
changes made to df4d7d56461c19361a6f32b633e850c7ba6e55e6.

9 years agoMerge branch 'jk/alloc-commit-id-maint' into maint
Junio C Hamano [Mon, 28 Jul 2014 17:35:35 +0000 (10:35 -0700)] 
Merge branch 'jk/alloc-commit-id-maint' into maint

* jk/alloc-commit-id-maint:
  diff-tree: avoid lookup_unknown_object
  object_as_type: set commit index
  alloc: factor out commit index
  add object_as_type helper for casting objects
  parse_object_buffer: do not set object type
  move setting of object->type to alloc_* functions
  alloc: write out allocator definitions
  alloc.c: remove the alloc_raw_commit_node() function

9 years agodiff-tree: avoid lookup_unknown_object
Jeff King [Sun, 13 Jul 2014 06:42:17 +0000 (02:42 -0400)] 
diff-tree: avoid lookup_unknown_object

We generally want to avoid lookup_unknown_object, because it
results in allocating more memory for the object than may be
strictly necessary.

In this case, it is used to check whether we have an
already-parsed object before calling parse_object, to save
us from reading the object from disk. Using lookup_object
would be fine for that purpose, but we can take it a step
further. Since this code was written, parse_object already
learned the "check lookup_object" optimization, so we can
simply call parse_object directly.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
9 years agoobject_as_type: set commit index
Jeff King [Sun, 13 Jul 2014 06:42:12 +0000 (02:42 -0400)] 
object_as_type: set commit index

The point of the "index" field of struct commit is that
every allocated commit would have one. It is supposed to be
an invariant that whenever object->type is set to
OBJ_COMMIT, we have a unique index.

Commit 969eba6 (commit: push commit_index update into
alloc_commit_node, 2014-06-10) covered this case for
newly-allocated commits. However, we may also allocate an
"unknown" object via lookup_unknown_object, and only later
convert it to a commit. We must make sure that we set the
commit index when we switch the type field.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
9 years agoalloc: factor out commit index
Jeff King [Sun, 13 Jul 2014 06:42:08 +0000 (02:42 -0400)] 
alloc: factor out commit index

We keep a static counter to set the commit index on newly
allocated objects. However, since we also need to set the
index on any_objects which are converted to commits, let's
make the counter available as a public function.

While we're moving it, let's make sure the counter is
allocated as an unsigned integer to match the index field in
"struct commit".

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
9 years agoadd object_as_type helper for casting objects
Jeff King [Sun, 13 Jul 2014 06:42:03 +0000 (02:42 -0400)] 
add object_as_type helper for casting objects

When we call lookup_commit, lookup_tree, etc, the logic goes
something like:

  1. Look for an existing object struct. If we don't have
     one, allocate and return a new one.

  2. Double check that any object we have is the expected
     type (and complain and return NULL otherwise).

  3. Convert an object with type OBJ_NONE (from a prior
     call to lookup_unknown_object) to the expected type.

We can encapsulate steps 2 and 3 in a helper function which
checks whether we have the expected object type, converts
OBJ_NONE as appropriate, and returns the object.

Not only does this shorten the code, but it also provides
one central location for converting OBJ_NONE objects into
objects of other types. Future patches will use that to
enforce type-specific invariants.

Since this is a refactoring, we would want it to behave
exactly as the current code. It takes a little reasoning to
see that this is the case:

  - for lookup_{commit,tree,etc} functions, we are just
    pulling steps 2 and 3 into a function that does the same
    thing.

  - for the call in peel_object, we currently only do step 3
    (but we want to consolidate it with the others, as
    mentioned above). However, step 2 is a noop here, as the
    surrounding conditional makes sure we have OBJ_NONE
    (which we want to keep to avoid an extraneous call to
    sha1_object_info).

  - for the call in lookup_commit_reference_gently, we are
    currently doing step 2 but not step 3. However, step 3
    is a noop here. The object we got will have just come
    from deref_tag, which must have figured out the type for
    each object in order to know when to stop peeling.
    Therefore the type will never be OBJ_NONE.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
9 years agoparse_object_buffer: do not set object type
Jeff King [Sun, 13 Jul 2014 06:42:00 +0000 (02:42 -0400)] 
parse_object_buffer: do not set object type

The only way that "obj" can be non-NULL is if it came from
one of the lookup_* functions. These functions always ensure
that the object has the expected type (and return NULL
otherwise), so there is no need for us to set the type.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
9 years agomove setting of object->type to alloc_* functions
Jeff King [Sun, 13 Jul 2014 06:41:55 +0000 (02:41 -0400)] 
move setting of object->type to alloc_* functions

The "struct object" type implements basic object
polymorphism.  Individual instances are allocated as
concrete types (or as a union type that can store any
object), and a "struct object *" can be cast into its real
type after examining its "type" enum.  This means it is
dangerous to have a type field that does not match the
allocation (e.g., setting the type field of a "struct blob"
to "OBJ_COMMIT" would mean that a reader might read past the
allocated memory).

In most of the current code this is not a problem; the first
thing we do after allocating an object is usually to set its
type field by passing it to create_object. However, the
virtual commits we create in merge-recursive.c do not ever
get their type set. This does not seem to have caused
problems in practice, though (presumably because we always
pass around a "struct commit" pointer and never even look at
the type).

We can fix this oversight and also make it harder for future
code to get it wrong by setting the type directly in the
object allocation functions.

This will also make it easier to fix problems with commit
index allocation, as we know that any object allocated by
alloc_commit_node will meet the invariant that an object
with an OBJ_COMMIT type field will have a unique index
number.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
9 years agoalloc: write out allocator definitions
Jeff King [Sun, 13 Jul 2014 06:41:51 +0000 (02:41 -0400)] 
alloc: write out allocator definitions

Because the allocator functions for tree, blobs, etc are all
very similar, we originally used a macro to avoid repeating
ourselves. Since the prior commit, though, the heavy lifting
is done by an inline helper function.  The macro does still
save us a few lines, but at some readability cost.  It
obfuscates the function definitions (and makes them hard to
find via grep).

Much worse, though, is the fact that it isn't used
consistently for all allocators. Somebody coming later may
be tempted to modify DEFINE_ALLOCATOR, but they would miss
alloc_commit_node, which is treated specially.

Let's just drop the macro and write everything out
explicitly.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
9 years agoalloc.c: remove the alloc_raw_commit_node() function
Ramsay Jones [Sun, 13 Jul 2014 06:41:41 +0000 (02:41 -0400)] 
alloc.c: remove the alloc_raw_commit_node() function

In order to encapsulate the setting of the unique commit index, commit
969eba63 ("commit: push commit_index update into alloc_commit_node",
10-06-2014) introduced a (logically private) intermediary allocator
function. However, this function (alloc_raw_commit_node()) was declared
as a public function, which undermines its entire purpose.

Introduce an inline function, alloc_node(), which implements the main
logic of the allocator used by DEFINE_ALLOCATOR, and redefine the macro
in terms of the new function. In addition, use the new function in the
implementation of the alloc_commit_node() allocator, rather than the
intermediary allocator, which can now be removed.

Noticed by sparse ("symbol 'alloc_raw_commit_node' was not declared.
Should it be static?").

Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
9 years agoGit 2.1.0-rc0 v2.1.0-rc0
Junio C Hamano [Sun, 27 Jul 2014 22:22:22 +0000 (15:22 -0700)] 
Git 2.1.0-rc0

Signed-off-by: Junio C Hamano <gitster@pobox.com>
9 years agoMerge branch 'jk/rebase-am-fork-point'
Junio C Hamano [Sun, 27 Jul 2014 22:14:21 +0000 (15:14 -0700)] 
Merge branch 'jk/rebase-am-fork-point'

"git rebase --fork-point" did not filter out patch-identical
commits correctly.

* jk/rebase-am-fork-point:
  rebase: omit patch-identical commits with --fork-point
  rebase--am: use --cherry-pick instead of --ignore-if-in-upstream

9 years agoMerge branch 'cc/replace-graft'
Junio C Hamano [Sun, 27 Jul 2014 22:14:18 +0000 (15:14 -0700)] 
Merge branch 'cc/replace-graft'

"git replace" learned a "--graft" option to rewrite parents of a
commit.

* cc/replace-graft:
  replace: add test for --graft with a mergetag
  replace: check mergetags when using --graft
  replace: add test for --graft with signed commit
  replace: remove signature when using --graft
  contrib: add convert-grafts-to-replace-refs.sh
  Documentation: replace: add --graft option
  replace: add test for --graft
  replace: add --graft option
  replace: cleanup redirection style in tests

9 years agoMerge branch 'jk/stable-prio-queue'
Junio C Hamano [Sun, 27 Jul 2014 22:14:14 +0000 (15:14 -0700)] 
Merge branch 'jk/stable-prio-queue'

* jk/stable-prio-queue:
  t5539: update a flaky test
  paint_down_to_common: use prio_queue
  prio-queue: make output stable with respect to insertion
  prio-queue: factor out compare and swap operations

9 years agot9814: fix misconversion from test $a -o $b to test $a || test $b
Junio C Hamano [Fri, 25 Jul 2014 19:44:18 +0000 (12:44 -0700)] 
t9814: fix misconversion from test $a -o $b to test $a || test $b

Spotted-by: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
9 years agocommit: advertise config --global --edit on guessed identity
Matthieu Moy [Fri, 25 Jul 2014 19:11:36 +0000 (21:11 +0200)] 
commit: advertise config --global --edit on guessed identity

When the user has no user-wide configuration file, it's faster to use the
newly introduced config file template than to run two commands to set
user.name and user.email. Advise this to the user.

The old advice is kept if the user already has a configuration file since
the template feature would not trigger in this case.

Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
9 years agohome_config_paths(): let the caller ignore xdg path
Matthieu Moy [Fri, 25 Jul 2014 19:11:35 +0000 (21:11 +0200)] 
home_config_paths(): let the caller ignore xdg path

The caller can signal that it is not interested in learning
the location of $HOME/.gitconfig by passing global=NULL, but
there is no way to decline the path to the configuration
file based on $XDG_CONFIG_HOME.

Allow the caller to pass xdg=NULL to signal that it is not
interested in the XDG location.

Commit-message-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
9 years agoconfig --global --edit: create a template file if needed
Matthieu Moy [Fri, 25 Jul 2014 19:11:34 +0000 (21:11 +0200)] 
config --global --edit: create a template file if needed

When the user has no ~/.gitconfig file, git config --global --edit used
to launch an editor on an nonexistant file name.

Instead, create a file with a default content before launching the
editor. The template contains only commented-out entries, to save a few
keystrokes for the user. If the values are guessed properly, the user
will only have to uncomment the entries.

Advanced users teaching newbies can create a minimalistic configuration
faster for newbies. Beginners reading a tutorial advising to run "git
config --global --edit" as a first step will be slightly more guided for
their first contact with Git.

Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>