Code

git.git
12 years agoMerge branch 'pj/remote-set-branches-usage-fix'
Junio C Hamano [Thu, 23 Feb 2012 21:30:00 +0000 (13:30 -0800)]
Merge branch 'pj/remote-set-branches-usage-fix'

* pj/remote-set-branches-usage-fix:
  remote: fix set-branches usage and documentation

Conflicts:
builtin/remote.c

12 years agoMerge branch 'tr/perftest'
Junio C Hamano [Thu, 23 Feb 2012 21:29:56 +0000 (13:29 -0800)]
Merge branch 'tr/perftest'

* tr/perftest:
  Add a performance test for git-grep
  Introduce a performance testing framework
  Move the user-facing test library to test-lib-functions.sh

12 years agoMerge branch 'maint'
Junio C Hamano [Thu, 23 Feb 2012 21:29:10 +0000 (13:29 -0800)]
Merge branch 'maint'

* maint:
  README: point to Documentation/SubmittingPatches
  Document merge.branchdesc configuration variable

12 years agomerge: do not trust fstat(2) too much when checking interactiveness
Junio C Hamano [Thu, 23 Feb 2012 19:24:44 +0000 (11:24 -0800)]
merge: do not trust fstat(2) too much when checking interactiveness

The heuristic used by "git merge" to decide if it automatically gives an
editor upon clean automerge is to see if the standard input and the
standard output is the same device and is a tty, we are in an interactive
session.  "The same device" test was done by comparing fstat(2) result on
the two file descriptors (and they must match), and we asked isatty() only
for the standard input (we insist that they are the same device and there
is no point asking tty-ness of the standard output).

The stat(2) emulation in the Windows port however does not give a usable
value in the st_ino field, so even if the standard output is connected to
something different from the standard input, "The same device" test may
incorrectly return true. To accomodate it, add another isatty() check for
the standard output stream as well.

Reported-by: Erik Faye-Lund <kusmabite@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agoREADME: point to Documentation/SubmittingPatches
Matthieu Moy [Thu, 23 Feb 2012 12:52:06 +0000 (13:52 +0100)]
README: point to Documentation/SubmittingPatches

It was indeed not obvious for new contributors to find this document in
the source tree, since there were no reference to it outside the
Documentation/ directory.

Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agoDocument merge.branchdesc configuration variable
Junio C Hamano [Thu, 23 Feb 2012 19:20:15 +0000 (11:20 -0800)]
Document merge.branchdesc configuration variable

This was part of the "branch description" feature in the larger
"help people communicate better during their pull based workflow"
topic, but was never documented.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agoSync with 1.7.9.2
Junio C Hamano [Thu, 23 Feb 2012 01:49:02 +0000 (17:49 -0800)]
Sync with 1.7.9.2

Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agoGit 1.7.9.2 v1.7.9.2
Junio C Hamano [Thu, 23 Feb 2012 01:48:01 +0000 (17:48 -0800)]
Git 1.7.9.2

Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agocompletion: use tabs for indentation
Philip Jägenstedt [Wed, 22 Feb 2012 08:58:13 +0000 (09:58 +0100)]
completion: use tabs for indentation

CodingGuidlines confidently declares "We use tabs for indentation."
It would be a shame if it were caught lying.

Signed-off-by: Philip Jägenstedt <philip@foolip.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agocompletion: remove stale "to submit patches" documentation
Philip Jägenstedt [Wed, 22 Feb 2012 08:58:12 +0000 (09:58 +0100)]
completion: remove stale "to submit patches" documentation

It was out-of-sync with the reality of who works on this
script. Defer (silently) to Documentation/SubmittingPatches
like all other code.

Signed-off-by: Philip Jägenstedt <philip@foolip.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agogit-p4: the option to specify 'host' is -H, not -h
Russell Myers [Wed, 22 Feb 2012 19:16:05 +0000 (11:16 -0800)]
git-p4: the option to specify 'host' is -H, not -h

This was broken since the feature was introduced initially at abcaf07 (If
the user has configured various parameters, use them., 2008-08-10).

Acked-by: Pete Wyckoff <pw@padd.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agot9100: remove bogus " || test" after each test scriptlet
Junio C Hamano [Wed, 22 Feb 2012 05:10:33 +0000 (21:10 -0800)]
t9100: remove bogus " || test" after each test scriptlet

Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agoMerge branch 'master' of git://bogomips.org/git-svn
Junio C Hamano [Wed, 22 Feb 2012 02:11:31 +0000 (18:11 -0800)]
Merge branch 'master' of git://bogomips.org/git-svn

* 'master' of git://bogomips.org/git-svn:
  git-svn.perl: fix a false-positive in the "already exists" test
  git-svn.perl: perform deletions before anything else
  git-svn: Fix time zone in --localtime
  git-svn: un-break "git svn rebase" when log.abbrevCommit=true
  git-svn: remove redundant porcelain option to rev-list
  completion: add --interactive option to git svn dcommit

12 years agoUpdate draft release notes to 1.7.10
Junio C Hamano [Tue, 21 Feb 2012 23:29:29 +0000 (15:29 -0800)]
Update draft release notes to 1.7.10

Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agoMerge branch 'jn/gitweb-unborn-head'
Junio C Hamano [Tue, 21 Feb 2012 23:25:53 +0000 (15:25 -0800)]
Merge branch 'jn/gitweb-unborn-head'

* jn/gitweb-unborn-head:
  gitweb: Fix "heads" view when there is no current branch

12 years agoMerge branch 'jk/diff-highlight'
Junio C Hamano [Tue, 21 Feb 2012 23:25:39 +0000 (15:25 -0800)]
Merge branch 'jk/diff-highlight'

* jk/diff-highlight:
  diff-highlight: document some non-optimal cases
  diff-highlight: match multi-line hunks
  diff-highlight: refactor to prepare for multi-line hunks
  diff-highlight: don't highlight whole lines
  diff-highlight: make perl strict and warnings fatal

12 years agoMerge branch 'maint'
Junio C Hamano [Tue, 21 Feb 2012 23:18:00 +0000 (15:18 -0800)]
Merge branch 'maint'

* maint:
  Update draft release notes to 1.7.9.2
  completion: Allow dash as the first character for __git_ps1

12 years agoUpdate draft release notes to 1.7.9.2
Junio C Hamano [Tue, 21 Feb 2012 23:16:34 +0000 (15:16 -0800)]
Update draft release notes to 1.7.9.2

Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agoMerge branch 'cb/receive-pack-keep-errors' into maint
Junio C Hamano [Tue, 21 Feb 2012 23:14:41 +0000 (15:14 -0800)]
Merge branch 'cb/receive-pack-keep-errors' into maint

* cb/receive-pack-keep-errors:
  do not override receive-pack errors

12 years agoMerge branch 'cb/transfer-no-progress' into maint
Junio C Hamano [Tue, 21 Feb 2012 23:14:37 +0000 (15:14 -0800)]
Merge branch 'cb/transfer-no-progress' into maint

* cb/transfer-no-progress:
  push/fetch/clone --no-progress suppresses progress output

12 years agoMerge branch 'jk/git-dir-lookup' into maint
Junio C Hamano [Tue, 21 Feb 2012 23:13:16 +0000 (15:13 -0800)]
Merge branch 'jk/git-dir-lookup' into maint

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

12 years agoMerge branch 'jc/diff-stat-scaler' into maint
Junio C Hamano [Tue, 21 Feb 2012 23:00:33 +0000 (15:00 -0800)]
Merge branch 'jc/diff-stat-scaler' into maint

* jc/diff-stat-scaler:
  diff --stat: show bars of same length for paths with same amount of changes

12 years agoMerge branch 'zj/term-columns' into maint
Junio C Hamano [Tue, 21 Feb 2012 23:00:15 +0000 (15:00 -0800)]
Merge branch 'zj/term-columns' into maint

* zj/term-columns:
  pager: find out the terminal width before spawning the pager

12 years agoMerge branch 'cb/maint-rev-list-verify-object' into maint
Junio C Hamano [Tue, 21 Feb 2012 22:59:35 +0000 (14:59 -0800)]
Merge branch 'cb/maint-rev-list-verify-object' into maint

* cb/maint-rev-list-verify-object:
  git rev-list: fix invalid typecast

12 years agoMerge branch 'cb/maint-t5541-make-server-port-portable' into maint
Junio C Hamano [Tue, 21 Feb 2012 22:57:40 +0000 (14:57 -0800)]
Merge branch 'cb/maint-t5541-make-server-port-portable' into maint

* cb/maint-t5541-make-server-port-portable:
  t5541: check error message against the real port number used

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

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

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

* 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/diffstat-gramnum' into maint
Junio C Hamano [Tue, 21 Feb 2012 22:56:39 +0000 (14:56 -0800)]
Merge branch 'nd/diffstat-gramnum' into maint

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

12 years agoMerge branch 'nd/find-pack-entry-recent-cache-invalidation' into maint
Junio C Hamano [Tue, 21 Feb 2012 22:56:36 +0000 (14:56 -0800)]
Merge branch 'nd/find-pack-entry-recent-cache-invalidation' into maint

* 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' into maint
Junio C Hamano [Tue, 21 Feb 2012 22:56:06 +0000 (14:56 -0800)]
Merge branch 'tt/profile-build-fix' into maint

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

12 years agoMerge branch 'fc/zsh-completion' into maint
Junio C Hamano [Tue, 21 Feb 2012 22:55:50 +0000 (14:55 -0800)]
Merge branch 'fc/zsh-completion' into maint

* 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 agogit-svn.perl: fix a false-positive in the "already exists" test
Steven Walter [Mon, 20 Feb 2012 14:17:54 +0000 (09:17 -0500)]
git-svn.perl: fix a false-positive in the "already exists" test

open_or_add_dir checks to see if the directory already exists or not.
If it already exists and is not a directory, then we fail.  However,
open_or_add_dir did not previously account for the possibility that the
path did exist as a file, but is deleted in the current commit.

In order to prevent this legitimate case from failing, open_or_add_dir
needs to know what files are deleted in the current commit.
Unfortunately that information has to be plumbed through a couple of
layers.

Signed-off-by: Steven Walter <stevenrwalter@gmail.com>
Acked-by: Eric Wong <normalperson@yhbt.net>
12 years agogit-svn.perl: perform deletions before anything else
Steven Walter [Thu, 9 Feb 2012 20:52:22 +0000 (15:52 -0500)]
git-svn.perl: perform deletions before anything else

If we delete a file and recreate it as a directory in a single commit,
we have to tell the server about the deletion first or else we'll get
"RA layer request failed: Server sent unexpected return value (405
Method Not Allowed) in response to MKCOL request"

Signed-off-by: Steven Walter <stevenrwalter@gmail.com>
Acked-by: Eric Wong <normalperson@yhbt.net>
12 years agogit-svn: Fix time zone in --localtime
Wei-Yin Chen (陳威尹) [Mon, 19 Dec 2011 08:11:05 +0000 (16:11 +0800)]
git-svn: Fix time zone in --localtime

Use numerical form of time zone to replace alphabetic time zone
abbreviation generated by "%Z". "%Z" is not portable and contain
ambiguity for many areas. For example, CST could be "Central
Standard Time" (GMT-0600) and "China Standard Time" (GMT+0800).
Alphabetic time zone abbreviation is meant for human readability,
not for specifying a time zone for machines.

Failed case can be illustrated like this in linux shell:
  > echo $TZ
  Asia/Taipei
  > date +%Z
  CST
  > env TZ=`date +%Z` date
  Mon Dec 19 06:03:04 CST 2011
  > date
  Mon Dec 19 14:03:04 CST 2011

[ew: fixed bad package reference inside Git::SVN::Log]

Signed-off-by: Wei-Yin Chen (陳威尹) <chen.weiyin@gmail.com>
Acked-by: Eric Wong <normalperson@yhbt.net>
12 years agogit-svn: un-break "git svn rebase" when log.abbrevCommit=true
Ævar Arnfjörð Bjarmason [Sun, 12 Feb 2012 00:23:06 +0000 (00:23 +0000)]
git-svn: un-break "git svn rebase" when log.abbrevCommit=true

Change git-svn to use git-rev-list(1) instead of git-log(1) since the
latter is porcelain that'll cause "git svn rebase" to fail completely
if log.abbrevCommit is set to true in the configuration.

Without this patch the code will fail to parse a SHA1, and then just
spew a bunch of "Use of uninitialized value $hash in string eq"
warnings at "if ($c && $c eq $hash) { ..." and never do anything
useful.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Helped-by: Jonathan Nieder <jrnieder@gmail.com>
Acked-by: Eric Wong <normalperson@yhbt.net>
12 years agogit-svn: remove redundant porcelain option to rev-list
Ævar Arnfjörð Bjarmason [Sun, 12 Feb 2012 00:23:05 +0000 (00:23 +0000)]
git-svn: remove redundant porcelain option to rev-list

Change an invocation of git-rev-list(1) to not use --no-color,
git-rev-list(1) will always ignore that option and the --color option,
so there's no need to pass it.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Acked-by: Eric Wong <normalperson@yhbt.net>
12 years agocompletion: add --interactive option to git svn dcommit
Frederic Heitzmann [Thu, 3 Nov 2011 18:33:30 +0000 (19:33 +0100)]
completion: add --interactive option to git svn dcommit

see afd7f1e for more details on git svn dcommit --interactive

Signed-off-by: Frederic Heitzmann <frederic.heitzmann@gmail.com>
Acked-by: Eric Wong <normalperson@yhbt.net>
12 years agocompletion: Allow dash as the first character for __git_ps1
Christian Hammerl [Mon, 20 Feb 2012 12:17:53 +0000 (13:17 +0100)]
completion: Allow dash as the first character for __git_ps1

If the argument for `__git_ps1` begins with a dash, `printf` tries to
interpret it as an option which results in an error message.
The problem is solved by adding '--' before the argument to tell
`printf` to not interpret the following argument as an option.
Adding '--' directly to the argument does not help because the argument
is enclosed by double quotes.

Signed-off-by: Christian Hammerl <info@christian-hammerl.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agoUpdate draft release notes to 1.7.10
Junio C Hamano [Mon, 20 Feb 2012 08:29:40 +0000 (00:29 -0800)]
Update draft release notes to 1.7.10

Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agoMerge branch 'tg/tag-points-at'
Junio C Hamano [Mon, 20 Feb 2012 08:15:28 +0000 (00:15 -0800)]
Merge branch 'tg/tag-points-at'

* tg/tag-points-at:
  builtin/tag.c: Fix a sparse warning
  tag: add --points-at list option

12 years agoMerge branch 'jc/diff-stat-scaler'
Junio C Hamano [Mon, 20 Feb 2012 08:15:15 +0000 (00:15 -0800)]
Merge branch 'jc/diff-stat-scaler'

* jc/diff-stat-scaler:
  diff --stat: show bars of same length for paths with same amount of changes

12 years agoMerge branch 'zj/decimal-width'
Junio C Hamano [Mon, 20 Feb 2012 08:15:11 +0000 (00:15 -0800)]
Merge branch 'zj/decimal-width'

* zj/decimal-width:
  make lineno_width() from blame reusable for others

Conflicts:
cache.h
pager.c

12 years agoMerge branch 'zj/term-columns'
Junio C Hamano [Mon, 20 Feb 2012 08:15:06 +0000 (00:15 -0800)]
Merge branch 'zj/term-columns'

* zj/term-columns:
  pager: find out the terminal width before spawning the pager

12 years agoMerge branch 'cb/transfer-no-progress'
Junio C Hamano [Mon, 20 Feb 2012 08:14:55 +0000 (00:14 -0800)]
Merge branch 'cb/transfer-no-progress'

* cb/transfer-no-progress:
  push/fetch/clone --no-progress suppresses progress output

12 years agoMerge branch 'cb/receive-pack-keep-errors'
Junio C Hamano [Mon, 20 Feb 2012 08:14:50 +0000 (00:14 -0800)]
Merge branch 'cb/receive-pack-keep-errors'

* cb/receive-pack-keep-errors:
  do not override receive-pack errors

12 years agoMerge branch 'cb/maint-t5541-make-server-port-portable'
Junio C Hamano [Mon, 20 Feb 2012 08:14:46 +0000 (00:14 -0800)]
Merge branch 'cb/maint-t5541-make-server-port-portable'

* cb/maint-t5541-make-server-port-portable:
  t5541: check error message against the real port number used

12 years agoMerge branch 'cb/maint-rev-list-verify-object'
Junio C Hamano [Mon, 20 Feb 2012 08:14:41 +0000 (00:14 -0800)]
Merge branch 'cb/maint-rev-list-verify-object'

* cb/maint-rev-list-verify-object:
  git rev-list: fix invalid typecast

12 years agoMerge branch 'maint'
Junio C Hamano [Mon, 20 Feb 2012 08:14:17 +0000 (00:14 -0800)]
Merge branch 'maint'

* maint:
  Update draft release notes to 1.7.9.2
  gitweb: Fix 'grep' search for multiple matches in file

12 years agoUpdate draft release notes to 1.7.9.2
Junio C Hamano [Mon, 20 Feb 2012 08:14:00 +0000 (00:14 -0800)]
Update draft release notes to 1.7.9.2

Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agoremote: fix set-branches usage and documentation
Philip Jägenstedt [Sat, 18 Feb 2012 11:17:47 +0000 (12:17 +0100)]
remote: fix set-branches usage and documentation

The canonical order of command line arguments is always to have dashed
commands before other parameters, but the "git remote set-branches"
subcommand was described to take "name" before an optional "--add".

Signed-off-by: Philip Jägenstedt <philip@foolip.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agogitweb: Fix 'grep' search for multiple matches in file
Jakub Narebski [Wed, 15 Feb 2012 16:37:06 +0000 (17:37 +0100)]
gitweb: Fix 'grep' search for multiple matches in file

Commit ff7f218 (gitweb: Fix file links in "grep" search, 2012-01-05),
added $file_href variable, to reduce duplication and have the fix
applied in single place.

Unfortunately it made variable defined inside the loop, not taking into
account the fact that $file_href was set only if file changed.
Therefore for files with multiple matches $file_href was undefined for
second and subsequent matches.

Fix this bug by moving $file_href declaration outside loop.

Adds tests for almost all forms of sarch in gitweb, which were missing
from testuite.  Note that it only tests if there are no warnings, and
it doesn't check that gitweb finds what it should find.

Signed-off-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agogitweb: Fix "heads" view when there is no current branch
Jakub Narebski [Wed, 15 Feb 2012 15:36:41 +0000 (16:36 +0100)]
gitweb: Fix "heads" view when there is no current branch

In a repository whose HEAD points to an unborn branch with no commits,
"heads" view and "summary" view (which shows what is shown in "heads"
view) compared the object names of commits at the tip of branches with the
output from "git rev-parse HEAD", which caused comparison of a string with
undef and resulted in a warning in the server log.

This can happen if non-bare repository (with default 'master' branch)
is updated not via committing but by other means like push to it, or
Gerrit.  It can happen also just after running "git checkout --orphan
<new branch>" but before creating any new commit on this branch.

Rewrite the comparison so that it also works when $head points at nothing;
in such a case, no branch can be "the current branch", add a test for it.
While at it, rename local variable $head to $head_at, as it points to
current commit rather than current branch name (HEAD contents).

The code still incorrectly shows all branches that point at the same
commit as what HEAD points as "the current branch", even when HEAD is
detached. Fixing this bug is outside the scope of this patch.

Reported-by: Rajesh Boyapati
Signed-off-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agoAdd a performance test for git-grep
Thomas Rast [Fri, 17 Feb 2012 10:25:10 +0000 (11:25 +0100)]
Add a performance test for git-grep

The only catch is that we don't really know what our repo contains, so
we have to ignore any possible "not found" status from git-grep.

Signed-off-by: Thomas Rast <trast@student.ethz.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agoIntroduce a performance testing framework
Thomas Rast [Fri, 17 Feb 2012 10:25:09 +0000 (11:25 +0100)]
Introduce a performance testing framework

This introduces a performance testing framework under t/perf/.  It
tries to be as close to the test-lib.sh infrastructure as possible,
and thus should be easy to get used to for git developers.

The following points were considered for the implementation:

1. You usually want to compare arbitrary revisions/build trees against
   each other.  They may not have the performance test under
   consideration, or even the perf-lib.sh infrastructure.

   To cope with this, the 'run' script lets you specify arbitrary
   build dirs and revisions.  It even automatically builds the revisions
   if it doesn't have them at hand yet.

2. Usually you would not want to run all tests.  It would take too
   long anyway.  The 'run' script lets you specify which tests to run;
   or you can also do it manually.  There is a Makefile for
   discoverability and 'make clean', but it is not meant for
   real-world use.

3. Creating test repos from scratch in every test is extremely
   time-consuming, and shipping or downloading such large/weird repos
   is out of the question.

   We leave this decision to the user.  Two different sizes of test
   repos can be configured, and the scripts just copy one or more of
   those (using hardlinks for the object store).  By default it tries
   to use the build tree's git.git repository.

   This is fairly fast and versatile.  Using a copy instead of a clone
   preserves many properties that the user may want to test for, such
   as lots of loose objects, unpacked refs, etc.

Signed-off-by: Thomas Rast <trast@student.ethz.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agoMove the user-facing test library to test-lib-functions.sh
Thomas Rast [Fri, 17 Feb 2012 10:25:08 +0000 (11:25 +0100)]
Move the user-facing test library to test-lib-functions.sh

This just moves all the user-facing functions to a separate file and
sources that instead.

Signed-off-by: Thomas Rast <trast@student.ethz.ch>
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