Commit graph

35155 commits

Author SHA1 Message Date
Jeff King 62f162f8e7 rev-parse: be more careful with munging arguments
When rev-parse looks at whether an argument like "foo..bar" or
"foobar^@" is a difference or parent-shorthand, it internally
munges the arguments so that it can pass the individual rev
arguments to get_sha1(). However, we do not consistently un-munge
the result.

For cases where we do not match (e.g., "doesnotexist..HEAD"), we
would then want to try to treat the argument as a filename.
try_difference gets() this right, and always unmunges in this case.
However, try_parent_shorthand() never unmunges, leading to incorrect
error messages, or even incorrect results:

  $ git rev-parse foobar^@
  foobar
  fatal: ambiguous argument 'foobar': unknown revision or path not in the working tree.
  Use '--' to separate paths from revisions, like this:
  'git <command> [<revision>...] -- [<file>...]'

  $ >foobar
  $ git rev-parse foobar^@
  foobar

For cases where we do match, neither function unmunges. This does
not currently matter, since we are done with the argument. However,
a future patch will do further processing, and this prepares for
it. In addition, it's simply a confusing interface for some cases to
modify the const argument, and others not to.

Signed-off-by: Jeff King <peff@peff.net>
Reviewed-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-12-09 14:39:16 -08:00
Jeff King 1418567381 rev-parse: correctly diagnose revision errors before "--"
Rev-parse understands that a "--" may separate revisions and
filenames, and that anything after the "--" is taken as-is.
However, it does not understand that anything before the
token must be a revision (which is the usual rule
implemented by the setup_revisions parser).

Since rev-parse prefers revisions to files when parsing
before the "--", we end up with the correct result (if such
an argument is a revision, we parse it as one, and if it is
not, it is an error either way).  However, we misdiagnose
the errors:

  $ git rev-parse foobar -- >/dev/null
  fatal: ambiguous argument 'foobar': unknown revision or path not in the working tree.
  Use '--' to separate paths from revisions, like this:
  'git <command> [<revision>...] -- [<file>...]'

  $ >foobar
  $ git rev-parse foobar -- >/dev/null
  fatal: bad flag '--' used after filename

In both cases, we should know that the real error is that
"foobar" is meant to be a revision, but could not be
resolved.

Signed-off-by: Jeff King <peff@peff.net>
Reviewed-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-12-09 11:01:23 -08:00
Junio C Hamano a155a5f075 Git 1.8.5.1
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-12-03 11:16:56 -08:00
Nick Townsend 2951add0e9 ref-iteration doc: add_submodule_odb() returns 0 for success
The usage sample of add_submodule_odb() function in the Submodules
section expects non-zero return value for success, but the function
actually reports success with zero.

Helped-by: René Scharfe <l.s.r@web.de>
Reviewed-by: Heiko Voigt <hvoigt@hvoigt.net>
Signed-off-by: Nick Townsend <nick.townsend@mac.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-12-03 10:40:40 -08:00
Junio C Hamano be38bee862 Sync with 1.8.4.5 2013-12-02 15:34:44 -08:00
Junio C Hamano 2f93541d88 Git 1.8.4.5
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-12-02 15:33:30 -08:00
Junio C Hamano ac1fbbda20 submodule: do not copy unknown update mode from .gitmodules
When submodule.$name.update is given as hint from the upstream in
the .gitmodules file, we used to blindly copy it to .git/config,
unless there already is a value defined for the submodule.

However, there is no reason to expect that the update mode hinted by
the upstream is available in the version of Git the user is using,
and a really custom "!cmd" prepared by an upstream person running on
Linux may not even be available to a user on Windows.  It is simply
irresponsible to copy the setting blindly and to attempt to use it
during a later "submodule update" without validating it first.

Just show the suggested value to the diagnostic output, and set the
value to 'none' in the configuration, if it is not one of the ones
that are known to be supported by this version of Git.

Helped-by: Jens Lehmann <Jens.Lehmann@web.de>
Helped-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-12-02 13:48:06 -08:00
Junio C Hamano d2446dfd7f Git 1.8.5
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-11-27 12:14:45 -08:00
Junio C Hamano 4a3fc52d34 Sync with maint
* maint:
  remote-hg: don't decode UTF-8 paths into Unicode objects
2013-11-27 12:13:29 -08:00
Richard Hansen 5c1d2e8af9 remote-hg: don't decode UTF-8 paths into Unicode objects
The internal mercurial API expects ordinary 8-bit string objects, not
Unicode string objects.  With this change, the test-hg.sh unit tests
pass again.

Signed-off-by: Richard Hansen <rhansen@bbn.com>
Reviewed-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-11-27 12:09:50 -08:00
Junio C Hamano c302941cd7 Merge branch 'rh/remote-hg-bzr-updates' (early part)
Unbreaks a recent breakage due to use of unquote-c-style.

This may need to be cherry-picked down to 1.8.4.x series.

* 'rh/remote-hg-bzr-updates' (early part):
  remote-hg: don't decode UTF-8 paths into Unicode objects
2013-11-25 08:20:02 -08:00
Junio C Hamano 5fd09df393 Git 1.8.5-rc3
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-11-20 11:27:26 -08:00
Junio C Hamano 039a6d2463 Sync with 1.8.4.4 2013-11-20 11:26:59 -08:00
Junio C Hamano becb4336cb Git 1.8.4.4
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-11-20 11:26:08 -08:00
Junio C Hamano a39afc08cb Merge branch 'mb/relnotes-1.8.5-fix'
* mb/relnotes-1.8.5-fix:
  RelNotes: spelling & grammar fixes
2013-11-20 11:15:25 -08:00
Marc Branchaud 569fb49fce RelNotes: spelling & grammar fixes
Signed-off-by: Marc Branchaud <marcnarc@xiplink.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-11-18 14:35:55 -08:00
Junio C Hamano c6f1b920ac Merge branch 'nd/literal-pathspecs'
Fixes a regression on 'master' since v1.8.4.

* nd/literal-pathspecs:
  pathspec: stop --*-pathspecs impact on internal parse_pathspec() uses
2013-11-18 14:31:29 -08:00
Richard Hansen c939d24167 remote-hg: don't decode UTF-8 paths into Unicode objects
The internal mercurial API expects ordinary 8-bit string objects, not
Unicode string objects.  With this change, the test-hg.sh unit tests
pass again.

Signed-off-by: Richard Hansen <rhansen@bbn.com>
Reviewed-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-11-18 13:45:56 -08:00
Junio C Hamano 33da0c9c3c Merge branch 'maint'
Hotfix for recent regression while talking to upload-pack
in a repository with many symbolic refs.

* maint:
  Revert "upload-pack: send non-HEAD symbolic refs"
2013-11-18 12:25:28 -08:00
Junio C Hamano ab930f0296 Merge branch 'jx/branch-vv-always-compare-with-upstream'
Hot-fix for a regression.

* jx/branch-vv-always-compare-with-upstream:
  branch: fix --verbose output column alignment
2013-11-18 12:24:49 -08:00
Torstein Hegge 6b364d48f2 branch: fix --verbose output column alignment
Commit f2e0873 (branch: report invalid tracking branch as gone) removed
an early return from fill_tracking_info() in the path taken when 'git
branch -v' lists a branch in sync with its upstream. This resulted in an
unconditionally added space in front of the subject line:

    $ git branch -v
    * master f5eb3da  commit pushed to upstream
      topic  f935eb6 unpublished topic

Instead, only add the trailing space if a decoration have been added.

To catch this kind of whitespace breakage in the tests, be a bit less
smart when filtering the output through sed.

Signed-off-by: Torstein Hegge <hegge@resisty.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-11-18 11:24:08 -08:00
Junio C Hamano d007dbf7d6 Revert "upload-pack: send non-HEAD symbolic refs"
This reverts commit 5e7dcad771cb873e278a0571b46910d7c32e2f6c; there
may be unbounded number of symbolic refs in the repository, but the
capability header line in the on-wire protocol has a rather low
length limit.
2013-11-18 10:15:45 -08:00
Junio C Hamano 03973056a0 Git 1.8.5-rc2
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-11-13 12:59:31 -08:00
Junio C Hamano 706150404d Merge git://github.com/git-l10n/git-po
* git://github.com/git-l10n/git-po:
  l10n: de.po: improve error message when pushing to unknown upstream
  l10n: de.po: translate 68 new messages
  po/TEAMS: update Thomas Rast's email address
  l10n: Update Swedish translation (2194t0f0u)
  l10n: fr.po 2194/1294 messages translated
  l10n: zh_CN.po: translate 68 messages (2194t0f0u)
  l10n: vi.po (2194t): Update and minor fix
  l10n: git.pot: v1.8.5 round 1 (68 new, 9 removed)
2013-11-12 11:26:11 -08:00
Jason St. John 0ffa154b5b Correct word usage of "timezone" in "Documentation" directory
"timezone" is two words, not one (i.e. "time zone" is correct).

Correct this in these files:
-- date-formats.txt
-- git-blame.txt
-- git-cvsimport.txt
-- git-fast-import.txt
-- git-svn.txt
-- gitweb.conf.txt
-- rev-list-options.txt

Signed-off-by: Jason St. John <jstjohn@purdue.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-11-12 10:47:17 -08:00
Ralf Thielow 1f6fb7ffc3 l10n: de.po: improve error message when pushing to unknown upstream
Signed-off-by: Ralf Thielow <ralf.thielow@gmail.com>
Acked-by: Thomas Rast <tr@thomasrast.ch>
2013-11-12 06:31:15 +01:00
Ralf Thielow 1d38363d86 l10n: de.po: translate 68 new messages
Translate 68 new messages came from git.pot update in 727b957
(l10n: git.pot: v1.8.5 round 1 (68 new, 9 removed)).

Signed-off-by: Ralf Thielow <ralf.thielow@gmail.com>
Acked-by: Thomas Rast <tr@thomasrast.ch>
2013-11-12 06:31:15 +01:00
Ralf Thielow 1b12df5262 po/TEAMS: update Thomas Rast's email address
Signed-off-by: Ralf Thielow <ralf.thielow@gmail.com>
Acked-by: Thomas Rast <tr@thomasrast.ch>
2013-11-12 06:31:15 +01:00
Jiang Xin 86fe7c0117 Merge remote-tracking branch 'sv/nafmo/master'
* sv/nafmo/master:
  l10n: Update Swedish translation (2194t0f0u)
2013-11-10 08:48:23 +08:00
Peter Krefting 1f32de1e14 l10n: Update Swedish translation (2194t0f0u)
And fix a typo.

Signed-off-by: Peter Krefting <peter@softwolves.pp.se>
2013-11-09 19:08:23 +01:00
Jean-Noel Avila eadd122b5e l10n: fr.po 2194/1294 messages translated
Signed-off-by: Jean-Noel Avila <jn.avila@free.fr>
Signed-off-by: Sebastien Helleu <flashcode@flashtux.org>
2013-11-08 23:27:57 +01:00
Junio C Hamano 0ecd94d7d7 Sync with 1.8.4.3 2013-11-08 12:08:43 -08:00
Junio C Hamano d7d2c87955 Git 1.8.4.3
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-11-08 12:06:19 -08:00
Junio C Hamano cdc0c0f520 Merge branch 'jn/test-prereq-perl-doc' into maint
The interaction between use of Perl in our test suite and NO_PERL
has been clarified a bit.

* jn/test-prereq-perl-doc:
  t/README: tests can use perl even with NO_PERL
2013-11-08 12:01:58 -08:00
Junio C Hamano 4bc3d3fca0 Merge branch 'ap/remote-hg-unquote-cquote' into maint
A fast-import stream expresses a pathname with funny characters by
quoting them in C style; remote-hg remote helper (in contrib/)
forgot to unquote such a path.

* ap/remote-hg-unquote-cquote:
  remote-hg: unquote C-style paths when exporting
2013-11-08 12:01:14 -08:00
Junio C Hamano 9196a2f8bd Merge branch 'jc/upload-pack-send-symref' into maint
One long-standing flaw in the pack transfer protocol used by "git
clone" was that there was no way to tell the other end which branch
"HEAD" points at, and the receiving end needed to guess.  A new
capability has been defined in the pack protocol to convey this
information so that cloning from a repository with more than one
branches pointing at the same commit where the HEAD is at now
reliably sets the initial branch in the resulting repository.

* jc/upload-pack-send-symref:
  t5570: Update for clone-progress-to-stderr branch
  t5570: Update for symref capability
  clone: test the new HEAD detection logic
  connect: annotate refs with their symref information in get_remote_head()
  connect.c: make parse_feature_value() static
  upload-pack: send non-HEAD symbolic refs
  upload-pack: send symbolic ref information as capability
  upload-pack.c: do not pass confusing cb_data to mark_our_ref()
  t5505: fix "set-head --auto with ambiguous HEAD" test
2013-11-08 11:38:00 -08:00
Junio C Hamano e5becd042f Merge branch 'jk/http-auth-redirects' into maint
We did not handle cases where http transport gets redirected during
the authorization request (e.g. from http:// to https://).

* jk/http-auth-redirects:
  http.c: Spell the null pointer as NULL
  remote-curl: rewrite base url from info/refs redirects
  remote-curl: store url as a strbuf
  remote-curl: make refs_url a strbuf
  http: update base URLs when we see redirects
  http: provide effective url to callers
  http: hoist credential request out of handle_curl_result
  http: refactor options to http_get_*
  http_request: factor out curlinfo_strbuf
  http_get_file: style fixes
2013-11-08 11:37:26 -08:00
Junio C Hamano 867b1c1bf6 Sync with maint
* maint:
  Start preparing for 1.8.4.3
  gitignore.txt: fix documentation of "**" patterns
2013-11-07 14:41:25 -08:00
Junio C Hamano 486b65a4c3 Start preparing for 1.8.4.3
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-11-07 14:39:47 -08:00
Junio C Hamano 8edf8c0a9b Merge branch 'sc/doc-howto-dumb-http' into maint
An ancient How-To on serving Git repositories on an HTTP server
lacked a warning that it has been mostly superseded with more
modern way.

* sc/doc-howto-dumb-http:
  doc/howto: warn about (dumb)http server document being too old
2013-11-07 14:37:39 -08:00
Junio C Hamano 5022b58e58 Merge branch 'vd/doc-unpack-objects' into maint
The synopsis section of "git unpack-objects" documentation has been
clarified a bit.

* vd/doc-unpack-objects:
  Documentation: "pack-file" is not literal in unpack-objects
  Documentation: restore a space in unpack-objects usage
2013-11-07 14:37:36 -08:00
Junio C Hamano 4ccf2f506c Merge branch 'jk/subtree-install-fix' into maint
We did not generate HTML version of documentation to "git subtree"
in contrib/.

* jk/subtree-install-fix:
  subtree: add makefile target for html docs
2013-11-07 14:37:17 -08:00
Junio C Hamano 46992b5411 Merge branch 'hn/log-graph-color-octopus' into maint
Coloring around octopus merges in "log --graph" output was screwy.

* hn/log-graph-color-octopus:
  graph: fix coloring around octopus merges
2013-11-07 14:37:11 -08:00
Junio C Hamano 07c55c00a5 Merge branch 'mm/checkout-auto-track-fix' into maint
"git checkout topic", when there is not yet a local "topic" branch
but there is a unique remote-tracking branch for a remote "topic"
branch, pretended as if "git checkout -t -b topic remote/$r/topic"
(for that unique remote $r) was run. This hack however was not
implemented for "git checkout topic --".

* mm/checkout-auto-track-fix:
  checkout: proper error message on 'git checkout foo bar --'
  checkout: allow dwim for branch creation for "git checkout $branch --"
2013-11-07 14:36:59 -08:00
Junio C Hamano 9ad3f74cb6 Merge branch 'sg/prompt-svn-remote-fix' into maint
Bash prompting code to deal with an SVN remote as an upstream
were coded in a way not supported by older Bash versions (3.x).

* sg/prompt-svn-remote-fix:
  bash prompt: don't use '+=' operator in show upstream code path
2013-11-07 14:36:45 -08:00
Junio C Hamano 0ceb7537c1 Merge branch 'jk/split-broken-ident' into maint
The fall-back parsing of commit objects with broken author or
committer lines were less robust than ideal in picking up the
timestamps.

* jk/split-broken-ident:
  split_ident: parse timestamp from end of line
2013-11-07 14:34:51 -08:00
Junio C Hamano 0faff47d7b Merge branch 'jc/revision-range-unpeel' into maint
"git rev-list --objects ^v1.0^ v1.0" gave v1.0 tag itself in the
output, but "git rev-list --objects v1.0^..v1.0" did not.

* jc/revision-range-unpeel:
  revision: do not peel tags used in range notation
2013-11-07 14:34:14 -08:00
Karsten Blees 8447dc8904 gitignore.txt: fix documentation of "**" patterns
"**" means bold in ASCIIDOC, so we need to escape it.

Signed-off-by: Karsten Blees <blees@dcon.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-11-07 10:49:52 -08:00
Junio C Hamano 6ba01babcd Git 1.8.5-rc1
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-11-06 14:35:19 -08:00
Junio C Hamano 152a9c17a8 Merge branch 'fc/trivial'
A random collection of style fixes and minor doc updates.

* fc/trivial:
  setup: trivial style fixes
  run-command: trivial style fixes
  diff: trivial style fix
  revision: trivial style fixes
  pretty: trivial style fix
  describe: trivial style fixes
  transport-helper: trivial style fix
  sha1-name: trivial style cleanup
  branch: trivial style fix
  revision: add missing include
  doc/pull: clarify the illustrations
  t: replace pulls with merges
  merge: simplify ff-only option
2013-11-06 14:34:43 -08:00