git
10 years agoMerge branch 'ow/stash-with-ifs' into maint
Junio C Hamano [Wed, 5 Feb 2014 22:03:20 +0000 (14:03 -0800)] 
Merge branch 'ow/stash-with-ifs' into maint

The implementation of 'git stash $cmd "stash@{...}"' did not quote
the stash argument properly and left it split at IFS whitespace.

* ow/stash-with-ifs:
  stash: handle specifying stashes with $IFS

10 years agoMerge branch 'js/lift-parent-count-limit' into maint
Junio C Hamano [Wed, 5 Feb 2014 22:03:01 +0000 (14:03 -0800)] 
Merge branch 'js/lift-parent-count-limit' into maint

There is no reason to have a hardcoded upper limit of the number of
parents for an octopus merge, created via the graft mechanism, but
there was.

* js/lift-parent-count-limit:
  Remove the line length limit for graft files

10 years agoMerge branch 'nd/add-empty-fix' into maint
Junio C Hamano [Wed, 5 Feb 2014 22:02:44 +0000 (14:02 -0800)] 
Merge branch 'nd/add-empty-fix' into maint

"git add -A" (no other arguments) in a totally empty working tree
used to emit an error.

* nd/add-empty-fix:
  add: don't complain when adding empty project root

10 years agoMerge branch 'bc/log-decoration' into maint
Junio C Hamano [Wed, 5 Feb 2014 22:02:05 +0000 (14:02 -0800)] 
Merge branch 'bc/log-decoration' into maint

"git log --decorate" did not handle a tag pointed by another tag
nicely.

* bc/log-decoration:
  log: properly handle decorations with chained tags

10 years agoMerge branch 'jh/rlimit-nofile-fallback' into maint
Junio C Hamano [Wed, 5 Feb 2014 22:01:23 +0000 (14:01 -0800)] 
Merge branch 'jh/rlimit-nofile-fallback' into maint

When we figure out how many file descriptors to allocate for
keeping packfiles open, a system with non-working getrlimit() could
cause us to die(), but because we make this call only to get a
rough estimate of how many is available and we do not even attempt
to use up all file descriptors available ourselves, it is nicer to
fall back to a reasonable low value rather than dying.

* jh/rlimit-nofile-fallback:
  get_max_fd_limit(): fall back to OPEN_MAX upon getrlimit/sysconf failure

10 years agoMerge branch 'jl/commit-v-strip-marker' into maint
Junio C Hamano [Wed, 5 Feb 2014 22:01:09 +0000 (14:01 -0800)] 
Merge branch 'jl/commit-v-strip-marker' into maint

"git commit -v" appends the patch to the log message before
editing, and then removes the patch when the editor returned
control. However, the patch was not stripped correctly when the
first modified path was a submodule.

* jl/commit-v-strip-marker:
  commit -v: strip diffs and submodule shortlogs from the commit message

10 years agoMerge branch 'tr/send-email-ssl' into maint
Junio C Hamano [Wed, 5 Feb 2014 22:00:18 +0000 (14:00 -0800)] 
Merge branch 'tr/send-email-ssl' into maint

SSL-related options were not passed correctly to underlying socket
layer in "git send-email".

* tr/send-email-ssl:
  send-email: set SSL options through IO::Socket::SSL::set_client_defaults
  send-email: --smtp-ssl-cert-path takes an argument
  send-email: pass Debug to Net::SMTP::SSL::new

10 years agoMerge branch 'tb/clone-ssh-with-colon-for-port' into maint
Junio C Hamano [Wed, 5 Feb 2014 21:59:16 +0000 (13:59 -0800)] 
Merge branch 'tb/clone-ssh-with-colon-for-port' into maint

Remote repository URL expressed in scp-style host:path notation are
parsed more carefully (e.g. "foo/bar:baz" is local, "[::1]:/~user" asks
to connect to user's home directory on host at address ::1.

* tb/clone-ssh-with-colon-for-port:
  git_connect(): use common return point
  connect.c: refactor url parsing
  git_connect(): refactor the port handling for ssh
  git fetch: support host:/~repo
  t5500: add test cases for diag-url
  git fetch-pack: add --diag-url
  git_connect: factor out discovery of the protocol and its parts
  git_connect: remove artificial limit of a remote command
  t5601: add tests for ssh
  t5601: remove clear_ssh, refactor setup_ssh_wrapper

10 years agoMerge branch 'nd/transport-positive-depth-only' into maint
Junio C Hamano [Wed, 5 Feb 2014 21:58:51 +0000 (13:58 -0800)] 
Merge branch 'nd/transport-positive-depth-only' into maint

"git fetch --depth=0" was a no-op, and was silently ignored.
Diagnose it as an error.

* nd/transport-positive-depth-only:
  clone,fetch: catch non positive --depth option value

10 years agogit-svn: workaround for a bug in svn serf backend
Roman Kagan [Fri, 27 Dec 2013 08:05:15 +0000 (12:05 +0400)] 
git-svn: workaround for a bug in svn serf backend

Subversion serf backend in versions 1.8.5 and below has a bug(*) that the
function creating the descriptor of a file change -- add_file() --
doesn't make a copy of its third argument when storing it on the
returned descriptor.  As a result, by the time this field is used (in
transactions of file copying or renaming) it may well be released, and
the memory reused.

One of its possible manifestations is the svn assertion triggering on an
invalid path, with a message

svn_fspath__skip_ancestor: Assertion
`svn_fspath__is_canonical(child_fspath)' failed.

This patch works around this bug, by storing the value to be passed as
the third argument to add_file() in a local variable with the same scope
as the file change descriptor, making sure their lifetime is the same.

* [ew: fixed in Subversion r1553376 as noted by Jonathan Nieder]

Cc: Benjamin Pabst <benjamin.pabst85@gmail.com>
Signed-off-by: Eric Wong <normalperson@yhbt.net>
Reviewed-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Roman Kagan <rkagan@mail.ru>
10 years agoGit 1.8.5.3 v1.8.5.3
Junio C Hamano [Mon, 13 Jan 2014 19:28:26 +0000 (11:28 -0800)] 
Git 1.8.5.3

10 years agoMerge branch 'nd/daemon-informative-errors-typofix' into maint
Junio C Hamano [Mon, 13 Jan 2014 19:23:07 +0000 (11:23 -0800)] 
Merge branch 'nd/daemon-informative-errors-typofix' into maint

The "--[no-]informative-errors" options to "git daemon" were parsed
a bit too loosely, allowing any other string after these option
names.

* nd/daemon-informative-errors-typofix:
  daemon: be strict at parsing parameters --[no-]informative-errors

10 years agoMerge branch 'km/gc-eperm' into maint
Junio C Hamano [Mon, 13 Jan 2014 19:23:04 +0000 (11:23 -0800)] 
Merge branch 'km/gc-eperm' into maint

A "gc" process running as a different user should be able to stop a
new "gc" process from starting.

* km/gc-eperm:
  gc: notice gc processes run by other users

10 years agoMerge branch 'jk/credential-plug-leak' into maint
Junio C Hamano [Mon, 13 Jan 2014 19:23:01 +0000 (11:23 -0800)] 
Merge branch 'jk/credential-plug-leak' into maint

An earlier "clean-up" introduced an unnecessary memory leak.

* jk/credential-plug-leak:
  Revert "prompt: clean up strbuf usage"

10 years agoMerge branch 'mm/mv-file-to-no-such-dir-with-slash' into maint
Junio C Hamano [Mon, 13 Jan 2014 19:22:48 +0000 (11:22 -0800)] 
Merge branch 'mm/mv-file-to-no-such-dir-with-slash' into maint

"git mv A B/", when B does not exist as a directory, should error
out, but it didn't.

* mm/mv-file-to-no-such-dir-with-slash:
  mv: let 'git mv file no-such-dir/' error out on Windows, too
  mv: let 'git mv file no-such-dir/' error out

10 years agoMerge branch 'jk/rev-parse-double-dashes' into maint
Junio C Hamano [Mon, 13 Jan 2014 19:22:38 +0000 (11:22 -0800)] 
Merge branch 'jk/rev-parse-double-dashes' into maint

"git rev-parse <revs> -- <paths>" did not implement the usual
disambiguation rules the commands in the "git log" family used in
the same way.

* jk/rev-parse-double-dashes:
  rev-parse: be more careful with munging arguments
  rev-parse: correctly diagnose revision errors before "--"

10 years agoMerge branch 'jk/cat-file-regression-fix' into maint
Junio C Hamano [Mon, 13 Jan 2014 19:22:21 +0000 (11:22 -0800)] 
Merge branch 'jk/cat-file-regression-fix' into maint

"git cat-file --batch=", an admittedly useless command, did not
behave very well.

* jk/cat-file-regression-fix:
  cat-file: handle --batch format with missing type/size
  cat-file: pass expand_data to print_object_or_die

10 years agopack-heuristics.txt: mark up the file header properly
Thomas Ackermann [Sat, 11 Jan 2014 16:28:25 +0000 (17:28 +0100)] 
pack-heuristics.txt: mark up the file header properly

AsciiDoc wants these header-lines left-aligned.

Signed-off-by: Thomas Ackermann <th.acker@arcor.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
10 years agomv: let 'git mv file no-such-dir/' error out on Windows, too
Johannes Sixt [Wed, 8 Jan 2014 16:33:44 +0000 (17:33 +0100)] 
mv: let 'git mv file no-such-dir/' error out on Windows, too

The previous commit c57f628 (mv: let 'git mv file no-such-dir/' error out)
relies on that rename("file", "no-such-dir/") fails if the directory does not
exist (note the trailing slash).  This does not work as expected on Windows:
This rename() call does not fail, but renames "file" to "no-such-dir" (not to
"no-such-dir/file"). Insert an explicit check for this case to force an error.

This changes the error message from

   $ git mv file no-such-dir/
   fatal: renaming 'file' failed: Not a directory

to

   $ git mv file no-such-dir/
   fatal: destination directory does not exist, source=file, destination=no-such-dir/

Signed-off-by: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
10 years agostash: handle specifying stashes with $IFS
Øystein Walle [Tue, 7 Jan 2014 08:22:15 +0000 (09:22 +0100)] 
stash: handle specifying stashes with $IFS

When trying to pop/apply a stash specified with an argument
containing IFS whitespace, git-stash will throw an error:

    $ git stash pop 'stash@{two hours ago}'
    Too many revisions specified: stash@{two hours ago}

This happens because word splitting is used to count non-option
arguments. Make use of rev-parse's --sq option to quote the arguments
for us to ensure a correct count. Add quotes where necessary.

Also add a test that verifies correct behaviour.

Helped-by: Thomas Rast <tr@thomasrast.ch>
Signed-off-by: Øystein Walle <oystwa@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
10 years agoMerge branch 'maint' of git://github.com/git-l10n/git-po into maint
Junio C Hamano [Mon, 6 Jan 2014 17:10:09 +0000 (09:10 -0800)] 
Merge branch 'maint' of git://github.com/git-l10n/git-po into maint

* 'maint' of git://github.com/git-l10n/git-po:
  l10n: de.po: fix translation of 'prefix'

10 years agoDocumentation/gitmodules: Only 'update' and 'url' are required
W. Trevor King [Fri, 3 Jan 2014 18:31:22 +0000 (10:31 -0800)] 
Documentation/gitmodules: Only 'update' and 'url' are required

Descriptions for all the settings fell under the initial "Each
submodule section also contains the following required keys:".  The
example shows sections with just 'path' and 'url' entries, which are
indeed required, but we should still make the required/optional
distinction explicit to clarify that the rest of them are optional.

Signed-off-by: W. Trevor King <wking@tremily.us>
Reviewed-by: Heiko Voigt <hvoigt@hvoigt.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
10 years agol10n: de.po: fix translation of 'prefix'
Ralf Thielow [Fri, 3 Jan 2014 17:05:43 +0000 (18:05 +0100)] 
l10n: de.po: fix translation of 'prefix'

The word 'prefix' is currently translated as 'Prefix'
which is not a German word. It should be translated as
'Präfix'.

Signed-off-by: Ralf Thielow <ralf.thielow@gmail.com>
10 years agogc: notice gc processes run by other users
Kyle J. McKay [Tue, 31 Dec 2013 12:07:39 +0000 (04:07 -0800)] 
gc: notice gc processes run by other users

Since 64a99eb4 git gc refuses to run without the --force option if
another gc process on the same repository is already running.

However, if the repository is shared and user A runs git gc on the
repository and while that gc is still running user B runs git gc on
the same repository the gc process run by user A will not be noticed
and the gc run by user B will go ahead and run.

The problem is that the kill(pid, 0) test fails with an EPERM error
since user B is not allowed to signal processes owned by user A
(unless user B is root).

Update the test to recognize an EPERM error as meaning the process
exists and another gc should not be run (unless --force is given).

Signed-off-by: Kyle J. McKay <mackyle@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
10 years agoRevert "prompt: clean up strbuf usage"
Jeff King [Thu, 2 Jan 2014 03:03:30 +0000 (22:03 -0500)] 
Revert "prompt: clean up strbuf usage"

This reverts commit 31b49d9b653803e7c7fd18b21c8bdd86e3421668.

That commit taught do_askpass to hand ownership of our
buffer back to the caller rather than simply return a
pointer into our internal strbuf.  What it failed to notice,
though, was that our internal strbuf is static, because we
are trying to emulate the getpass() interface.

By handing off ownership, we created a memory leak that
cannot be solved. Sometimes git_prompt returns a static
buffer from getpass() (or our smarter git_terminal_prompt
wrapper), and sometimes it returns an allocated string from
do_askpass.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
10 years agofor-each-ref: remove unused variable
Ramkumar Ramachandra [Mon, 30 Dec 2013 16:28:55 +0000 (21:58 +0530)] 
for-each-ref: remove unused variable

No code ever used this symbol since the command was introduced at
9f613ddd (Add git-for-each-ref: helper for language bindings,
2006-09-15).

Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
10 years agoRemove the line length limit for graft files
Johannes Schindelin [Fri, 27 Dec 2013 20:49:57 +0000 (21:49 +0100)] 
Remove the line length limit for graft files

Support for grafts predates Git's strbuf, and hence it is understandable
that there was a hard-coded line length limit of 1023 characters (which
was chosen a bit awkwardly, given that it is *exactly* one byte short of
aligning with the 41 bytes occupied by a commit name and the following
space or new-line character).

While regular commit histories hardly win comprehensibility in general
if they merge more than twenty-two branches in one go, it is not Git's
business to limit grafts in such a way.

In this particular developer's case, the use case that requires
substantially longer graft lines to be supported is the visualization of
the commits' order implied by their changes: commits are considered to
have an implicit relationship iff exchanging them in an interactive
rebase would result in merge conflicts.

Thusly implied branches tend to be very shallow in general, and the
resulting thicket of implied branches is usually very wide; It is
actually quite common that *most* of the commits in a topic branch have
not even one implied parent, so that a final merge commit has about as
many implied parents as there are commits in said branch.

[jc: squashed in tests by Jonathan]

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Reviewed-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
10 years agoadd: don't complain when adding empty project root
Nguyễn Thái Ngọc Duy [Mon, 23 Dec 2013 09:02:41 +0000 (16:02 +0700)] 
add: don't complain when adding empty project root

This behavior was added in 07d7bed (add: don't complain when adding
empty project root - 2009-04-28) then broken by 84b8b5d (remove
match_pathspec() in favor of match_pathspec_depth() -
2013-07-14). Reinstate it.

Noticed-by: Thomas Ferris Nicolaisen <tfnico@gmail.com>
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Reviewed-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
10 years agolog: properly handle decorations with chained tags
brian m. carlson [Tue, 17 Dec 2013 04:28:21 +0000 (04:28 +0000)] 
log: properly handle decorations with chained tags

git log did not correctly handle decorations when a tag object referenced
another tag object that was no longer a ref, such as when the second tag was
deleted.  The commit would not be decorated correctly because parse_object had
not been called on the second tag and therefore its tagged field had not been
filled in, resulting in none of the tags being associated with the relevant
commit.

Call parse_object to fill in this field if it is absent so that the chain of
tags can be dereferenced and the commit can be properly decorated.  Include
tests as well to prevent future regressions.

Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
10 years agodaemon: be strict at parsing parameters --[no-]informative-errors
Nguyễn Thái Ngọc Duy [Fri, 20 Dec 2013 10:53:52 +0000 (17:53 +0700)] 
daemon: be strict at parsing parameters --[no-]informative-errors

Use strcmp() instead of starts_with()/!prefixcmp() to stop accepting
--informative-errors-just-a-little

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
10 years agoget_max_fd_limit(): fall back to OPEN_MAX upon getrlimit/sysconf failure
Junio C Hamano [Wed, 18 Dec 2013 22:59:12 +0000 (14:59 -0800)] 
get_max_fd_limit(): fall back to OPEN_MAX upon getrlimit/sysconf failure

On broken systems where RLIMIT_NOFILE is visible by the compliers
but underlying getrlimit() system call does not behave, we used to
simply die() when we are trying to decide how many file descriptors
to allocate for keeping packfiles open.  Instead, allow the fallback
codepath to take over when we get such a failure from getrlimit().

The same issue exists with _SC_OPEN_MAX and sysconf(); restructure
the code in a similar way to prepare for a broken sysconf() as well.

Noticed-by: Joey Hess <joey@kitenet.net>
Helped-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
10 years agoGit 1.8.5.2 v1.8.5.2
Junio C Hamano [Tue, 17 Dec 2013 19:42:12 +0000 (11:42 -0800)] 
Git 1.8.5.2

Signed-off-by: Junio C Hamano <gitster@pobox.com>
10 years agoMerge branch 'rs/doc-submitting-patches' into maint
Junio C Hamano [Tue, 17 Dec 2013 19:38:23 +0000 (11:38 -0800)] 
Merge branch 'rs/doc-submitting-patches' into maint

* rs/doc-submitting-patches:
  SubmittingPatches: document how to handle multiple patches

10 years agoMerge branch 'tr/doc-git-cherry' into maint
Junio C Hamano [Tue, 17 Dec 2013 19:37:55 +0000 (11:37 -0800)] 
Merge branch 'tr/doc-git-cherry' into maint

* tr/doc-git-cherry:
  Documentation: revamp git-cherry(1)

10 years agoMerge branch 'nd/glossary-content-pathspec-markup' into maint
Junio C Hamano [Tue, 17 Dec 2013 19:36:54 +0000 (11:36 -0800)] 
Merge branch 'nd/glossary-content-pathspec-markup' into maint

* nd/glossary-content-pathspec-markup:
  glossary-content.txt: fix documentation of "**" patterns

10 years agoMerge branch 'jj/doc-markup-gitcli' into maint
Junio C Hamano [Tue, 17 Dec 2013 19:36:38 +0000 (11:36 -0800)] 
Merge branch 'jj/doc-markup-gitcli' into maint

* jj/doc-markup-gitcli:
  Documentation/gitcli.txt: fix double quotes

10 years agoMerge branch 'jj/doc-markup-hints-in-coding-guidelines' into maint
Junio C Hamano [Tue, 17 Dec 2013 19:36:10 +0000 (11:36 -0800)] 
Merge branch 'jj/doc-markup-hints-in-coding-guidelines' into maint

* jj/doc-markup-hints-in-coding-guidelines:
  State correct usage of literal examples in man pages in the coding standards

10 years agoMerge branch 'jj/log-doc' into maint
Junio C Hamano [Tue, 17 Dec 2013 19:35:41 +0000 (11:35 -0800)] 
Merge branch 'jj/log-doc' into maint

* jj/log-doc:
  Documentation/git-log.txt: mark-up fix and minor rephasing
  Documentation/git-log: update "--log-size" description

10 years agoMerge branch 'jj/rev-list-options-doc' into maint
Junio C Hamano [Tue, 17 Dec 2013 19:34:41 +0000 (11:34 -0800)] 
Merge branch 'jj/rev-list-options-doc' into maint

* jj/rev-list-options-doc:
  Documentation/rev-list-options.txt: fix some grammatical issues and typos
  Documentation/rev-list-options.txt: fix mark-up

10 years agoMerge branch 'tb/doc-fetch-pack-url' into maint
Junio C Hamano [Tue, 17 Dec 2013 19:34:24 +0000 (11:34 -0800)] 
Merge branch 'tb/doc-fetch-pack-url' into maint

* tb/doc-fetch-pack-url:
  git-fetch-pack uses URLs like git-fetch

10 years agoMerge branch 'mi/typofixes' into maint
Junio C Hamano [Tue, 17 Dec 2013 19:34:01 +0000 (11:34 -0800)] 
Merge branch 'mi/typofixes' into maint

* mi/typofixes:
  contrib: typofixes
  Documentation/technical/http-protocol.txt: typofixes
  typofixes: fix misspelt comments

10 years agoMerge branch 'jh/loose-object-dirs-creation-race' into maint
Junio C Hamano [Tue, 17 Dec 2013 19:32:50 +0000 (11:32 -0800)] 
Merge branch 'jh/loose-object-dirs-creation-race' into maint

Two processes creating loose objects at the same time could have
failed unnecessarily when the name of their new objects started
with the same byte value, due to a race condition.

* jh/loose-object-dirs-creation-race:
  sha1_file.c:create_tmpfile(): Fix race when creating loose object dirs

10 years agoMerge branch 'jk/two-way-merge-corner-case-fix' into maint
Junio C Hamano [Tue, 17 Dec 2013 19:32:04 +0000 (11:32 -0800)] 
Merge branch 'jk/two-way-merge-corner-case-fix' into maint

"git am --abort" sometimes complained about not being able to write
a tree with an 0{40} object in it.

* jk/two-way-merge-corner-case-fix:
  t1005: add test for "read-tree --reset -u A B"
  t1005: reindent
  unpack-trees: fix "read-tree -u --reset A B" with conflicted index

10 years agoMerge branch 'sb/sha1-loose-object-info-check-existence' into maint
Junio C Hamano [Tue, 17 Dec 2013 19:31:18 +0000 (11:31 -0800)] 
Merge branch 'sb/sha1-loose-object-info-check-existence' into maint

"git cat-file --batch-check=ok" did not check the existence of the
named object.

* sb/sha1-loose-object-info-check-existence:
  sha1_loose_object_info(): do not return success on missing object

10 years agoMerge branch 'nd/magic-pathspec' into maint
Junio C Hamano [Tue, 17 Dec 2013 19:21:34 +0000 (11:21 -0800)] 
Merge branch 'nd/magic-pathspec' into maint

"git diff -- ':(icase)makefile'" was unnecessarily rejected at the
command line parser.

* nd/magic-pathspec:
  diff: restrict pathspec limitations to diff b/f case only

10 years agocmd_repack(): remove redundant local variable "nr_packs"
Michael Haggerty [Tue, 17 Dec 2013 13:43:58 +0000 (14:43 +0100)] 
cmd_repack(): remove redundant local variable "nr_packs"

Its value is the same as the number of entries in the "names"
string_list, so just use "names.nr" in its place.

Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Acked-by: Stefan Beller <stefanbeller@googlemail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
10 years agocat-file: handle --batch format with missing type/size
Jeff King [Wed, 11 Dec 2013 23:15:50 +0000 (07:15 +0800)] 
cat-file: handle --batch format with missing type/size

Commit 98e2092 taught cat-file to stream blobs with --batch,
which requires that we look up the object type before
loading it into memory.  As a result, we now print the
object header from information in sha1_object_info, and the
actual contents from the read_sha1_file. We double-check
that the information we printed in the header matches the
content we are about to show.

Later, commit 93d2a60 allowed custom header lines for
--batch, and commit 5b08640 made type lookups optional. As a
result, specifying a header line without the type or size
means that we will not look up those items at all.

This causes our double-checking to erroneously die with an
error; we think the type or size has changed, when in fact
it was simply left at "0".

For the size, we can fix this by only doing the consistency
double-check when we have retrieved the size via
sha1_object_info. In the case that we have not retrieved the
value, that means we also did not print it, so there is
nothing for us to check that we are consistent with.

We could do the same for the type. However, besides our
consistency check, we also care about the type in deciding
whether to stream or not. So instead of handling the case
where we do not know the type, this patch instead makes sure
that we always trigger a type lookup when we are printing,
so that even a format without the type will stream as we
would in the normal case.

Reviewed-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
10 years agocat-file: pass expand_data to print_object_or_die
Jeff King [Wed, 11 Dec 2013 23:01:42 +0000 (07:01 +0800)] 
cat-file: pass expand_data to print_object_or_die

We currently individually pass the sha1, type, and size
fields calculated by sha1_object_info. However, if we pass
the whole struct, the called function can make more
intelligent decisions about which fields were actually
filled by sha1_object_info.

This patch takes that first refactoring step, passing the
whole struct, so further patches can make those decisions
with less noise in their diffs. There should be no
functional change to this patch (aside from a minor typo fix
in the error message).

As a side effect, we can rename the local variables in the
function to "type" and "size", since the names are no longer
taken.

Reviewed-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
10 years agogit_connect(): use common return point
Torsten Bögershausen [Thu, 28 Nov 2013 19:50:15 +0000 (20:50 +0100)] 
git_connect(): use common return point

Use only one return point from git_connect(), doing the

    free();
    return conn;

only at one place in the code.

There may be a little confusion what the variable "host" is for.  At
some places it is only the host part, at other places it may include
the port number, so change host into hostandport here.

Signed-off-by: Torsten Bögershausen <tboegi@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
10 years agoconnect.c: refactor url parsing
Torsten Bögershausen [Thu, 28 Nov 2013 19:50:03 +0000 (20:50 +0100)] 
connect.c: refactor url parsing

Make the function is_local() in transport.c public, rename it into
url_is_local_not_ssh() and use it in both transport.c and connect.c

Use a protocol "local" for URLs for the local file system.

One note about using file:// under Windows:

The (absolute) path on Unix like system typically starts with "/".
When the host is empty, it can be omitted, so that a shell scriptlet
url=file://$pwd
will give a URL like "file:///home/user/repo".

Windows does not have the same concept of a root directory located in "/".
When parsing the URL allow "file://C:/user/repo"
(even if RFC1738 indicates that "file:///C:/user/repo" should be used).

Signed-off-by: Torsten Bögershausen <tboegi@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
10 years agogit_connect(): refactor the port handling for ssh
Torsten Bögershausen [Thu, 28 Nov 2013 19:49:54 +0000 (20:49 +0100)] 
git_connect(): refactor the port handling for ssh

Use get_host_and_port() even for ssh.
Remove the variable port git_connect(), and simplify parse_connect_url()
Use only one return point in git_connect(), doing the free() and return conn.

t5601 had 2 corner test cases which now pass.

Signed-off-by: Torsten Bögershausen <tboegi@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
10 years agogit fetch: support host:/~repo
Torsten Bögershausen [Thu, 28 Nov 2013 19:49:38 +0000 (20:49 +0100)] 
git fetch: support host:/~repo

The documentation (in urls.txt) says that

    "ssh://host:/~repo",
    "host:/~repo" or
    "host:~repo"

specify the repository "repo" in the home directory at "host".

This has not been working for "host:/~repo".

Before commit 356bec "Support [address] in URLs", the comparison
"url != hostname" could be used to determine if the URL had a scheme
or not: "ssh://host/host" != "host".

However, after 356bec "[::1]" was converted into "::1", yielding
url != hostname as well.  To fix this regression, don't use
"if (url != hostname)", but look at the separator instead.

Rename the variable "c" into "separator" to make it easier to read.

Signed-off-by: Torsten Bögershausen <tboegi@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
10 years agot5500: add test cases for diag-url
Torsten Bögershausen [Thu, 28 Nov 2013 19:49:29 +0000 (20:49 +0100)] 
t5500: add test cases for diag-url

Add test cases using git fetch-pack --diag-url:

- parse out host and path for URLs with a scheme (git:// file:// ssh://)
- parse host names embedded by [] correctly
- extract the port number, if present
- separate URLs like "file" (which are local)
  from URLs like "host:repo" which should use ssh

Signed-off-by: Torsten Bögershausen <tboegi@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
10 years agogit fetch-pack: add --diag-url
Torsten Bögershausen [Thu, 28 Nov 2013 19:49:17 +0000 (20:49 +0100)] 
git fetch-pack: add --diag-url

The main purpose is to trace the URL parser called by git_connect() in
connect.c

The main features of the parser can be listed as this:

- parse out host and path for URLs with a scheme (git:// file:// ssh://)
- parse host names embedded by [] correctly
- extract the port number, if present
- separate URLs like "file" (which are local)
  from URLs like "host:repo" which should use ssh

Add the new parameter "--diag-url" to "git fetch-pack", which prints
the value for protocol, host and path to stderr and exits.

Signed-off-by: Torsten Bögershausen <tboegi@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
10 years agogit_connect: factor out discovery of the protocol and its parts
Johannes Sixt [Thu, 28 Nov 2013 19:49:01 +0000 (20:49 +0100)] 
git_connect: factor out discovery of the protocol and its parts

git_connect has grown large due to the many different protocols syntaxes
that are supported. Move the part of the function that parses the URL to
connect to into a separate function for readability.

Signed-off-by: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: Torsten Bögershausen <tboegi@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
10 years agogit_connect: remove artificial limit of a remote command
Johannes Sixt [Thu, 28 Nov 2013 19:48:45 +0000 (20:48 +0100)] 
git_connect: remove artificial limit of a remote command

Since day one, function git_connect() had a limit on the command line of
the command that is invoked to make a connection. 7a33bcbe converted the
code that constructs the command to strbuf. This would have been the
right time to remove the limit, but it did not happen. Remove it now.

git_connect() uses start_command() to invoke the command; consequently,
the limits of the system still apply, but are diagnosed only at execve()
time. But these limits are more lenient than the 1K that git_connect()
imposed.

Signed-off-by: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: Torsten Bögershausen <tboegi@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
10 years agorev-parse: be more careful with munging arguments
Jeff King [Fri, 6 Dec 2013 22:07:52 +0000 (17:07 -0500)] 
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>
10 years agorev-parse: correctly diagnose revision errors before "--"
Jeff King [Fri, 6 Dec 2013 22:05:48 +0000 (17:05 -0500)] 
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>
10 years agoclone,fetch: catch non positive --depth option value
Nguyễn Thái Ngọc Duy [Thu, 5 Dec 2013 03:31:11 +0000 (10:31 +0700)] 
clone,fetch: catch non positive --depth option value

Instead of simply ignoring the value passed to --depth option when
it is zero or negative, catch and report it as an error to let
people know that they were using the option incorrectly.

Original-patch-by: Andrés G. Aragoneses <knocte@gmail.com>
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
10 years agocommit -v: strip diffs and submodule shortlogs from the commit message
Jens Lehmann [Thu, 5 Dec 2013 19:44:14 +0000 (20:44 +0100)] 
commit -v: strip diffs and submodule shortlogs from the commit message

When using the '-v' option of "git commit" the diff added to the commit
message temporarily for editing is stripped off after the user exited the
editor by searching for "\ndiff --git " and truncating the commmit message
there if it is found.

But this approach has two problems:

- when the commit message itself contains a line starting with
  "diff --git" it will be truncated there prematurely; and

- when the "diff.submodule" setting is set to "log", the diff may
  start with "Submodule <hash1>..<hash2>", which will be left in
  the commit message while it shouldn't.

Fix that by introducing a special scissor separator line starting with the
comment character ('#' or the core.commentChar config if set) followed by
two lines describing what it is for. The scissor line - which will not be
translated - is used to reliably detect the start of the diff so it can be
chopped off from the commit message, no matter what the user enters there.

Turn a known test failure fixed by this change into a successful test;
also add one for a diff starting with a submodule log and another one for
proper handling of the comment char.

Reported-by: Ari Pollak <ari@debian.org>
Signed-off-by: Jens Lehmann <Jens.Lehmann@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
10 years agot5601: add tests for ssh
Torsten Bögershausen [Thu, 28 Nov 2013 19:48:22 +0000 (20:48 +0100)] 
t5601: add tests for ssh

Add more tests testing all the combinations:

 -IPv4 or IPv6
 -path starting with "/" or with "/~"
 -with and without the ssh:// scheme

Some tests fail; they need updates in connect.c

Signed-off-by: Torsten Bögershausen <tboegi@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
10 years agot5601: remove clear_ssh, refactor setup_ssh_wrapper
Torsten Bögershausen [Thu, 28 Nov 2013 19:53:47 +0000 (20:53 +0100)] 
t5601: remove clear_ssh, refactor setup_ssh_wrapper

Commit 8d3d28f5 added test cases for URLs which should be ssh.
Remove the function clear_ssh, use test_when_finished to clean up.

Introduce the function setup_ssh_wrapper, which could be factored
out together with expect_ssh.

Tighten one test and use "foo:bar" instead of "./foo:bar",

Helped-by: Jeff King <peff@peff.net>
Signed-off-by: Torsten Bögershausen <tboegi@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
10 years agomv: let 'git mv file no-such-dir/' error out
Matthieu Moy [Tue, 3 Dec 2013 08:32:04 +0000 (09:32 +0100)] 
mv: let 'git mv file no-such-dir/' error out

Git used to trim the trailing slash, and make the command equivalent
to 'git mv file no-such-dir', which created the file no-such-dir
(while the trailing slash explicitly stated that it could only be a
directory).

This patch skips the trailing slash removal for the destination
path.  The path with its trailing slash is passed to rename(2),
which errors out with the appropriate message:

  $ git mv file no-such-dir/
  fatal: renaming 'file' failed: Not a directory

Original-patch-by: Duy Nguyen <pclouds@gmail.com>
Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
10 years agosend-email: set SSL options through IO::Socket::SSL::set_client_defaults
Thomas Rast [Sun, 1 Dec 2013 22:48:43 +0000 (23:48 +0100)] 
send-email: set SSL options through IO::Socket::SSL::set_client_defaults

When --smtp-encryption=ssl, we use a Net::SMTP::SSL connection,
passing its ->new all the options that would otherwise go to
Net::SMTP->new (most options) and IO::Socket::SSL->start_SSL (for the
SSL options).

However, while Net::SMTP::SSL replaces the underlying socket class
with an SSL socket, it does nothing to allow passing options to that
socket.  So the SSL-relevant options are lost.

Fortunately there is an escape hatch: we can directly set the options
with IO::Socket::SSL::set_client_defaults.  They will then persist
within the IO::Socket::SSL module.

Signed-off-by: Thomas Rast <tr@thomasrast.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
10 years agosend-email: --smtp-ssl-cert-path takes an argument
Thomas Rast [Sun, 1 Dec 2013 22:48:42 +0000 (23:48 +0100)] 
send-email: --smtp-ssl-cert-path takes an argument

35035bb (send-email: be explicit with SSL certificate verification,
2013-07-18) forgot to specify that --smtp-ssl-cert-path takes a string
argument.  This means that the option could not actually be used as
intended.  Presumably noone noticed because it's much easier to set it
through configs anyway.

Add the required "=s".

Signed-off-by: Thomas Rast <tr@thomasrast.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
10 years agosend-email: pass Debug to Net::SMTP::SSL::new
Thomas Rast [Sun, 1 Dec 2013 22:48:41 +0000 (23:48 +0100)] 
send-email: pass Debug to Net::SMTP::SSL::new

We forgot to pass the Debug option through to Net::SMTP::SSL->new --
which is the same as Net::SMTP->new.  This meant that with security
set to SSL, we would never enable debug output.

Pass through the flag.

Signed-off-by: Thomas Rast <tr@thomasrast.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
10 years agoGit 1.8.5.1 v1.8.5.1
Junio C Hamano [Tue, 3 Dec 2013 19:16:56 +0000 (11:16 -0800)] 
Git 1.8.5.1

Signed-off-by: Junio C Hamano <gitster@pobox.com>
10 years agoref-iteration doc: add_submodule_odb() returns 0 for success
Nick Townsend [Mon, 25 Nov 2013 23:31:09 +0000 (15:31 -0800)] 
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>
10 years agoSync with 1.8.4.5
Junio C Hamano [Mon, 2 Dec 2013 23:34:44 +0000 (15:34 -0800)] 
Sync with 1.8.4.5

10 years agoGit 1.8.4.5 v1.8.4.5
Junio C Hamano [Mon, 2 Dec 2013 23:33:30 +0000 (15:33 -0800)] 
Git 1.8.4.5

Signed-off-by: Junio C Hamano <gitster@pobox.com>
10 years agosubmodule: do not copy unknown update mode from .gitmodules
Junio C Hamano [Mon, 2 Dec 2013 21:31:55 +0000 (13:31 -0800)] 
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>
10 years agoDocumentation: revamp git-cherry(1)
Thomas Rast [Fri, 22 Nov 2013 16:29:16 +0000 (17:29 +0100)] 
Documentation: revamp git-cherry(1)

git-cherry(1)'s "description" section has never really managed
to explain to me what the command does.  It contains too much
explanation of the algorithm instead of simply saying what
goals it achieves, and too much terminology that we otherwise
do not use (fork-point instead of merge-base).

Try a much more concise approach: state what it finds out, why
this is neat, and how the output is formatted, in a few short
paragraphs.  In return, provide much longer examples of how it
fits into a "format-patch | am" based workflow, and how it
compares to reading the same from git-log.

Also carefully avoid using "merge" in a context where it does
not mean something that comes from git-merge(1).  Instead, say
"apply" in an attempt to further link to patch workflow
concepts.

While there, also omit the language about _which_ upstream
branch we treat as the default.  I literally just learned that
we support having several, so let's not confuse new users
here, especially considering that git-config(1) does not
document this.

Prompted-by: a.huemer@commend.com on #git
Signed-off-by: Thomas Rast <tr@thomasrast.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
10 years agoGit 1.8.5 v1.8.5
Junio C Hamano [Wed, 27 Nov 2013 20:14:45 +0000 (12:14 -0800)] 
Git 1.8.5

Signed-off-by: Junio C Hamano <gitster@pobox.com>
10 years agoSync with maint
Junio C Hamano [Wed, 27 Nov 2013 20:13:29 +0000 (12:13 -0800)] 
Sync with maint

* maint:
  remote-hg: don't decode UTF-8 paths into Unicode objects

10 years agoremote-hg: don't decode UTF-8 paths into Unicode objects
Richard Hansen [Mon, 18 Nov 2013 04:12:42 +0000 (23:12 -0500)] 
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>
10 years agoSubmittingPatches: document how to handle multiple patches
René Scharfe [Wed, 27 Nov 2013 00:28:39 +0000 (01:28 +0100)] 
SubmittingPatches: document how to handle multiple patches

Signed-off-by: Rene Scharfe <l.s.r@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
10 years agoMerge branch 'rh/remote-hg-bzr-updates' (early part)
Junio C Hamano [Mon, 25 Nov 2013 16:20:02 +0000 (08:20 -0800)] 
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

10 years agoglossary-content.txt: fix documentation of "**" patterns
Nguyễn Thái Ngọc Duy [Thu, 21 Nov 2013 06:44:20 +0000 (13:44 +0700)] 
glossary-content.txt: fix documentation of "**" patterns

"**" means bold in ASCIIDOC, so we need to escape it. This is similar
to 8447dc8 (gitignore.txt: fix documentation of "**" patterns -
2013-11-07)

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
10 years agoDocumentation/gitcli.txt: fix double quotes
Jason St. John [Wed, 20 Nov 2013 01:34:40 +0000 (20:34 -0500)] 
Documentation/gitcli.txt: fix double quotes

Replace double quotes around literal examples with backticks

Signed-off-by: Jason St. John <jstjohn@purdue.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
10 years agodiff: restrict pathspec limitations to diff b/f case only
Nguyễn Thái Ngọc Duy [Wed, 20 Nov 2013 01:26:41 +0000 (08:26 +0700)] 
diff: restrict pathspec limitations to diff b/f case only

builtin_diff_b_f() needs a path, not pathspec. Other modes in diff
can deal with pathspec just fine. But because of the current
GUARD_PATHSPEC() location, other modes also reject :(glob) and
:(icase).

Move GUARD_PATHSPEC(), and the "path" assignment statement, which is
the reason of this GUARD_PATHSPEC(), inside builtin_diff_b_f().

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
10 years agoGit 1.8.5-rc3 v1.8.5-rc3
Junio C Hamano [Wed, 20 Nov 2013 19:18:25 +0000 (11:18 -0800)] 
Git 1.8.5-rc3

Signed-off-by: Junio C Hamano <gitster@pobox.com>
10 years agoSync with 1.8.4.4
Junio C Hamano [Wed, 20 Nov 2013 19:26:59 +0000 (11:26 -0800)] 
Sync with 1.8.4.4

10 years agoGit 1.8.4.4 v1.8.4.4
Junio C Hamano [Wed, 20 Nov 2013 19:26:08 +0000 (11:26 -0800)] 
Git 1.8.4.4

Signed-off-by: Junio C Hamano <gitster@pobox.com>
10 years agoMerge branch 'mb/relnotes-1.8.5-fix'
Junio C Hamano [Wed, 20 Nov 2013 19:15:25 +0000 (11:15 -0800)] 
Merge branch 'mb/relnotes-1.8.5-fix'

* mb/relnotes-1.8.5-fix:
  RelNotes: spelling & grammar fixes

10 years agoRelNotes: spelling & grammar fixes
Marc Branchaud [Thu, 14 Nov 2013 17:01:13 +0000 (12:01 -0500)] 
RelNotes: spelling & grammar fixes

Signed-off-by: Marc Branchaud <marcnarc@xiplink.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
10 years agoMerge branch 'nd/literal-pathspecs'
Junio C Hamano [Mon, 18 Nov 2013 22:31:29 +0000 (14:31 -0800)] 
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

10 years agoremote-hg: don't decode UTF-8 paths into Unicode objects
Richard Hansen [Mon, 18 Nov 2013 04:12:42 +0000 (23:12 -0500)] 
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>
10 years agoDocumentation/rev-list-options.txt: fix some grammatical issues and typos
Jason St. John [Fri, 15 Nov 2013 01:34:02 +0000 (20:34 -0500)] 
Documentation/rev-list-options.txt: fix some grammatical issues and typos

Various fixes:

 - fix typos (e.g. "show" -> "shown")
 - use "regular expression(s)" instead of "regexp" where appropriate
 - reword some sentences for easier reading
 - fix/improve some grammatical issues (e.g. comma usage)
 - add missing articles (e.g. "the")
 - change "E-mail" to "email"

Signed-off-by: Jason St. John <jstjohn@purdue.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
10 years agoDocumentation/rev-list-options.txt: fix mark-up
Jason St. John [Fri, 15 Nov 2013 01:34:01 +0000 (20:34 -0500)] 
Documentation/rev-list-options.txt: fix mark-up

Some the labeled list entries have a blank line between the label
and the body text, and some don't.  Use the latter style for
consistency; incidentally, syntax highlighting in Vim works better
if there is no blank line there.

Typeset literal options, commands, and path names in monospace.
When using `literal string` mark-up to do so, there is no need to
escape AsciiDoc special characters with backslashes, so make sure we
don't do so.

Replace some double quotes with proper AsciiDoc quotes
(e.g. ``foo'').

Signed-off-by: Jason St. John <jstjohn@purdue.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
10 years agoState correct usage of literal examples in man pages in the coding standards
Jason St. John [Thu, 14 Nov 2013 23:08:45 +0000 (18:08 -0500)] 
State correct usage of literal examples in man pages in the coding standards

The man pages contain inconsistent usage of backticks vs. single quotes
around options, commands, etc. that are in paragraphs. This commit states
that backticks should always be used around literal examples.

This commit states that "--" and friends should not be escaped
(e.g. use `--pretty=oneline` instead of `\--pretty=oneline`).

This commit also states correct usage for typesetting command usage
examples with inline substitutions.

Thanks-to: Ramkumar Ramachandra <artagnon@gmail.com>
Thanks-to: Stuart Rackham <srackham@gmail.com>
Thanks-to: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Jason St. John <jstjohn@purdue.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
10 years agoMerge branch 'maint'
Junio C Hamano [Mon, 18 Nov 2013 20:25:28 +0000 (12:25 -0800)] 
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"

10 years agoMerge branch 'jx/branch-vv-always-compare-with-upstream'
Junio C Hamano [Mon, 18 Nov 2013 20:24:49 +0000 (12:24 -0800)] 
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

10 years agobranch: fix --verbose output column alignment
Torstein Hegge [Thu, 14 Nov 2013 18:18:01 +0000 (19:18 +0100)] 
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>
10 years agoRevert "upload-pack: send non-HEAD symbolic refs"
Junio C Hamano [Mon, 18 Nov 2013 18:15:45 +0000 (10:15 -0800)] 
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.

10 years agoDocumentation/git-log.txt: mark-up fix and minor rephasing
Jason St. John [Wed, 13 Nov 2013 06:21:49 +0000 (01:21 -0500)] 
Documentation/git-log.txt: mark-up fix and minor rephasing

 - typeset options, commands, and paths in monospace;
 - typeset references to sections with emphasis;
 - replace some double quotes with proper AsciiDoc quotes (e.g. ``foo'');
 - use title case when referring to section headings.

Signed-off-by: Jason St. John <jstjohn@purdue.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
10 years agoDocumentation/git-log: update "--log-size" description
Jason St. John [Wed, 13 Nov 2013 06:21:48 +0000 (01:21 -0500)] 
Documentation/git-log: update "--log-size" description

"--log-size" was added in commit 9fa3465, and the commit message
contained a satisfactory explanation; however, the man page entry
for it did not describe the actual output format, what the output
meant and what the option was meant to be used for.

Helped-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Jason St. John <jstjohn@purdue.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
10 years agoGit 1.8.5-rc2 v1.8.5-rc2
Junio C Hamano [Wed, 13 Nov 2013 20:59:31 +0000 (12:59 -0800)] 
Git 1.8.5-rc2

Signed-off-by: Junio C Hamano <gitster@pobox.com>
10 years agoMerge git://github.com/git-l10n/git-po
Junio C Hamano [Tue, 12 Nov 2013 19:26:11 +0000 (11:26 -0800)] 
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)

10 years agoCorrect word usage of "timezone" in "Documentation" directory
Jason St. John [Sat, 9 Nov 2013 00:48:52 +0000 (19:48 -0500)] 
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>
10 years agocontrib: typofixes
Masanari Iida [Tue, 12 Nov 2013 15:17:45 +0000 (00:17 +0900)] 
contrib: typofixes

Signed-off-by: Masanari Iida <standby24x7@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>