Code

git.git
12 years agot1300: add missing &&-chaining
Jeff King [Thu, 16 Feb 2012 08:02:18 +0000 (03:02 -0500)]
t1300: add missing &&-chaining

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agodocs/api-config: minor clarifications
Jeff King [Fri, 17 Feb 2012 08:18:38 +0000 (03:18 -0500)]
docs/api-config: minor clarifications

The first change simply drops some parentheses to make a
statement more clear. The seconds clarifies that almost
nobody wants to call git_config_early.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agoSync with maint
Junio C Hamano [Thu, 16 Feb 2012 22:27:20 +0000 (14:27 -0800)]
Sync with maint

12 years agoUpdate draft release notes to 1.7.9.2
Junio C Hamano [Thu, 16 Feb 2012 22:26:32 +0000 (14:26 -0800)]
Update draft release notes to 1.7.9.2

Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agoMerge branch 'jc/checkout-out-of-unborn' into maint
Junio C Hamano [Thu, 16 Feb 2012 22:18:06 +0000 (14:18 -0800)]
Merge branch 'jc/checkout-out-of-unborn' into maint

* jc/checkout-out-of-unborn:
  git checkout -b: allow switching out of an unborn branch

12 years agoMerge branch 'jc/maint-mailmap-output' into maint
Junio C Hamano [Thu, 16 Feb 2012 22:18:03 +0000 (14:18 -0800)]
Merge branch 'jc/maint-mailmap-output' into maint

* jc/maint-mailmap-output:
  mailmap: always return a plain mail address from map_user()

12 years agoMerge branch 'jk/prompt-fallback-to-tty' into maint
Junio C Hamano [Thu, 16 Feb 2012 22:18:00 +0000 (14:18 -0800)]
Merge branch 'jk/prompt-fallback-to-tty' into maint

* jk/prompt-fallback-to-tty:
  prompt: fall back to terminal if askpass fails
  prompt: clean up strbuf usage

12 years agoMerge branch 'jn/gitweb-search-utf-8' into maint
Junio C Hamano [Thu, 16 Feb 2012 22:17:58 +0000 (14:17 -0800)]
Merge branch 'jn/gitweb-search-utf-8' into maint

* jn/gitweb-search-utf-8:
  gitweb: Allow UTF-8 encoded CGI query parameters and path_info

12 years agoMerge branch 'jc/maint-commit-ignore-i-t-a' into maint
Junio C Hamano [Thu, 16 Feb 2012 22:08:00 +0000 (14:08 -0800)]
Merge branch 'jc/maint-commit-ignore-i-t-a' into maint

* jc/maint-commit-ignore-i-t-a:
  commit: ignore intent-to-add entries instead of refusing

Conflicts:
cache-tree.c

12 years agoMerge branch 'mm/empty-loose-error-message' into maint
Junio C Hamano [Thu, 16 Feb 2012 22:00:25 +0000 (14:00 -0800)]
Merge branch 'mm/empty-loose-error-message' into maint

* mm/empty-loose-error-message:
  fsck: give accurate error message on empty loose object files

12 years agoMerge branch 'nk/ctype-for-perf' into maint
Junio C Hamano [Thu, 16 Feb 2012 22:00:16 +0000 (14:00 -0800)]
Merge branch 'nk/ctype-for-perf' into maint

* nk/ctype-for-perf:
  ctype: implement islower/isupper macro
  ctype.c only wants git-compat-util.h

12 years agoMerge branch 'jx/i18n-more-marking' into maint
Junio C Hamano [Thu, 16 Feb 2012 21:59:53 +0000 (13:59 -0800)]
Merge branch 'jx/i18n-more-marking' into maint

* jx/i18n-more-marking:
  i18n: format_tracking_info "Your branch is behind" message
  i18n: git-commit whence_s "merge/cherry-pick" message

12 years agoman: rearrange git synopsis to fit in 80 lines
Zbigniew Jędrzejewski-Szmek [Tue, 14 Feb 2012 23:54:21 +0000 (00:54 +0100)]
man: rearrange git synopsis to fit in 80 lines

The line was extended in 2dd8c3 ('git: add --info-path and --man-path
options'), and the formatted man output stopped fitting into the 80
column window.

Signed-off-by: Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agocompletion: --list option for git-branch
Ralf Thielow [Wed, 15 Feb 2012 20:36:58 +0000 (21:36 +0100)]
completion: --list option for git-branch

Signed-off-by: Ralf Thielow <ralf.thielow@googlemail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agoMerge branch 'rt/completion-branch-edit-desc' into maint
Junio C Hamano [Thu, 16 Feb 2012 20:33:46 +0000 (12:33 -0800)]
Merge branch 'rt/completion-branch-edit-desc' into maint

* rt/completion-branch-edit-desc:
  completion: --edit-description option for git-branch

12 years agomake lineno_width() from blame reusable for others
Zbigniew Jędrzejewski-Szmek [Sun, 12 Feb 2012 14:16:20 +0000 (15:16 +0100)]
make lineno_width() from blame reusable for others

builtin/blame.c has a helper function to compute how many columns
we need to show a line-number, whose implementation is reusable as
a more generic helper function to count the number of columns
necessary to show any cardinal number.

Rename it to decimal_width(), move it to pager.c and export it for
use by future callers.

Signed-off-by: Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agodiff --stat: show bars of same length for paths with same amount of changes
Junio C Hamano [Tue, 14 Feb 2012 21:49:11 +0000 (13:49 -0800)]
diff --stat: show bars of same length for paths with same amount of changes

When commit 3ed74e6 (diff --stat: ensure at least one '-' for deletions,
and one '+' for additions, 2006-09-28) improved the output for files with
tiny modifications, we accidentally broke the logic to ensure that two
equal sized changes are shown with the bars of the same length, even when
rounding errors exist.

Compute the length of the graph bars, using the same "non-zero changes is
shown with at least one column" scaling logic, but by scaling the sum of
additions and deletions to come up with the total length of the bar (this
ensures that two equal sized changes result in bars of the same length),
and then scaling the smaller of the additions or deletions. The other side
is computed as the difference between the two.

This makes the apportioning between additions and deletions less accurate
due to rounding errors, but it is much less noticeable than two files with
the same amount of change showing bars of different length.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agoMerge branch 'jk/git-dir-lookup'
Junio C Hamano [Tue, 14 Feb 2012 20:57:18 +0000 (12:57 -0800)]
Merge branch 'jk/git-dir-lookup'

* jk/git-dir-lookup:
  standardize and improve lookup rules for external local repos

12 years agoMerge branch 'jk/grep-binary-attribute'
Junio C Hamano [Tue, 14 Feb 2012 20:57:18 +0000 (12:57 -0800)]
Merge branch 'jk/grep-binary-attribute'

* jk/grep-binary-attribute:
  grep: pre-load userdiff drivers when threaded
  grep: load file data after checking binary-ness
  grep: respect diff attributes for binary-ness
  grep: cache userdiff_driver in grep_source
  grep: drop grep_buffer's "name" parameter
  convert git-grep to use grep_source interface
  grep: refactor the concept of "grep source" into an object
  grep: move sha1-reading mutex into low-level code
  grep: make locking flag global

12 years agoMerge branch 'nd/pack-objects-parseopt'
Junio C Hamano [Tue, 14 Feb 2012 20:57:18 +0000 (12:57 -0800)]
Merge branch 'nd/pack-objects-parseopt'

* nd/pack-objects-parseopt:
  pack-objects: convert to use parse_options()
  pack-objects: remove bogus comment
  pack-objects: do not accept "--index-version=version,"

12 years agoMerge branch 'dp/i18n-libcharset'
Junio C Hamano [Tue, 14 Feb 2012 20:57:18 +0000 (12:57 -0800)]
Merge branch 'dp/i18n-libcharset'

* dp/i18n-libcharset:
  Makefile: introduce CHARSET_LIB to link with -lcharset

12 years agoMerge branch 'mh/war-on-extra-refs'
Junio C Hamano [Tue, 14 Feb 2012 20:57:18 +0000 (12:57 -0800)]
Merge branch 'mh/war-on-extra-refs'

* mh/war-on-extra-refs:
  refs: remove the extra_refs API
  clone: do not add alternate references to extra_refs
  everything_local(): mark alternate refs as complete
  fetch-pack.c: inline insert_alternate_refs()
  fetch-pack.c: rename some parameters from "path" to "refname"
  clone.c: move more code into the "if (refs)" conditional
  t5700: document a failure of alternates to affect fetch

12 years agoMerge branch 'lt/pull-no-edit'
Junio C Hamano [Tue, 14 Feb 2012 20:57:17 +0000 (12:57 -0800)]
Merge branch 'lt/pull-no-edit'

* lt/pull-no-edit:
  "git pull" doesn't know "--edit"

12 years agoMerge branch 'bl/gitweb-project-filter'
Junio C Hamano [Tue, 14 Feb 2012 20:57:17 +0000 (12:57 -0800)]
Merge branch 'bl/gitweb-project-filter'

* bl/gitweb-project-filter:
  gitweb: Harden and improve $project_filter page title

12 years agoMerge branch 'jn/ancient-meld-support'
Junio C Hamano [Tue, 14 Feb 2012 20:57:17 +0000 (12:57 -0800)]
Merge branch 'jn/ancient-meld-support'

* jn/ancient-meld-support:
  mergetools/meld: Use --help output to detect --output support

12 years agoMerge branch 'jk/userdiff-config-simplify'
Junio C Hamano [Tue, 14 Feb 2012 20:57:17 +0000 (12:57 -0800)]
Merge branch 'jk/userdiff-config-simplify'

* jk/userdiff-config-simplify:
  drop odd return value semantics from userdiff_config

12 years agoSync with 1.7.9.1
Junio C Hamano [Tue, 14 Feb 2012 17:56:23 +0000 (09:56 -0800)]
Sync with 1.7.9.1

Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agoGit 1.7.9.1 v1.7.9.1
Junio C Hamano [Tue, 14 Feb 2012 17:53:38 +0000 (09:53 -0800)]
Git 1.7.9.1

Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agoMerge branch 'jk/maint-tag-show-fixes' into maint
Junio C Hamano [Tue, 14 Feb 2012 07:31:27 +0000 (23:31 -0800)]
Merge branch 'jk/maint-tag-show-fixes' into maint

* jk/maint-tag-show-fixes:
  tag: do not show non-tag contents with "-n"
  tag: die when listing missing or corrupt objects
  tag: fix output of "tag -n" when errors occur

Conflicts:
t/t7004-tag.sh

12 years agoMerge branch 'bw/inet-pton-ntop-compat' into maint
Junio C Hamano [Tue, 14 Feb 2012 07:26:31 +0000 (23:26 -0800)]
Merge branch 'bw/inet-pton-ntop-compat' into maint

* bw/inet-pton-ntop-compat:
  Drop system includes from inet_pton/inet_ntop compatibility wrappers

12 years agoMerge branch 'mp/make-cleanse-x-for-exe' into maint
Junio C Hamano [Tue, 14 Feb 2012 07:26:25 +0000 (23:26 -0800)]
Merge branch 'mp/make-cleanse-x-for-exe' into maint

* mp/make-cleanse-x-for-exe:
  Explicitly set X to avoid potential build breakage

12 years agoMerge branch 'jn/merge-no-edit-fix' into maint
Junio C Hamano [Tue, 14 Feb 2012 07:24:02 +0000 (23:24 -0800)]
Merge branch 'jn/merge-no-edit-fix' into maint

* jn/merge-no-edit-fix:
  merge: do not launch an editor on "--no-edit $tag"

12 years agodiff-highlight: document some non-optimal cases
Jeff King [Mon, 13 Feb 2012 22:37:33 +0000 (17:37 -0500)]
diff-highlight: document some non-optimal cases

The diff-highlight script works on heuristics, so it can be
wrong. Let's document some of the wrong-ness in case
somebody feels like working on it.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agodiff-highlight: match multi-line hunks
Jeff King [Mon, 13 Feb 2012 22:36:36 +0000 (17:36 -0500)]
diff-highlight: match multi-line hunks

Currently we only bother highlighting single-line hunks. The
rationale was that the purpose of highlighting is to point
out small changes between two similar lines that are
otherwise hard to see. However, that meant we missed similar
cases where two lines were changed together, like:

   -foo(buf);
   -bar(buf);
   +foo(obj->buf);
   +bar(obj->buf);

Each of those changes is simple, and would benefit from
highlighting (the "obj->" parts in this case).

This patch considers whole hunks at a time. For now, we
consider only the case where the hunk has the same number of
removed and added lines, and assume that the lines from each
segment correspond one-to-one. While this is just a
heuristic, in practice it seems to generate sensible
results (especially because we now omit highlighting on
completely-changed lines, so when our heuristic is wrong, we
tend to avoid highlighting at all).

Based on an original idea and implementation by Michał
Kiedrowicz.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agodiff-highlight: refactor to prepare for multi-line hunks
Jeff King [Mon, 13 Feb 2012 22:33:10 +0000 (17:33 -0500)]
diff-highlight: refactor to prepare for multi-line hunks

The current code structure assumes that we will only look at
a pair of lines at any given time, and that the end result
should always be to output that pair. However, we want to
eventually handle multi-line hunks, which will involve
collating pairs of removed/added lines. Let's refactor the
code to return highlighted pairs instead of printing them.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agodiff-highlight: don't highlight whole lines
Jeff King [Mon, 13 Feb 2012 22:32:47 +0000 (17:32 -0500)]
diff-highlight: don't highlight whole lines

If you have a change like:

  -foo
  +bar

we end up highlighting the entirety of both lines (since the
whole thing is changed). But the point of diff highlighting
is to pinpoint the specific change in a pair of lines that
are mostly identical. In this case, the highlighting is just
noise, since there is nothing to pinpoint, and we are better
off doing nothing.

The implementation looks for "interesting" pairs by checking
to see whether they actually have a matching prefix or
suffix that does not simply consist of colorization and
whitespace.  However, the implementation makes it easy to
plug in other heuristics, too, like:

  1. Depending on the source material, the set of "boring"
     characters could be tweaked to include language-specific
     stuff (like braces or semicolons for C).

  2. Instead of saying "an interesting line has at least one
     character of prefix or suffix", we could require that
     less than N percent of the line be highlighted.

The simple "ignore whitespace, and highlight if there are
any matched characters" implemented by this patch seems to
give good results on git.git. I'll leave experimentation
with other heuristics to somebody who has a dataset that
does not look good with the current code.

Based on an original idea and implementation by Michał
Kiedrowicz.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agodiff-highlight: make perl strict and warnings fatal
Jeff King [Mon, 13 Feb 2012 22:28:10 +0000 (17:28 -0500)]
diff-highlight: make perl strict and warnings fatal

These perl features can catch bugs, and we shouldn't be
violating any of the strict rules or creating any warnings,
so let's turn them on.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agopager: find out the terminal width before spawning the pager
Zbigniew Jędrzejewski-Szmek [Sun, 12 Feb 2012 14:12:32 +0000 (15:12 +0100)]
pager: find out the terminal width before spawning the pager

term_columns() checks for terminal width via ioctl(2) on the standard
output, but we spawn the pager too early for this check to be useful.

The effect of this buglet can be observed by opening a wide terminal and
running "git -p help --all", which still shows 80-column output, while
"git help --all" uses the full terminal width. Run the check before we
spawn the pager to fix this.

While at it, move term_columns() to pager.c and export it from cache.h so
that callers other than the help subsystem can use it.

Signed-off-by: Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agodo not override receive-pack errors
Clemens Buchacher [Mon, 13 Feb 2012 20:17:12 +0000 (21:17 +0100)]
do not override receive-pack errors

Receive runs rev-list --verify-objects in order to detect missing
objects. However, such errors are ignored and overridden later.
Instead, consequently ignore all update commands for which an error has
already been detected.

Some tests in t5504 are obsoleted by this change, because invalid
objects are detected even if fsck is not enabled. Instead, they now test
for different error messages depending on whether or not fsck is turned
on. A better fix would be to force a corruption that will be detected by
fsck but not by rev-list.

Signed-off-by: Clemens Buchacher <drizzd@aon.at>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agot5541: check error message against the real port number used
Clemens Buchacher [Mon, 13 Feb 2012 20:17:14 +0000 (21:17 +0100)]
t5541: check error message against the real port number used

Otherwise the test cannot be run with custom port set to LIB_HTTPD_PORT.

Signed-off-by: Clemens Buchacher <drizzd@aon.at>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agopush/fetch/clone --no-progress suppresses progress output
Clemens Buchacher [Mon, 13 Feb 2012 20:17:15 +0000 (21:17 +0100)]
push/fetch/clone --no-progress suppresses progress output

By default, progress output is disabled if stderr is not a terminal.
The --progress option can be used to force progress output anyways.
Conversely, --no-progress does not force progress output. In particular,
if stderr is a terminal, progress output is enabled.

This is unintuitive. Change --no-progress to force output off.

Signed-off-by: Clemens Buchacher <drizzd@aon.at>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agogit rev-list: fix invalid typecast
Clemens Buchacher [Mon, 13 Feb 2012 20:17:11 +0000 (21:17 +0100)]
git rev-list: fix invalid typecast

git rev-list passes rev_list_info, not rev_list objects. Without this
fix, rev-list enables or disables the --verify-objects option depending
on a read from an undefined memory location.

Signed-off-by: Clemens Buchacher <drizzd@aon.at>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agoSync with maint
Junio C Hamano [Mon, 13 Feb 2012 19:47:01 +0000 (11:47 -0800)]
Sync with maint

Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agoUpdate draft release notes to 1.7.9.1
Junio C Hamano [Mon, 13 Feb 2012 19:46:47 +0000 (11:46 -0800)]
Update draft release notes to 1.7.9.1

Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agoMerge branch 'js/add-e-submodule-fix' into maint
Junio C Hamano [Mon, 13 Feb 2012 19:42:18 +0000 (11:42 -0800)]
Merge branch 'js/add-e-submodule-fix' into maint

* js/add-e-submodule-fix:
  add -e: do not show difference in a submodule that is merely dirty

12 years agoMerge branch 'jc/parse-date-raw' into maint
Junio C Hamano [Mon, 13 Feb 2012 19:42:15 +0000 (11:42 -0800)]
Merge branch 'jc/parse-date-raw' into maint

* jc/parse-date-raw:
  parse_date(): '@' prefix forces git-timestamp
  parse_date(): allow ancient git-timestamp

12 years agoMerge branch 'jc/merge-ff-only-stronger-than-signed-merge' into maint
Junio C Hamano [Mon, 13 Feb 2012 19:42:11 +0000 (11:42 -0800)]
Merge branch 'jc/merge-ff-only-stronger-than-signed-merge' into maint

* jc/merge-ff-only-stronger-than-signed-merge:
  merge: do not create a signed tag merge under --ff-only option

12 years agoMerge branch 'jc/branch-desc-typoavoidance' into maint
Junio C Hamano [Mon, 13 Feb 2012 19:42:07 +0000 (11:42 -0800)]
Merge branch 'jc/branch-desc-typoavoidance' into maint

* jc/branch-desc-typoavoidance:
  branch --edit-description: protect against mistyped branch name
  tests: add write_script helper function

12 years agoMerge branch 'jn/rpm-spec' into maint
Junio C Hamano [Mon, 13 Feb 2012 19:42:04 +0000 (11:42 -0800)]
Merge branch 'jn/rpm-spec' into maint

* jn/rpm-spec:
  git.spec: Workaround localized messages not put in any RPM

12 years agobuiltin/tag.c: Fix a sparse warning
Ramsay Jones [Mon, 13 Feb 2012 18:24:41 +0000 (18:24 +0000)]
builtin/tag.c: Fix a sparse warning

In particular, sparse complains as follows:

        SP builtin/tag.c
    builtin/tag.c:411:5: warning: symbol 'parse_opt_points_at' was \
        not declared. Should it be static?

In order to suppress the warning, since the parse_opt_points_at()
function does not need to be an external symbol, we simply add the
static modifier to the function definition.

Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agot: use sane_unset instead of unset
Ævar Arnfjörð Bjarmason [Sun, 12 Feb 2012 01:05:12 +0000 (01:05 +0000)]
t: use sane_unset instead of unset

Change several tests to use the sane_unset function introduced in
v1.7.3.1-35-g00648ba instead of the built-in unset function.

This fixes a failure I was having on t9130-git-svn-authors-file.sh on
Solaris, and prevents several other issues from occurring.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agoRemove Git's support for smoke testing
Ævar Arnfjörð Bjarmason [Fri, 23 Dec 2011 17:08:18 +0000 (17:08 +0000)]
Remove Git's support for smoke testing

I'm no longer running the Git smoke testing service at
smoke.git.nix.is due to Smolder being a fragile piece of software not
having time to follow through on making it easy for third parties to
run and submit their own smoke tests.

So remove the support in Git for sending smoke tests to
smoke.git.nix.is, it's still easy to modify the test suite to submit
smokes somewhere else.

This reverts the following commits:

    Revert "t/README: Add SMOKE_{COMMENT,TAGS}= to smoke_report target" -- e38efac87d
    Revert "t/README: Document the Smoke testing" -- d15e9ebc5c
    Revert "t/Makefile: Create test-results dir for smoke target" -- 617344d77b
    Revert "tests: Infrastructure for Git smoke testing" -- b6b84d1b74

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agoMakefile: Change the default compiler from "gcc" to "cc"
Ævar Arnfjörð Bjarmason [Tue, 20 Dec 2011 23:40:47 +0000 (23:40 +0000)]
Makefile: Change the default compiler from "gcc" to "cc"

Ever since the very first commit to git.git we've been setting CC to
"gcc". Presumably this is behavior that Linus copied from the Linux
Makefile.

However unlike Linux Git is written in ANSI C and supports a multitude
of compilers, including Clang, Sun Studio, xlc etc. On my Linux box
"cc" is a symlink to clang, and on a Solaris box I have access to "cc"
is Sun Studio's CC.

Both of these are perfectly capable of compiling Git, and it's
annoying to have to specify CC=cc on the command-line when compiling
Git when that's the default behavior of most other portable programs.

So change the default to "cc". Users who want to compile with GCC can
still add "CC=gcc" to the make(1) command-line, but those users who
don't have GCC as their "cc" will see expected behavior, and as a
bonus we'll be more likely to smoke out new compilation warnings from
our distributors since they'll me using a more varied set of compilers
by default.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agoMakefile: introduce CHARSET_LIB to link with -lcharset
Дилян Палаузов [Sun, 12 Feb 2012 16:23:36 +0000 (17:23 +0100)]
Makefile: introduce CHARSET_LIB to link with -lcharset

On some systems, the function locale_charset() may not be exported from
libiconv but is available from libcharset, and we need -lcharset when
linking.

Introduce a make variable CHARSET_LIB that can be set to -lcharsetlib
on such systems.  Also autodetect this in the configure script by first
looking for the symbol in libiconv, and then libcharset.

Signed-off-by: Дилян Палаузов <dilyan.palauzov@aegee.org>
12 years agoUpdate draft release notes to 1.7.10
Junio C Hamano [Mon, 13 Feb 2012 06:58:36 +0000 (22:58 -0800)]
Update draft release notes to 1.7.10

Again this round mostly consists of fixes for 1.7.9 in preparation for
merging these topics down to maint for 1.7.9.1

Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agoMerge branch 'jc/checkout-out-of-unborn'
Junio C Hamano [Mon, 13 Feb 2012 06:43:44 +0000 (22:43 -0800)]
Merge branch 'jc/checkout-out-of-unborn'

* jc/checkout-out-of-unborn:
  git checkout -b: allow switching out of an unborn branch

12 years agoMerge branch 'jc/maint-mailmap-output'
Junio C Hamano [Mon, 13 Feb 2012 06:43:39 +0000 (22:43 -0800)]
Merge branch 'jc/maint-mailmap-output'

* jc/maint-mailmap-output:
  mailmap: always return a plain mail address from map_user()

12 years agoMerge branch 'jk/prompt-fallback-to-tty'
Junio C Hamano [Mon, 13 Feb 2012 06:43:34 +0000 (22:43 -0800)]
Merge branch 'jk/prompt-fallback-to-tty'

* jk/prompt-fallback-to-tty:
  prompt: fall back to terminal if askpass fails
  prompt: clean up strbuf usage

12 years agoMerge branch 'jn/gitweb-search-utf-8'
Junio C Hamano [Mon, 13 Feb 2012 06:43:24 +0000 (22:43 -0800)]
Merge branch 'jn/gitweb-search-utf-8'

* jn/gitweb-search-utf-8:
  gitweb: Allow UTF-8 encoded CGI query parameters and path_info

Conflicts:
gitweb/gitweb.perl

12 years agoMerge branch 'nd/diffstat-gramnum'
Junio C Hamano [Mon, 13 Feb 2012 06:43:19 +0000 (22:43 -0800)]
Merge branch 'nd/diffstat-gramnum'

* nd/diffstat-gramnum:
  Use correct grammar in diffstat summary line

12 years agoMerge branch 'nd/find-pack-entry-recent-cache-invalidation'
Junio C Hamano [Mon, 13 Feb 2012 06:43:03 +0000 (22:43 -0800)]
Merge branch 'nd/find-pack-entry-recent-cache-invalidation'

* nd/find-pack-entry-recent-cache-invalidation:
  find_pack_entry(): do not keep packed_git pointer locally
  sha1_file.c: move the core logic of find_pack_entry() into fill_pack_entry()

12 years agoMerge branch 'tt/profile-build-fix'
Junio C Hamano [Mon, 13 Feb 2012 06:42:46 +0000 (22:42 -0800)]
Merge branch 'tt/profile-build-fix'

* tt/profile-build-fix:
  Makefile: fix syntax for older make
  Fix build problems related to profile-directed optimization

12 years agoMerge branch 'nd/cache-tree-api-refactor'
Junio C Hamano [Mon, 13 Feb 2012 06:42:42 +0000 (22:42 -0800)]
Merge branch 'nd/cache-tree-api-refactor'

* nd/cache-tree-api-refactor:
  cache-tree: update API to take abitrary flags

12 years agoMerge branch 'fc/zsh-completion'
Junio C Hamano [Mon, 13 Feb 2012 06:42:35 +0000 (22:42 -0800)]
Merge branch 'fc/zsh-completion'

* fc/zsh-completion:
  completion: simplify __gitcomp and __gitcomp_nl implementations
  completion: use ls -1 instead of rolling a loop to do that ourselves
  completion: work around zsh option propagation bug

12 years agoMerge branch 'mp/make-cleanse-x-for-exe'
Junio C Hamano [Mon, 13 Feb 2012 06:42:17 +0000 (22:42 -0800)]
Merge branch 'mp/make-cleanse-x-for-exe'

* mp/make-cleanse-x-for-exe:
  Explicitly set X to avoid potential build breakage

12 years agoMerge branch 'bw/inet-pton-ntop-compat'
Junio C Hamano [Mon, 13 Feb 2012 06:42:14 +0000 (22:42 -0800)]
Merge branch 'bw/inet-pton-ntop-compat'

* bw/inet-pton-ntop-compat:
  Drop system includes from inet_pton/inet_ntop compatibility wrappers

12 years agoMerge branch 'jc/maint-commit-ignore-i-t-a'
Junio C Hamano [Mon, 13 Feb 2012 06:42:10 +0000 (22:42 -0800)]
Merge branch 'jc/maint-commit-ignore-i-t-a'

* jc/maint-commit-ignore-i-t-a:
  commit: ignore intent-to-add entries instead of refusing

Conflicts:
cache-tree.c

12 years agoMerge branch 'jk/maint-tag-show-fixes'
Junio C Hamano [Mon, 13 Feb 2012 06:42:06 +0000 (22:42 -0800)]
Merge branch 'jk/maint-tag-show-fixes'

* jk/maint-tag-show-fixes:
  tag: do not show non-tag contents with "-n"
  tag: die when listing missing or corrupt objects
  tag: fix output of "tag -n" when errors occur

Conflicts:
t/t7004-tag.sh

12 years agoMerge branch 'mm/empty-loose-error-message'
Junio C Hamano [Mon, 13 Feb 2012 06:42:02 +0000 (22:42 -0800)]
Merge branch 'mm/empty-loose-error-message'

* mm/empty-loose-error-message:
  fsck: give accurate error message on empty loose object files

12 years agoMerge branch 'nk/ctype-for-perf'
Junio C Hamano [Mon, 13 Feb 2012 06:41:56 +0000 (22:41 -0800)]
Merge branch 'nk/ctype-for-perf'

* nk/ctype-for-perf:
  ctype: implement islower/isupper macro
  ctype.c only wants git-compat-util.h

12 years agoMerge branch 'jn/merge-no-edit-fix'
Junio C Hamano [Mon, 13 Feb 2012 06:41:51 +0000 (22:41 -0800)]
Merge branch 'jn/merge-no-edit-fix'

* jn/merge-no-edit-fix:
  merge: do not launch an editor on "--no-edit $tag"

Conflicts:
builtin/merge.c

12 years agogitweb: Harden and improve $project_filter page title
Jakub Narebski [Sun, 12 Feb 2012 15:21:30 +0000 (16:21 +0100)]
gitweb: Harden and improve $project_filter page title

Commit 19d2d23 (gitweb: add project_filter to limit project list
to a subdirectory, 2012-01-30) added also support for displaying
$project_filter, if present, in page title.

Unfortunately it forgot to treat $project_filter as path, and escape
it using esc_path(), like it is done for $filename.

Also, it was not obvious that "$site_name - $project_filter" is about
project filtering: use "$site_name - projects in '$project_filter'".

Signed-off-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agorefs: remove the extra_refs API
Michael Haggerty [Sat, 11 Feb 2012 06:21:01 +0000 (07:21 +0100)]
refs: remove the extra_refs API

The extra_refs provided a kludgy way to create fake references at a
global level in the hope that they would only affect some particular
code path.  The last user of this API been rewritten, so strip this
stuff out before somebody else gets the bad idea of using it.

Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agoclone: do not add alternate references to extra_refs
Michael Haggerty [Sat, 11 Feb 2012 06:21:00 +0000 (07:21 +0100)]
clone: do not add alternate references to extra_refs

Alternate references are directly (and now, correctly) handled by
fetch-pack, so there is no need to inform fetch-pack about them via
the extra_refs back channel.

Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agoeverything_local(): mark alternate refs as complete
Michael Haggerty [Sat, 11 Feb 2012 06:20:59 +0000 (07:20 +0100)]
everything_local(): mark alternate refs as complete

Objects in an alternate object database are already available to the
local repository and therefore don't need to be fetched.  So mark them
as complete in everything_local().

This fixes a test in t5700.

Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agofetch-pack.c: inline insert_alternate_refs()
Michael Haggerty [Sat, 11 Feb 2012 06:20:58 +0000 (07:20 +0100)]
fetch-pack.c: inline insert_alternate_refs()

The logic of the (single) caller is clearer without encapsulating this
one line in a function.

Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agofetch-pack.c: rename some parameters from "path" to "refname"
Michael Haggerty [Sat, 11 Feb 2012 06:20:57 +0000 (07:20 +0100)]
fetch-pack.c: rename some parameters from "path" to "refname"

The parameters denote reference names, which are no longer 1:1 with
filesystem paths.

Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agoclone.c: move more code into the "if (refs)" conditional
Michael Haggerty [Sat, 11 Feb 2012 06:20:56 +0000 (07:20 +0100)]
clone.c: move more code into the "if (refs)" conditional

The bahavior of a bunch of code before the "if (refs)" statement also
depends on whether refs is set, so make the logic clearer by shifting
this code into the if statement.

Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agot5700: document a failure of alternates to affect fetch
Michael Haggerty [Sat, 11 Feb 2012 06:20:55 +0000 (07:20 +0100)]
t5700: document a failure of alternates to affect fetch

If an alternate supplies some, but not all, of the objects needed for
a fetch, fetch-pack nevertheless generates "want" lines for the
alternate objects that are present.  Demonstrate this problem via a
failing test.

Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years ago"git pull" doesn't know "--edit"
Linus Torvalds [Sat, 11 Feb 2012 18:21:03 +0000 (10:21 -0800)]
"git pull" doesn't know "--edit"

Ok, so now "git merge" defaults to editing when interactive - lovely. But
when testing that, I noticed that while you can say

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

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

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

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

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

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

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agomergetools/meld: Use --help output to detect --output support
Jonathan Nieder [Fri, 10 Feb 2012 21:57:55 +0000 (15:57 -0600)]
mergetools/meld: Use --help output to detect --output support

In v1.7.7-rc0~3^2 (2011-08-19), git mergetool's "meld" support learned
to use the --output option when calling versions of meld that are
detected to support it (1.5.0 and newer, hopefully).

Alas, it misdetects old versions (before 1.1.5, 2006-06-11) of meld as
supporting the option, so on systems with such meld, instead of
getting a nice merge helper, the operator gets a dialog box with the
text "Wrong number of arguments (Got 5)".  (Version 1.1.5 is when meld
switched to using optparse.  One consequence of that change was that
errors in usage are detected and signalled through the exit status
even when --help was passed.)

Luckily there is a simpler check that is more reliable: the usage
string printed by "meld --help" reliably reflects whether --output is
supported in a given version.  Use it.

Reported-by: Jeff Epler <jepler@unpythonic.net>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agoUpdate draft release notes to 1.7.10
Junio C Hamano [Fri, 10 Feb 2012 22:15:38 +0000 (14:15 -0800)]
Update draft release notes to 1.7.10

Document bunch of bugfix topics to be merged down to 'maint' soonish
for 1.7.9.1 maintenance release.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agoMerge branch 'js/add-e-submodule-fix'
Junio C Hamano [Fri, 10 Feb 2012 22:08:27 +0000 (14:08 -0800)]
Merge branch 'js/add-e-submodule-fix'

* js/add-e-submodule-fix:
  add -e: do not show difference in a submodule that is merely dirty

12 years agoMerge branch 'jc/parse-date-raw'
Junio C Hamano [Fri, 10 Feb 2012 22:08:12 +0000 (14:08 -0800)]
Merge branch 'jc/parse-date-raw'

* jc/parse-date-raw:
  parse_date(): '@' prefix forces git-timestamp
  parse_date(): allow ancient git-timestamp

12 years agoMerge branch 'jc/merge-ff-only-stronger-than-signed-merge'
Junio C Hamano [Fri, 10 Feb 2012 22:08:02 +0000 (14:08 -0800)]
Merge branch 'jc/merge-ff-only-stronger-than-signed-merge'

* jc/merge-ff-only-stronger-than-signed-merge:
  merge: do not create a signed tag merge under --ff-only option

12 years agoMerge branch 'jc/branch-desc-typoavoidance'
Junio C Hamano [Fri, 10 Feb 2012 22:07:58 +0000 (14:07 -0800)]
Merge branch 'jc/branch-desc-typoavoidance'

* jc/branch-desc-typoavoidance:
  branch --edit-description: protect against mistyped branch name

12 years agoMerge branch 'jn/rpm-spec'
Junio C Hamano [Fri, 10 Feb 2012 22:07:49 +0000 (14:07 -0800)]
Merge branch 'jn/rpm-spec'

* jn/rpm-spec:
  git.spec: Workaround localized messages not put in any RPM

12 years agoMerge branch 'jk/tests-write-script'
Junio C Hamano [Fri, 10 Feb 2012 22:07:42 +0000 (14:07 -0800)]
Merge branch 'jk/tests-write-script'

* jk/tests-write-script:
  t0300: use write_script helper
  tests: add write_script helper function

12 years agoSync with maint
Junio C Hamano [Fri, 10 Feb 2012 22:04:32 +0000 (14:04 -0800)]
Sync with maint

12 years agoUpdate draft release notes to 1.7.9.1
Junio C Hamano [Fri, 10 Feb 2012 22:04:20 +0000 (14:04 -0800)]
Update draft release notes to 1.7.9.1

Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agoMerge branch 'jc/maint-request-pull-for-tag' into maint
Junio C Hamano [Fri, 10 Feb 2012 21:59:02 +0000 (13:59 -0800)]
Merge branch 'jc/maint-request-pull-for-tag' into maint

* jc/maint-request-pull-for-tag:
  request-pull: explicitly ask tags/$name to be pulled

12 years agoMerge branch 'tr/grep-l-with-decoration' into maint
Junio C Hamano [Fri, 10 Feb 2012 21:59:02 +0000 (13:59 -0800)]
Merge branch 'tr/grep-l-with-decoration' into maint

* tr/grep-l-with-decoration:
  grep: fix -l/-L interaction with decoration lines

12 years agoMerge branch 'jl/submodule-re-add' into maint
Junio C Hamano [Fri, 10 Feb 2012 21:59:01 +0000 (13:59 -0800)]
Merge branch 'jl/submodule-re-add' into maint

* jl/submodule-re-add:
  submodule add: fix breakage when re-adding a deep submodule

12 years agoMerge branch 'da/maint-mergetool-twoway' into maint
Junio C Hamano [Fri, 10 Feb 2012 21:59:01 +0000 (13:59 -0800)]
Merge branch 'da/maint-mergetool-twoway' into maint

* da/maint-mergetool-twoway:
  mergetool: Provide an empty file when needed

12 years agoctype: implement islower/isupper macro
Namhyung Kim [Fri, 10 Feb 2012 02:13:31 +0000 (11:13 +0900)]
ctype: implement islower/isupper macro

"perf" uses a the forked copy of this file, and wants to use these two
macros.

Signed-off-by: Namhyung Kim <namhyung.kim@lge.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agoctype.c only wants git-compat-util.h
Namhyung Kim [Fri, 10 Feb 2012 02:13:30 +0000 (11:13 +0900)]
ctype.c only wants git-compat-util.h

The implementation of sane ctype macros only depends on symbols in
git-compat-util.h not cache.h

Signed-off-by: Namhyung Kim <namhyung.kim@lge.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agoExplicitly set X to avoid potential build breakage
Michael Palimaka [Wed, 8 Feb 2012 10:59:04 +0000 (21:59 +1100)]
Explicitly set X to avoid potential build breakage

$X is appended to binary names for Windows builds (ie. git.exe).
Pollution from the environment can inadvertently trigger this behaviour,
resulting in 'git' turning into 'gitwhatever' without warning.

Signed-off-by: Michael Palimaka <kensington@astralcloak.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agomerge: do not launch an editor on "--no-edit $tag"
Junio C Hamano [Thu, 9 Feb 2012 21:30:52 +0000 (13:30 -0800)]
merge: do not launch an editor on "--no-edit $tag"

When the user explicitly asked us not to, don't launch an editor.

But do everything else the same way as the "edit" case, i.e. leave the
comment with verification result in the log template and record the
mergesig in the resulting merge commit for later inspection.

Based on initiail analysis by Jonathan Nieder.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agoMakefile: fix syntax for older make
Johannes Sixt [Thu, 9 Feb 2012 08:22:26 +0000 (09:22 +0100)]
Makefile: fix syntax for older make

It is necessary to write the else branch as a nested conditional. Also,
write the conditions with parentheses because we use them throughout the
Makefile.

Signed-off-by: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agotag: do not show non-tag contents with "-n"
Junio C Hamano [Mon, 6 Feb 2012 18:13:27 +0000 (10:13 -0800)]
tag: do not show non-tag contents with "-n"

"git tag -n" did not check the type of the object it is reading the top n
lines from. At least, avoid showing the beginning of trees and blobs when
dealing with lightweight tags that point at them.

As the payload of a tag and a commit look similar in that they both start
with a header block, which is skipped for the purpose of "-n" output,
followed by human readable text, allow the message of commit objects to be
shown just like the contents of tag objects. This avoids regression for
people who have been using "tag -n" to show the log messages of commits
that are pointed at by lightweight tags.

Test script is from Jeff King.

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