]> git.ipfire.org Git - thirdparty/git.git/log
thirdparty/git.git
11 years agowrite_or_die: raise SIGPIPE when we get EPIPE
Jeff King [Wed, 20 Feb 2013 20:01:36 +0000 (15:01 -0500)] 
write_or_die: raise SIGPIPE when we get EPIPE

The write_or_die function will always die on an error,
including EPIPE. However, it currently treats EPIPE
specially by suppressing any error message, and by exiting
with exit code 0.

Suppressing the error message makes some sense; a pipe death
may just be a sign that the other side is not interested in
what we have to say. However, exiting with a successful
error code is not a good idea, as write_or_die is frequently
used in cases where we want to be careful about having
written all of the output, and we may need to signal to our
caller that we have done so (e.g., you would not want a push
whose other end has hung up to report success).

This distinction doesn't typically matter in git, because we
do not ignore SIGPIPE in the first place. Which means that
we will not get EPIPE, but instead will just die when we get
a SIGPIPE. But it's possible for a default handler to be set
by a parent process, or for us to add a callsite inside one
of our few SIGPIPE-ignoring blocks of code.

This patch converts write_or_die to actually raise SIGPIPE
when we see EPIPE, rather than exiting with zero. This
brings the behavior in line with the "normal" case that we
die from SIGPIPE (and any callers who want to check why we
died will see the same thing). We also give the same
treatment to other related functions, including
write_or_whine_pipe and maybe_flush_or_die.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agoupload-archive: use argv_array to store client arguments
Jeff King [Wed, 20 Feb 2013 20:01:26 +0000 (15:01 -0500)] 
upload-archive: use argv_array to store client arguments

The current parsing scheme for upload-archive is to pack
arguments into a fixed-size buffer, separated by NULs, and
put a pointer to each argument in the buffer into a
fixed-size argv array.

This works fine, and the limits are high enough that nobody
reasonable is going to hit them, but it makes the code hard
to follow.  Instead, let's just stuff the arguments into an
argv_array, which is much simpler. That lifts the "all
arguments must fit inside 4K together" limit.

We could also trivially lift the MAX_ARGS limitation (in
fact, we have to keep extra code to enforce it). But that
would mean a client could force us to allocate an arbitrary
amount of memory simply by sending us "argument" lines. By
limiting the MAX_ARGS, we limit an attacker to about 4
megabytes (64 times a maximum 64K packet buffer). That may
sound like a lot compared to the 4K limit, but it's not a
big deal compared to what git-archive will actually allocate
while working (e.g., to load blobs into memory). The
important thing is that it is bounded.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agoupload-archive: do not copy repo name
Jeff King [Wed, 20 Feb 2013 20:00:59 +0000 (15:00 -0500)] 
upload-archive: do not copy repo name

According to the comment, enter_repo will modify its input.
However, this has not been the case since 1c64b48
(enter_repo: do not modify input, 2011-10-04). Drop the
now-useless copy.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agosend-pack: prefer prefixcmp over memcmp in receive_status
Jeff King [Wed, 20 Feb 2013 20:00:43 +0000 (15:00 -0500)] 
send-pack: prefer prefixcmp over memcmp in receive_status

This code predates prefixcmp, so it used memcmp along with
static sizes. Replacing these memcmps with prefixcmp makes
the code much more readable, and the lack of static sizes
will make refactoring it in future patches simpler.

Note that we used to be unnecessarily liberal in parsing the
"unpack" status line, and would accept "unpack ok\njunk". No
version of git has ever produced that, and it violates the
BNF in Documentation/technical/pack-protocol.txt. Let's take
this opportunity to tighten the check by converting the
prefix comparison into a strcmp.

While we're in the area, let's also fix a vague error
message that does not follow our usual conventions (it
writes directly to stderr and does not use the "error:"
prefix).

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agofetch-pack: fix out-of-bounds buffer offset in get_ack
Jeff King [Wed, 20 Feb 2013 20:00:28 +0000 (15:00 -0500)] 
fetch-pack: fix out-of-bounds buffer offset in get_ack

When we read acks from the remote, we expect either:

  ACK <sha1>

or

  ACK <sha1> <multi-ack-flag>

We parse the "ACK <sha1>" bit from the line, and then start
looking for the flag strings at "line+45"; if we don't have
them, we assume it's of the first type.  But if we do have
the first type, then line+45 is not necessarily inside our
string at all!

It turns out that this works most of the time due to the way
we parse the packets. They should come in with a newline,
and packet_read puts an extra NUL into the buffer, so we end
up with:

  ACK <sha1>\n\0

with the newline at offset 44 and the NUL at offset 45. We
then strip the newline, putting a NUL at offset 44. So
when we look at "line+45", we are looking past the end of
our string; but it's OK, because we hit the terminator from
the original string.

This breaks down, however, if the other side does not
terminate their packets with a newline. In that case, our
packet is one character shorter, and we start looking
through uninitialized memory for the flag. No known
implementation sends such a packet, so it has never come up
in practice.

This patch tightens the check by looking for a short,
flagless ACK before trying to parse the flag.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agoupload-pack: remove packet debugging harness
Jeff King [Wed, 20 Feb 2013 19:55:28 +0000 (14:55 -0500)] 
upload-pack: remove packet debugging harness

If you set the GIT_DEBUG_SEND_PACK environment variable,
upload-pack will dump lines it receives in the receive_needs
phase to a descriptor. This debugging harness is a strict
subset of what GIT_TRACE_PACKET can do. Let's just drop it
in favor of that.

A few tests used GIT_DEBUG_SEND_PACK to confirm which
objects get sent; we have to adapt them to the new output
format.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agoupload-pack: do not add duplicate objects to shallow list
Jeff King [Wed, 20 Feb 2013 19:54:57 +0000 (14:54 -0500)] 
upload-pack: do not add duplicate objects to shallow list

When the client tells us it has a shallow object via
"shallow <sha1>", we make sure we have the object, mark it
with a flag, then add it to a dynamic array of shallow
objects. This means that a client can get us to allocate
arbitrary amounts of memory just by flooding us with shallow
lines (whether they have the objects or not). You can
demonstrate it easily with:

  yes '0035shallow e83c5163316f89bfbde7d9ab23ca2e25604af290' |
  git-upload-pack git.git

We already protect against duplicates in want lines by
checking if our flag is already set; let's do the same thing
here. Note that a client can still get us to allocate some
amount of memory by marking every object in the repo as
"shallow" (or "want"). But this at least bounds it with the
number of objects in the repository, which is not under the
control of an upload-pack client.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agoupload-pack: use get_sha1_hex to parse "shallow" lines
Jeff King [Wed, 20 Feb 2013 19:53:33 +0000 (14:53 -0500)] 
upload-pack: use get_sha1_hex to parse "shallow" lines

When we receive a line like "shallow <sha1>" from the
client, we feed the <sha1> part to get_sha1. This is a
mistake, as the argument on a shallow line is defined by
Documentation/technical/pack-protocol.txt to contain an
"obj-id".  This is never defined in the BNF, but it is clear
from the text and from the other uses that it is meant to be
a hex sha1, not an arbitrary identifier (and that is what
fetch-pack has always sent).

We should be using get_sha1_hex instead, which doesn't allow
the client to request arbitrary junk like "HEAD@{yesterday}".
Because this is just marking shallow objects, the client
couldn't actually do anything interesting (like fetching
objects from unreachable reflog entries), but we should keep
our parsing tight to be on the safe side.

Because get_sha1 is for the most part a superset of
get_sha1_hex, in theory the only behavior change should be
disallowing non-hex object references. However, there is
one interesting exception: get_sha1 will only parse
a 40-character hex sha1 if the string has exactly 40
characters, whereas get_sha1_hex will just eat the first 40
characters, leaving the rest. That means that current
versions of git-upload-pack will not accept a "shallow"
packet that has a trailing newline, even though the protocol
documentation is clear that newlines are allowed (even
encouraged) in non-binary parts of the protocol.

This never mattered in practice, though, because fetch-pack,
contrary to the protocol documentation, does not include a
newline in its shallow lines. JGit follows its lead (though
it correctly is strict on the parsing end about wanting a
hex object id).

We do not adjust fetch-pack to send newlines here, as it
would break communication with older versions of git (and
there is no actual benefit to doing so, except for
consistency with other parts of the protocol).

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agoGit 1.8.2-rc0 v1.8.2-rc0
Junio C Hamano [Sun, 17 Feb 2013 23:35:33 +0000 (15:35 -0800)] 
Git 1.8.2-rc0

Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agoMerge branch 'jc/hidden-refs'
Junio C Hamano [Sun, 17 Feb 2013 23:25:57 +0000 (15:25 -0800)] 
Merge branch 'jc/hidden-refs'

Allow the server side to redact the refs/ namespace it shows to the
client.

Will merge to 'master'.

* jc/hidden-refs:
  upload/receive-pack: allow hiding ref hierarchies
  upload-pack: simplify request validation
  upload-pack: share more code

11 years agoMerge branch 'mp/diff-algo-config'
Junio C Hamano [Sun, 17 Feb 2013 23:25:51 +0000 (15:25 -0800)] 
Merge branch 'mp/diff-algo-config'

Add diff.algorithm configuration so that the user does not type
"diff --histogram".

* mp/diff-algo-config:
  diff: Introduce --diff-algorithm command line option
  config: Introduce diff.algorithm variable
  git-completion.bash: Autocomplete --minimal and --histogram for git-diff

11 years agoMerge branch 'mw/bash-prompt-show-untracked-config'
Junio C Hamano [Sun, 17 Feb 2013 23:25:46 +0000 (15:25 -0800)] 
Merge branch 'mw/bash-prompt-show-untracked-config'

Allows skipping the untracked check GIT_PS1_SHOWUNTRACKEDFILES
asks for the git-prompt (in contrib/) per repository.

* mw/bash-prompt-show-untracked-config:
  t9903: add extra tests for bash.showDirtyState
  t9903: add tests for bash.showUntrackedFiles
  shell prompt: add bash.showUntrackedFiles option

11 years agoMerge branch 'jk/rebase-i-comment-char'
Junio C Hamano [Sun, 17 Feb 2013 23:25:19 +0000 (15:25 -0800)] 
Merge branch 'jk/rebase-i-comment-char'

Finishing touches to the earlier core.commentchar topic to cover
"rebase -i" as well.

* jk/rebase-i-comment-char:
  rebase -i: respect core.commentchar

11 years agoMerge branch 'jk/read-commit-buffer-data-after-free'
Junio C Hamano [Sun, 17 Feb 2013 23:23:20 +0000 (15:23 -0800)] 
Merge branch 'jk/read-commit-buffer-data-after-free'

"git log --grep=<pattern>" used to look for the pattern in literal
bytes of the commit log message and ignored the log-output encoding.

* jk/read-commit-buffer-data-after-free:
  log: re-encode commit messages before grepping

11 years agoUpdate draft release notes to 1.8.2
Junio C Hamano [Fri, 15 Feb 2013 20:24:54 +0000 (12:24 -0800)] 
Update draft release notes to 1.8.2

Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agoMerge branch 'wk/man-deny-current-branch-is-default-these-days'
Junio C Hamano [Fri, 15 Feb 2013 00:06:29 +0000 (16:06 -0800)] 
Merge branch 'wk/man-deny-current-branch-is-default-these-days'

* wk/man-deny-current-branch-is-default-these-days:
  user-manual: Update for receive.denyCurrentBranch=refuse

11 years agoMerge branch 'mk/make-rm-depdirs-could-be-empty'
Junio C Hamano [Fri, 15 Feb 2013 00:06:24 +0000 (16:06 -0800)] 
Merge branch 'mk/make-rm-depdirs-could-be-empty'

"make COMPUTE_HEADER_DEPENDENCIES=no clean" would try to run "rm
-rf $(dep_dirs)" with an empty dep_dir, but some implementations of
"rm -rf" barf on an empty argument list.

* mk/make-rm-depdirs-could-be-empty:
  Makefile: don't run "rm" without any files

11 years agoMerge branch 'mm/config-local-completion'
Junio C Hamano [Fri, 15 Feb 2013 00:06:19 +0000 (16:06 -0800)] 
Merge branch 'mm/config-local-completion'

* mm/config-local-completion:
  completion: support 'git config --local'

11 years agoMerge branch 'ef/non-ascii-parse-options-error-diag'
Junio C Hamano [Fri, 15 Feb 2013 00:06:14 +0000 (16:06 -0800)] 
Merge branch 'ef/non-ascii-parse-options-error-diag'

* ef/non-ascii-parse-options-error-diag:
  parse-options: report uncorrupted multi-byte options

11 years agoMerge branch 'mk/old-expat'
Junio C Hamano [Fri, 15 Feb 2013 00:06:08 +0000 (16:06 -0800)] 
Merge branch 'mk/old-expat'

* mk/old-expat:
  Allow building with xmlparse.h

11 years agoMerge branch 'da/p4merge-mktemp-fix'
Junio C Hamano [Fri, 15 Feb 2013 00:05:56 +0000 (16:05 -0800)] 
Merge branch 'da/p4merge-mktemp-fix'

* da/p4merge-mktemp-fix:
  p4merge: fix printf usage

11 years agoDocumentation/git-add: kill remaining <filepattern>
Junio C Hamano [Thu, 14 Feb 2013 23:51:43 +0000 (15:51 -0800)] 
Documentation/git-add: kill remaining <filepattern>

The merge at 5bf72ed2 missed another instance of <filepattern> that
we were converting to <pathspec>.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agouser-manual: Update for receive.denyCurrentBranch=refuse
W. Trevor King [Fri, 8 Feb 2013 17:04:20 +0000 (12:04 -0500)] 
user-manual: Update for receive.denyCurrentBranch=refuse

acd2a45 (Refuse updating the current branch in a non-bare repository
via push, 2009-02-11) changed the default to refuse such a push, but
it forgot to update the docs.

7d182f5 (Documentation: receive.denyCurrentBranch defaults to
'refuse', 2010-03-17) updated Documentation/config.txt, but forgot to
update the user manual.

Signed-off-by: W. Trevor King <wking@tremily.us>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agoUpdate draft release notes to 1.8.2
Junio C Hamano [Thu, 14 Feb 2013 18:43:07 +0000 (10:43 -0800)] 
Update draft release notes to 1.8.2

Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agoMerge branch 'jk/diff-graph-cleanup'
Junio C Hamano [Thu, 14 Feb 2013 18:29:59 +0000 (10:29 -0800)] 
Merge branch 'jk/diff-graph-cleanup'

Refactors a lot of repetitive code sequence from the graph drawing
code and adds it to the combined diff output.

* jk/diff-graph-cleanup:
  combine-diff.c: teach combined diffs about line prefix
  diff.c: use diff_line_prefix() where applicable
  diff: add diff_line_prefix function
  diff.c: make constant string arguments const
  diff: write prefix to the correct file
  graph: output padding for merge subsequent parents

11 years agoMerge branch 'nd/status-show-in-progress'
Junio C Hamano [Thu, 14 Feb 2013 18:29:54 +0000 (10:29 -0800)] 
Merge branch 'nd/status-show-in-progress'

* nd/status-show-in-progress:
  status: show the branch name if possible in in-progress info

11 years agoMerge branch 'mm/remote-mediawiki-build'
Junio C Hamano [Thu, 14 Feb 2013 18:29:49 +0000 (10:29 -0800)] 
Merge branch 'mm/remote-mediawiki-build'

* mm/remote-mediawiki-build:
  git-remote-mediawiki: use toplevel's Makefile
  Makefile: make script-related rules usable from subdirectories

11 years agoMerge branch 'bw/get-tz-offset-perl'
Junio C Hamano [Thu, 14 Feb 2013 18:29:44 +0000 (10:29 -0800)] 
Merge branch 'bw/get-tz-offset-perl'

* bw/get-tz-offset-perl:
  cvsimport: format commit timestamp ourselves without using strftime
  perl/Git.pm: fix get_tz_offset to properly handle DST boundary cases
  Move Git::SVN::get_tz to Git::get_tz_offset

11 years agoMerge branch 'al/mergetool-printf-fix'
Junio C Hamano [Thu, 14 Feb 2013 18:29:37 +0000 (10:29 -0800)] 
Merge branch 'al/mergetool-printf-fix'

* al/mergetool-printf-fix:
  difftool--helper: fix printf usage
  git-mergetool: print filename when it contains %

11 years agoMerge branch 'jk/error-const-return'
Junio C Hamano [Thu, 14 Feb 2013 18:29:23 +0000 (10:29 -0800)] 
Merge branch 'jk/error-const-return'

* jk/error-const-return:
  Use __VA_ARGS__ for all of error's arguments

11 years agoMerge branch 'jx/utf8-printf-width'
Junio C Hamano [Thu, 14 Feb 2013 18:29:08 +0000 (10:29 -0800)] 
Merge branch 'jx/utf8-printf-width'

Use a new helper that prints a message and counts its display width
to align the help messages parse-options produces.

* jx/utf8-printf-width:
  Add utf8_fprintf helper that returns correct number of columns

11 years agoMerge branch 'mg/bisect-doc'
Junio C Hamano [Thu, 14 Feb 2013 18:29:01 +0000 (10:29 -0800)] 
Merge branch 'mg/bisect-doc'

* mg/bisect-doc:
  git-bisect.txt: clarify that reset quits bisect

11 years agoMerge branch 'tz/perl-styles'
Junio C Hamano [Thu, 14 Feb 2013 18:28:55 +0000 (10:28 -0800)] 
Merge branch 'tz/perl-styles'

Add coding guidelines for writing Perl scripts for Git.

* tz/perl-styles:
  Update CodingGuidelines for Perl

11 years agoMerge branch 'jc/extended-fake-ancestor-for-gitlink'
Junio C Hamano [Thu, 14 Feb 2013 18:28:48 +0000 (10:28 -0800)] 
Merge branch 'jc/extended-fake-ancestor-for-gitlink'

Instead of requiring the full 40-hex object names on the index
line, we can read submodule commit object names from the textual
diff when synthesizing a fake ancestore tree for "git am -3".

* jc/extended-fake-ancestor-for-gitlink:
  apply: verify submodule commit object name better

11 years agoMerge branch 'dg/subtree-fixes'
Junio C Hamano [Thu, 14 Feb 2013 18:28:26 +0000 (10:28 -0800)] 
Merge branch 'dg/subtree-fixes'

contrib/subtree updates, but here are only the ones that looked
ready.  The remainder of the patches will have another day.

* dg/subtree-fixes:
  contrib/subtree: make the manual directory if needed
  contrib/subtree: honor DESTDIR
  contrib/subtree: fix synopsis
  contrib/subtree: better error handling for 'subtree add'
  contrib/subtree: use %B for split subject/body
  contrib/subtree: remove test number comments

11 years agot9903: add extra tests for bash.showDirtyState
Martin Erik Werner [Wed, 13 Feb 2013 20:58:19 +0000 (21:58 +0100)] 
t9903: add extra tests for bash.showDirtyState

Add 3 extra tests for the bash.showDirtyState config option; the
tests now cover all combinations of the shell var being set/unset
and the config option being missing/enabled/disabled, given a dirty
file.

Signed-off-by: Martin Erik Werner <martinerikwerner@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agot9903: add tests for bash.showUntrackedFiles
Martin Erik Werner [Wed, 13 Feb 2013 20:58:18 +0000 (21:58 +0100)] 
t9903: add tests for bash.showUntrackedFiles

Add 4 tests for the bash.showUntrackedFiles config option, covering
all combinations of the shell var being set/unset and the config
option being enabled/disabled (the other 2 cases, missing config
with and without shell variable, are already covered by existing
tests).

Signed-off-by: Martin Erik Werner <martinerikwerner@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agoMakefile: don't run "rm" without any files
Matt Kraai [Wed, 13 Feb 2013 15:57:48 +0000 (07:57 -0800)] 
Makefile: don't run "rm" without any files

When COMPUTE_HEADER_DEPENDENCIES is set to "auto" and the compiler
does not support it, $(dep_dirs) becomes empty.  "make clean" runs
"rm -rf $(dep_dirs)", which can fail in such a case.

Signed-off-by: Matt Kraai <matt.kraai@amo.abbott.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agoshell prompt: add bash.showUntrackedFiles option
Martin Erik Werner [Wed, 13 Feb 2013 11:01:58 +0000 (12:01 +0100)] 
shell prompt: add bash.showUntrackedFiles option

Add a config option 'bash.showUntrackedFiles' which allows enabling
the prompt showing untracked files on a per-repository basis. This is
useful for some repositories where the 'git ls-files ...' command may
take a long time.

Signed-off-by: Martin Erik Werner <martinerikwerner@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agoMerge branch 'maint'
Junio C Hamano [Tue, 12 Feb 2013 20:23:12 +0000 (12:23 -0800)] 
Merge branch 'maint'

* maint:
  Replace filepattern with pathspec for consistency

11 years agorebase -i: respect core.commentchar
John Keeping [Mon, 11 Feb 2013 23:08:04 +0000 (23:08 +0000)] 
rebase -i: respect core.commentchar

Commit eff80a9 (Allow custom "comment char") introduced a custom comment
character for commit messages but did not teach git-rebase--interactive
to use it.

Change git-rebase--interactive to read core.commentchar and use its
value when generating commit messages and for the command list.

Signed-off-by: John Keeping <john@keeping.me.uk>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agocombine-diff.c: teach combined diffs about line prefix
John Keeping [Thu, 7 Feb 2013 20:15:28 +0000 (20:15 +0000)] 
combine-diff.c: teach combined diffs about line prefix

When running "git log --graph --cc -p" the diff output for merges is not
indented by the graph structure, unlike the diffs of non-merge commits
(added in commit 7be5761 - diff.c: Output the text graph padding before
each diff line).

Fix this by teaching the combined diff code to output diff_line_prefix()
before each line.

Signed-off-by: John Keeping <john@keeping.me.uk>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agodiff.c: use diff_line_prefix() where applicable
John Keeping [Thu, 7 Feb 2013 20:15:27 +0000 (20:15 +0000)] 
diff.c: use diff_line_prefix() where applicable

Signed-off-by: John Keeping <john@keeping.me.uk>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agodiff: add diff_line_prefix function
John Keeping [Thu, 7 Feb 2013 20:15:26 +0000 (20:15 +0000)] 
diff: add diff_line_prefix function

This is a helper function to call the diff output_prefix function and
return its value as a C string, allowing us to greatly simplify
everywhere that needs to get the output prefix.

Signed-off-by: John Keeping <john@keeping.me.uk>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agodiff.c: make constant string arguments const
John Keeping [Thu, 7 Feb 2013 20:15:25 +0000 (20:15 +0000)] 
diff.c: make constant string arguments const

Signed-off-by: John Keeping <john@keeping.me.uk>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agodiff: write prefix to the correct file
John Keeping [Thu, 7 Feb 2013 20:15:24 +0000 (20:15 +0000)] 
diff: write prefix to the correct file

Write the prefix for an output line to the same file as the actual
content.

Signed-off-by: John Keeping <john@keeping.me.uk>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agocompletion: support 'git config --local'
Matthieu Moy [Tue, 12 Feb 2013 12:20:42 +0000 (13:20 +0100)] 
completion: support 'git config --local'

This needs to be done in two places: __git_config_get_set_variables to
allow clever completion of "git config --local --get foo<tab>", and
_git_config to allow "git config --loc<tab>" to complete to --local.

While we're there, change the order of options in the code to match
git-config.txt.

Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agoReplace filepattern with pathspec for consistency
Matthieu Moy [Tue, 12 Feb 2013 09:24:44 +0000 (10:24 +0100)] 
Replace filepattern with pathspec for consistency

pathspec is the most widely used term, and is the one defined in
gitglossary.txt. <filepattern> was used only in the synopsys for git-add
and git-commit, and in git-add.txt. Get rid of it.

This patch is obtained with by running:

  perl -pi -e 's/filepattern/pathspec/' `git grep -l filepattern`

Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agoparse-options: report uncorrupted multi-byte options
Erik Faye-Lund [Mon, 11 Feb 2013 23:13:48 +0000 (00:13 +0100)] 
parse-options: report uncorrupted multi-byte options

Because our command-line parser considers only one byte at the time
for short-options, we incorrectly report only the first byte when
multi-byte input was provided. This makes user-errors slightly
awkward to diagnose for instance under UTF-8 locale and non-English
keyboard layouts.

Report the whole argument-string when a non-ASCII short-option is
detected.

Signed-off-by: Erik Faye-Lund <kusmabite@gmail.com>
Improved-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agoAllow building with xmlparse.h
Matt Kraai [Mon, 11 Feb 2013 22:03:45 +0000 (14:03 -0800)] 
Allow building with xmlparse.h

expat 1.1 and 1.2 provide xmlparse.h instead of expat.h.  Include the
former on systems that define the EXPAT_NEEDS_XMLPARSE_H variable and
define that variable on QNX systems, which ship with expat 1.1.

Signed-off-by: Matt Kraai <matt.kraai@amo.abbott.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agolog: re-encode commit messages before grepping
Jeff King [Mon, 11 Feb 2013 20:59:58 +0000 (15:59 -0500)] 
log: re-encode commit messages before grepping

If you run "git log --grep=foo", we will run your regex on
the literal bytes of the commit message. This can provide
confusing results if the commit message is not in the same
encoding as your grep expression (or worse, you have commits
in multiple encodings, in which case your regex would need
to be written to match either encoding). On top of this, we
might also be grepping in the commit's notes, which are
already re-encoded, potentially leading to grepping in a
buffer with mixed encodings concatenated. This is insanity,
but most people never noticed, because their terminal and
their commit encodings all match.

Instead, let's massage the to-be-grepped commit into a
standardized encoding. There is not much point in adding a
flag for "this is the encoding I expect my grep pattern to
match"; the only sane choice is for it to use the log output
encoding. That is presumably what the user's terminal is
using, and it means that the patterns found by the grep will
match the output produced by git.

As a bonus, this fixes a potential segfault in commit_match
when commit->buffer is NULL, as we now build on logmsg_reencode,
which handles reading the commit buffer from disk if
necessary. The segfault can be triggered with:

        git commit -m 'text1' --allow-empty
        git commit -m 'text2' --allow-empty
        git log --graph --no-walk --grep 'text2'

which arguably does not make any sense (--graph inherently
wants a connected history, and by --no-walk the command line
is telling us to show discrete points in history without
connectivity), and we probably should forbid the
combination, but that is a separate issue.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agoAdd utf8_fprintf helper that returns correct number of columns
Jiang Xin [Sat, 9 Feb 2013 06:31:09 +0000 (14:31 +0800)] 
Add utf8_fprintf helper that returns correct number of columns

Since command usages can be translated, they may include utf-8
encoded strings, and the output in console may not align well any
more. This is because strlen() is different from strwidth() on utf-8
strings.

A wrapper utf8_fprintf() can help to return the correct number of
columns required.

Signed-off-by: Jiang Xin <worldhello.net@gmail.com>
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Reviewed-by: Torsten Bögershausen <tboegi@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agogit-bisect.txt: clarify that reset quits bisect
Michael J Gruber [Mon, 11 Feb 2013 08:35:04 +0000 (09:35 +0100)] 
git-bisect.txt: clarify that reset quits bisect

"reset" can be easily misunderstood as resetting a bisect session to its
start without finishing it. Clarify that it actually quits the bisect
session.

Reported-by: Andreas Mohr <andi@lisas.de>
Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
Reviewed-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agoUpdate draft release notes to 1.8.2
Junio C Hamano [Mon, 11 Feb 2013 04:47:28 +0000 (20:47 -0800)] 
Update draft release notes to 1.8.2

Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agoMerge branch 'maint'
Junio C Hamano [Mon, 11 Feb 2013 04:40:44 +0000 (20:40 -0800)] 
Merge branch 'maint'

* maint:
  user-manual: Rewrite git-gc section for automatic packing
  user-manual: Fix 'you - Git' -> 'you--Git' typo
  user-manual: Fix 'http' -> 'HTTP' typos
  user-manual: Fix 'both: so' -> 'both; so' typo

11 years agouser-manual: Rewrite git-gc section for automatic packing
W. Trevor King [Sun, 10 Feb 2013 15:10:27 +0000 (10:10 -0500)] 
user-manual: Rewrite git-gc section for automatic packing

This should have happened back in 2007, when `git gc` learned about
auto (e9831e8, git-gc --auto: add documentation, 2007-09-17).

Signed-off-by: W. Trevor King <wking@tremily.us>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agouser-manual: Fix 'you - Git' -> 'you--Git' typo
W. Trevor King [Sun, 10 Feb 2013 15:10:39 +0000 (10:10 -0500)] 
user-manual: Fix 'you - Git' -> 'you--Git' typo

Use an em-dash, not a hyphen, to join these clauses.

Signed-off-by: W. Trevor King <wking@tremily.us>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agouser-manual: Fix 'http' -> 'HTTP' typos
W. Trevor King [Sun, 10 Feb 2013 15:10:37 +0000 (10:10 -0500)] 
user-manual: Fix 'http' -> 'HTTP' typos

HTTP is an acronym which has not (yet) made the transition to word
status (unlike "laser", probably because lasers are inherently cooler
than HTTP ;).

Signed-off-by: W. Trevor King <wking@tremily.us>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agoMerge branch 'sp/smart-http-content-type-check'
Junio C Hamano [Mon, 11 Feb 2013 04:35:23 +0000 (20:35 -0800)] 
Merge branch 'sp/smart-http-content-type-check'

The smart HTTP clients forgot to verify the content-type that comes
back from the server side to make sure that the request is being
handled properly.

* sp/smart-http-content-type-check:
  http_request: reset "type" strbuf before adding
  t5551: fix expected error output
  Verify Content-Type from smart HTTP servers

11 years agouser-manual: Fix 'both: so' -> 'both; so' typo
W. Trevor King [Sun, 10 Feb 2013 15:10:36 +0000 (10:10 -0500)] 
user-manual: Fix 'both: so' -> 'both; so' typo

The clause "so `git log ...` will return no commits..." is
independent, not a description of "both", so a semicolon is more
appropriate.

Signed-off-by: W. Trevor King <wking@tremily.us>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agop4merge: fix printf usage
David Aguilar [Sun, 10 Feb 2013 01:21:25 +0000 (17:21 -0800)] 
p4merge: fix printf usage

Do not use a random string as if it is a format string for printf
when showing it literally; instead feed it to '%s' format.

Reported-by: Asheesh Laroia <asheesh@asheesh.org>
Signed-off-by: David Aguilar <davvid@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agodifftool--helper: fix printf usage
David Aguilar [Sun, 10 Feb 2013 01:21:25 +0000 (17:21 -0800)] 
difftool--helper: fix printf usage

Do not use a random string as if it is a format string for printf
when showing it literally; instead feed it to '%s' format.

Reported-by: Asheesh Laroia <asheesh@asheesh.org>
Signed-off-by: David Aguilar <davvid@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agocvsimport: format commit timestamp ourselves without using strftime
Ben Walton [Sat, 9 Feb 2013 21:46:58 +0000 (21:46 +0000)] 
cvsimport: format commit timestamp ourselves without using strftime

Some implementations of strftime(3) lack support for "%z".  Also
there is no need for %s in git-cvsimport as the supplied time is
already in seconds since the epoch.

For %z, use the function get_tz_offset provided by Git.pm instead.

Signed-off-by: Ben Walton <bdwalton@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agoperl/Git.pm: fix get_tz_offset to properly handle DST boundary cases
Ben Walton [Sat, 9 Feb 2013 21:46:57 +0000 (21:46 +0000)] 
perl/Git.pm: fix get_tz_offset to properly handle DST boundary cases

When passed a local time that was on the boundary of a DST change,
get_tz_offset returned a GMT offset that was incorrect (off by one
hour).  This is because the time was converted to GMT and then back to
a time stamp via timelocal() which cannot disambiguate boundary cases
as noted in its documentation.

Modify this algorithm, using an approach suggested in

  http://article.gmane.org/gmane.comp.version-control.git/213871

to first convert the timestamp in question to two broken down forms
with localtime() and gmtime(), and then compute what timestamps
these two broken down forms would represent in GMT (i.e. a timezone
that does not have DST issues) by applying timegm() on them.  The
difference between the resulting timestamps is the timezone offset.

This avoids the ambigious conversion and allows a correct time to be
returned on every occassion.

Signed-off-by: Ben Walton <bdwalton@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agoMove Git::SVN::get_tz to Git::get_tz_offset
Ben Walton [Sat, 9 Feb 2013 21:46:56 +0000 (21:46 +0000)] 
Move Git::SVN::get_tz to Git::get_tz_offset

This function has utility outside of the SVN module for any routine
that needs the equivalent of GNU strftime's %z formatting option.
Move it to the top-level Git.pm so that non-SVN modules don't need to
import the SVN module to use it.

The rename makes the purpose of the function clearer.

Signed-off-by: Ben Walton <bdwalton@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agoMerge branch 'master' of git://github.com/git-l10n/git-po
Junio C Hamano [Sat, 9 Feb 2013 21:43:39 +0000 (13:43 -0800)] 
Merge branch 'master' of git://github.com/git-l10n/git-po

* 'master' of git://github.com/git-l10n/git-po:
  l10n: de.po: translate "reset" as "neu setzen"
  l10n: de.po: translate "revision" consistently as "Revision"
  l10n: de.po: translate 11 new messages
  l10n: zh_CN.po: 800+ new translations on command usages
  l10n: Update Swedish translation (1983t0f0u)
  l10n: vi.po: updated Vietnamese translation
  l10n: Update git.pot (11 new, 7 removed messages)
  l10n: de.po: fix some minor issues

11 years agoMerge branch 'jc/combine-diff-many-parents'
Junio C Hamano [Fri, 8 Feb 2013 23:29:07 +0000 (15:29 -0800)] 
Merge branch 'jc/combine-diff-many-parents'

We used to have an arbitrary 32 limit for combined diff input,
resulting in incorrect number of leading colons shown when showing
the "--raw --cc" output.

* jc/combine-diff-many-parents:
  t4038: add tests for "diff --cc --raw <trees>"
  combine-diff: lift 32-way limit of combined diff

11 years agoMerge branch 'jk/apply-similaritly-parsing'
Junio C Hamano [Fri, 8 Feb 2013 23:29:02 +0000 (15:29 -0800)] 
Merge branch 'jk/apply-similaritly-parsing'

Make sure the similarity value shown in the "apply --summary"
output is sensible, even when the input had a bogus value.

* jk/apply-similaritly-parsing:
  builtin/apply: tighten (dis)similarity index parsing

11 years agoMerge branch 'mk/tcsh-complete-only-known-paths'
Junio C Hamano [Fri, 8 Feb 2013 23:28:51 +0000 (15:28 -0800)] 
Merge branch 'mk/tcsh-complete-only-known-paths'

The "complete with known paths only" update to completion scripts
returns directory names without trailing slash to compensate the
addition of '/' done by bash that reads from our completion result.
tcsh completion code that reads from our internal completion result
does not add '/', so let it ask our complletion code to keep the '/'
at the end.

* mk/tcsh-complete-only-known-paths:
  completion: handle path completion and colon for tcsh script

11 years agoMerge branch 'mp/complete-paths'
Junio C Hamano [Fri, 8 Feb 2013 23:28:42 +0000 (15:28 -0800)] 
Merge branch 'mp/complete-paths'

The completion script used to let the default completer to suggest
pathnames, which gave too many irrelevant choices (e.g. "git add"
would not want to add an unmodified path).  Teach it to use a more
git-aware logic to enumerate only relevant ones.

* mp/complete-paths:
  git-completion.bash: add support for path completion

11 years agoMerge branch 'ct/autoconf-htmldir'
Junio C Hamano [Fri, 8 Feb 2013 23:28:37 +0000 (15:28 -0800)] 
Merge branch 'ct/autoconf-htmldir'

The autoconf subsystem passed --mandir down to generated
config.mak.autogen but forgot to do the same for --htmldir.

* ct/autoconf-htmldir:
  Honor configure's htmldir switch

11 years agogit-mergetool: print filename when it contains %
Asheesh Laroia [Fri, 8 Feb 2013 01:16:24 +0000 (17:16 -0800)] 
git-mergetool: print filename when it contains %

If git-mergetool was invoked with files with a percent sign (%) in
their names, it would print an error.  For example, if you were
calling mergetool on a file called "%2F":

    printf: %2F: invalid directive

Do not pass random string to printf as if it were a valid format.
Use format string "%s" and pass the string as data to be formatted
instead.

Signed-off-by: Asheesh Laroia <asheesh@asheesh.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agol10n: de.po: translate "reset" as "neu setzen"
Ralf Thielow [Mon, 28 Jan 2013 18:24:42 +0000 (19:24 +0100)] 
l10n: de.po: translate "reset" as "neu setzen"

According to the glossary, "reset" should be
translated as "neu setzen" but in a couple of
messages we've translated it as "zurücksetzen".
This fixes that.

Signed-off-by: Ralf Thielow <ralf.thielow@gmail.com>
11 years agol10n: de.po: translate "revision" consistently as "Revision"
Ralf Thielow [Mon, 28 Jan 2013 17:24:14 +0000 (18:24 +0100)] 
l10n: de.po: translate "revision" consistently as "Revision"

In the current German translation, the word "revision" was
translated as both "Version" (translation of "commit") and
"Revision". Since a revision in Git is not necessarily a
commit, we should not translate it with the same word in
order to give the user an idea that it's not necessarily
the same. After this commit, "revision" is consistently
translated as "Revision".

Signed-off-by: Ralf Thielow <ralf.thielow@gmail.com>
11 years agol10n: de.po: translate 11 new messages
Ralf Thielow [Sun, 27 Jan 2013 12:43:46 +0000 (13:43 +0100)] 
l10n: de.po: translate 11 new messages

Translate 11 new messages came from git.pot update
in 46bc403 (l10n: Update git.pot (11 new, 7 removed
messages)).

Signed-off-by: Ralf Thielow <ralf.thielow@gmail.com>
Acked-by: Thomas Rast <trast@inf.ethz.ch>
11 years agogit-remote-mediawiki: use toplevel's Makefile
Matthieu Moy [Fri, 8 Feb 2013 17:31:17 +0000 (18:31 +0100)] 
git-remote-mediawiki: use toplevel's Makefile

This makes the Makefile simpler, while providing more features, and more
consistency (the exact same rules with the exact same configuration as
Git official commands are applied with the new version).

Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agoMakefile: make script-related rules usable from subdirectories
Matthieu Moy [Fri, 8 Feb 2013 17:31:16 +0000 (18:31 +0100)] 
Makefile: make script-related rules usable from subdirectories

Git's Makefile provides a few nice features for script build and
installation (substitute the first line with the right path, hardcode the
path to Git library, ...).

The Makefile already knows how to process files outside the toplevel
directory with e.g.

  make SCRIPT_PERL=path/to/file.perl path/to/file

but we can make it simpler for callers by exposing build, install and
clean rules as .PHONY targets.

Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agol10n: zh_CN.po: 800+ new translations on command usages
Wang Sheng [Wed, 30 Jan 2013 09:23:08 +0000 (17:23 +0800)] 
l10n: zh_CN.po: 800+ new translations on command usages

Most of the 800+ new translations are contributed by Wang Sheng.
So he is a zh_CN l10n maintainer for Git now.

Also fixed translations for some terms, such as blob, dangling.

Signed-off-by: Wang Sheng <wangsheng2008love@163.com>
Signed-off-by: Jiang Xin <worldhello.net@gmail.com>
11 years agoUse __VA_ARGS__ for all of error's arguments
Matt Kraai [Fri, 8 Feb 2013 15:09:28 +0000 (07:09 -0800)] 
Use __VA_ARGS__ for all of error's arguments

QNX 6.3.2 uses GCC 2.95.3 by default, and GCC 2.95.3 doesn't remove the
comma if the error macro's variable argument is left out.

Instead of testing for a sufficiently recent version of GCC, make
__VA_ARGS__ match all of the arguments.

Signed-off-by: Matt Kraai <matt.kraai@amo.abbott.com>
Acked-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agoUpdate draft release notes to 1.8.2
Junio C Hamano [Thu, 7 Feb 2013 23:25:06 +0000 (15:25 -0800)] 
Update draft release notes to 1.8.2

Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agoSync with 1.8.1.3
Junio C Hamano [Thu, 7 Feb 2013 23:21:49 +0000 (15:21 -0800)] 
Sync with 1.8.1.3

11 years agoGit 1.8.1.3 v1.8.1.3
Junio C Hamano [Thu, 7 Feb 2013 23:21:10 +0000 (15:21 -0800)] 
Git 1.8.1.3

Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agoMerge branch 'mz/pick-unborn' into maint
Junio C Hamano [Thu, 7 Feb 2013 23:16:04 +0000 (15:16 -0800)] 
Merge branch 'mz/pick-unborn' into maint

"git cherry-pick" did not replay a root commit to an unborn branch.

* mz/pick-unborn:
  learn to pick/revert into unborn branch
  tests: move test_cmp_rev to test-lib-functions

11 years agoMerge branch 'nd/fix-perf-parameters-in-tests' into maint
Junio C Hamano [Thu, 7 Feb 2013 23:16:00 +0000 (15:16 -0800)] 
Merge branch 'nd/fix-perf-parameters-in-tests' into maint

* nd/fix-perf-parameters-in-tests:
  test-lib.sh: unfilter GIT_PERF_*

11 years agoMerge branch 'jc/do-not-let-random-file-interfere-with-completion-tests' into maint
Junio C Hamano [Thu, 7 Feb 2013 23:15:23 +0000 (15:15 -0800)] 
Merge branch 'jc/do-not-let-random-file-interfere-with-completion-tests' into maint

Scripts to test bash completion was inherently flaky as it was
affected by whatever random things the user may have on $PATH.

* jc/do-not-let-random-file-interfere-with-completion-tests:
  t9902: protect test from stray build artifacts

11 years agoMerge branch 'ft/transport-report-segv' into maint
Junio C Hamano [Thu, 7 Feb 2013 23:15:08 +0000 (15:15 -0800)] 
Merge branch 'ft/transport-report-segv' into maint

A failure to push due to non-ff while on an unborn branch
dereferenced a NULL pointer when showing an error message.

* ft/transport-report-segv:
  push: fix segfault when HEAD points nowhere

11 years agoMerge branch 'sb/gpg-plug-fd-leak' into maint
Junio C Hamano [Thu, 7 Feb 2013 23:14:54 +0000 (15:14 -0800)] 
Merge branch 'sb/gpg-plug-fd-leak' into maint

We forgot to close the file descriptor reading from "gpg" output,
killing "git log --show-signature" on a long history.

* sb/gpg-plug-fd-leak:
  gpg: close stderr once finished with it in verify_signed_buffer()

11 years agoMerge branch 'jc/fake-ancestor-with-non-blobs' into maint
Junio C Hamano [Thu, 7 Feb 2013 23:14:22 +0000 (15:14 -0800)] 
Merge branch 'jc/fake-ancestor-with-non-blobs' into maint

Rebasing the history of superproject with change in the submodule
has been broken since v1.7.12.

* jc/fake-ancestor-with-non-blobs:
  apply: diagnose incomplete submodule object name better
  apply: simplify build_fake_ancestor()
  git-am: record full index line in the patch used while rebasing

11 years agoMerge branch 'jn/auto-depend-workaround-buggy-ccache' into maint
Junio C Hamano [Thu, 7 Feb 2013 23:13:34 +0000 (15:13 -0800)] 
Merge branch 'jn/auto-depend-workaround-buggy-ccache' into maint

Buggy versions of ccache broke the auto-generation of dependencies.

* jn/auto-depend-workaround-buggy-ccache:
  Makefile: explicitly set target name for autogenerated dependencies

11 years agoMerge branch 'da/mergetool-docs'
Junio C Hamano [Thu, 7 Feb 2013 22:42:08 +0000 (14:42 -0800)] 
Merge branch 'da/mergetool-docs'

Build on top of the clean-up done by jk/mergetool and automatically
generate the list of mergetool and difftool backends the build
supports to be included in the documentation.

* da/mergetool-docs:
  doc: generate a list of valid merge tools
  mergetool--lib: list user configured tools in '--tool-help'
  mergetool--lib: add functions for finding available tools
  mergetool--lib: improve the help text in guess_merge_tool()
  mergetool--lib: simplify command expressions

11 years agoMerge branch 'ss/mergetools-tortoise'
Junio C Hamano [Thu, 7 Feb 2013 22:42:01 +0000 (14:42 -0800)] 
Merge branch 'ss/mergetools-tortoise'

Update mergetools to work better with newer merge helper tortoise ships.

* ss/mergetools-tortoise:
  mergetools: teach tortoisemerge to handle filenames with SP correctly
  mergetools: support TortoiseGitMerge

11 years agoMerge branch 'jk/mergetool'
Junio C Hamano [Thu, 7 Feb 2013 22:41:57 +0000 (14:41 -0800)] 
Merge branch 'jk/mergetool'

Cleans up mergetool/difftool combo.

* jk/mergetool:
  mergetools: simplify how we handle "vim" and "defaults"
  mergetool--lib: don't call "exit" in setup_tool
  mergetool--lib: improve show_tool_help() output
  mergetools/vim: remove redundant diff command
  git-difftool: use git-mergetool--lib for "--tool-help"
  git-mergetool: don't hardcode 'mergetool' in show_tool_help
  git-mergetool: remove redundant assignment
  git-mergetool: move show_tool_help to mergetool--lib

11 years agoMerge branch 'jk/doc-makefile-cleanup'
Junio C Hamano [Thu, 7 Feb 2013 22:41:51 +0000 (14:41 -0800)] 
Merge branch 'jk/doc-makefile-cleanup'

* jk/doc-makefile-cleanup:
  Documentation/Makefile: clean up MAN*_TXT lists

11 years agoMerge branch 'jk/remote-helpers-doc'
Junio C Hamano [Thu, 7 Feb 2013 22:41:45 +0000 (14:41 -0800)] 
Merge branch 'jk/remote-helpers-doc'

"git help remote-helpers" did not work; 'remote-helpers' is not
a subcommand name but a concept, so its documentation should have
been in gitremote-helpers, not git-remote-helpers.

* jk/remote-helpers-doc:
  Rename {git- => git}remote-helpers.txt

11 years agoMerge branch 'sb/run-command-fd-error-reporting'
Junio C Hamano [Thu, 7 Feb 2013 22:41:42 +0000 (14:41 -0800)] 
Merge branch 'sb/run-command-fd-error-reporting'

* sb/run-command-fd-error-reporting:
  run-command: be more informative about what failed

11 years agoMerge branch 'nd/branch-error-cases'
Junio C Hamano [Thu, 7 Feb 2013 22:41:38 +0000 (14:41 -0800)] 
Merge branch 'nd/branch-error-cases'

Fix various error messages and conditions in "git branch", e.g. we
advertised "branch -d/-D" to remove one or more branches but actually
implemented removal of zero or more branches---request to remove no
branches was not rejected.

* nd/branch-error-cases:
  branch: let branch filters imply --list
  docs: clarify git-branch --list behavior
  branch: mark more strings for translation
  branch: give a more helpful message on redundant arguments
  branch: reject -D/-d without branch name

11 years agoMerge branch 'sb/gpg-i18n'
Junio C Hamano [Thu, 7 Feb 2013 22:41:34 +0000 (14:41 -0800)] 
Merge branch 'sb/gpg-i18n'

* sb/gpg-i18n:
  gpg: allow translation of more error messages

11 years agoMerge branch 'jk/python-styles'
Junio C Hamano [Thu, 7 Feb 2013 22:41:31 +0000 (14:41 -0800)] 
Merge branch 'jk/python-styles'

* jk/python-styles:
  CodingGuidelines: add Python coding guidelines

11 years agoMerge branch 'ab/gitweb-use-same-scheme'
Junio C Hamano [Thu, 7 Feb 2013 22:41:24 +0000 (14:41 -0800)] 
Merge branch 'ab/gitweb-use-same-scheme'

Avoid mixed contents on a page coming via http and https when
gitweb is hosted on a https server.

* ab/gitweb-use-same-scheme:
  gitweb: refer to picon/gravatar images over the same scheme

11 years agoupload/receive-pack: allow hiding ref hierarchies
Junio C Hamano [Sat, 19 Jan 2013 00:08:30 +0000 (16:08 -0800)] 
upload/receive-pack: allow hiding ref hierarchies

A repository may have refs that are only used for its internal
bookkeeping purposes that should not be exposed to the others that
come over the network.

Teach upload-pack to omit some refs from its initial advertisement
by paying attention to the uploadpack.hiderefs multi-valued
configuration variable.  Do the same to receive-pack via the
receive.hiderefs variable.  As a convenient short-hand, allow using
transfer.hiderefs to set the value to both of these variables.

Any ref that is under the hierarchies listed on the value of these
variable is excluded from responses to requests made by "ls-remote",
"fetch", etc. (for upload-pack) and "push" (for receive-pack).

Because these hidden refs do not count as OUR_REF, an attempt to
fetch objects at the tip of them will be rejected, and because these
refs do not get advertised, "git push :" will not see local branches
that have the same name as them as "matching" ones to be sent.

An attempt to update/delete these hidden refs with an explicit
refspec, e.g. "git push origin :refs/hidden/22", is rejected.  This
is not a new restriction.  To the pusher, it would appear that there
is no such ref, so its push request will conclude with "Now that I
sent you all the data, it is time for you to update the refs.  I saw
that the ref did not exist when I started pushing, and I want the
result to point at this commit".  The receiving end will apply the
compare-and-swap rule to this request and rejects the push with
"Well, your update request conflicts with somebody else; I see there
is such a ref.", which is the right thing to do. Otherwise a push to
a hidden ref will always be "the last one wins", which is not a good
default.

Signed-off-by: Junio C Hamano <gitster@pobox.com>