gitweb.git
status: add --columnNguyễn Thái Ngọc Duy Fri, 13 Apr 2012 10:54:39 +0000 (17:54 +0700)

status: add --column

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

branch: add --columnNguyễn Thái Ngọc Duy Fri, 13 Apr 2012 10:54:38 +0000 (17:54 +0700)

branch: add --column

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

help: reuse print_columns() for help -aNguyễn Thái Ngọc Duy Fri, 13 Apr 2012 10:54:37 +0000 (17:54 +0700)

help: reuse print_columns() for help -a

"help -a" also respects column.ui (and column.help if presents)

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

column: add dense layout supportNguyễn Thái Ngọc Duy Fri, 13 Apr 2012 10:54:36 +0000 (17:54 +0700)

column: add dense layout support

Normally all cells (and in turn columns) share the same width. This
layout mode can waste space because one long item can stretch our all
columns.

With COL_DENSE enabled, column width is calculated indepdendently. All
columns are shrunk to minimum, then it attempts to push cells of the
last row over to the next column with hope that everything still fits
even there's one row less. The process is repeated until the new layout
cannot fit in given width any more, or there's only one row left
(perfect!).

Apparently, this mode consumes more cpu than the old one, but it makes
better use of terminal space. For layouting one or two screens, cpu
usage should not be detectable.

This patch introduces option handling code besides layout modes and
enable/disable to expose this feature as "dense". The feature can be
turned off by specifying "nodense".

Thanks-to: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

t9002: work around shells that are unable to set COLUMN... Zbigniew Jędrzejewski-Szmek Fri, 27 Apr 2012 09:25:25 +0000 (11:25 +0200)

t9002: work around shells that are unable to set COLUMNS to 1

In t9002-column.sh, file with expected output was shared between two
test cases, but set in the first one. Since the first test case can
now be skipped, setting up the expected output is moved outside of the
test case.

Signed-off-by: Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

column: add columnar layoutNguyễn Thái Ngọc Duy Fri, 13 Apr 2012 10:54:35 +0000 (17:54 +0700)

column: add columnar layout

COL_COLUMN and COL_ROW fill column by column (or row by row
respectively), given the terminal width and how many space between
columns. All cells have equal width.

Strings are supposed to be in UTF-8. Valid ANSI escape strings are OK.

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Stop starting pager recursivelyNguyễn Thái Ngọc Duy Fri, 13 Apr 2012 10:54:34 +0000 (17:54 +0700)

Stop starting pager recursively

git-column can be used as a pager for other git commands, something
like this:

GIT_PAGER="git -p column --mode='dense color'" git -p branch

The problem with this is that "git -p column" also has $GIT_PAGER set so
the pager runs itself again as another pager. The end result is an
infinite loop of forking. Other git commands have the same problem if
being abused this way.

Check if $GIT_PAGER is already set and stop launching another pager.

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Add column layout skeleton and git-columnNguyễn Thái Ngọc Duy Sat, 21 Apr 2012 04:44:32 +0000 (11:44 +0700)

Add column layout skeleton and git-column

A column option string consists of many token separated by either
a space or a comma. A token belongs to one of three groups:

- enabling: always, never and auto
- layout mode: currently plain (which does not layout at all)
- other future tuning flags

git-column can be used to pipe output to from a command that wants
column layout, but not to mess with its own output code. Simpler output
code can be changed to use column layout code directly.

Thanks-to: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

test-lib: skip test with COLUMNS=1 under mkshZbigniew Jędrzejewski-Szmek Fri, 27 Apr 2012 09:25:25 +0000 (11:25 +0200)

test-lib: skip test with COLUMNS=1 under mksh

mksh does not allow $COLUMNS to be set below 12. mksh(1) says that
$COLUMNS is "always set, defaults to 80, unless the value as reported
by stty(1) is non-zero and sane enough". This applies also to setting
it directly for one command:

$ COLUMNS=10 python -c 'import os; print os.environ["COLUMNS"]'
98

Add a test prerequisite by checking if we can set COLUMNS=1, to allow
us to skip tests that needs it.

Signed-off-by: Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Update draft release notes to 1.7.10Junio C Hamano Thu, 23 Feb 2012 21:38:50 +0000 (13:38 -0800)

Update draft release notes to 1.7.10

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

Merge branch 'ld/git-p4-expanded-keywords'Junio C Hamano Thu, 23 Feb 2012 21:30:31 +0000 (13:30 -0800)

Merge branch 'ld/git-p4-expanded-keywords'

* ld/git-p4-expanded-keywords:
: Teach git-p4 to unexpand $RCS$-like keywords that are embedded in
: tracked contents in order to reduce unnecessary merge conflicts.
git-p4: add initial support for RCS keywords

Merge branch 'jk/config-include'Junio C Hamano Thu, 23 Feb 2012 21:30:14 +0000 (13:30 -0800)

Merge branch 'jk/config-include'

* jk/config-include:
: An assignment to the include.path pseudo-variable causes the named file
: to be included in-place when Git looks up configuration variables.
config: add include directive
config: eliminate config_exclusive_filename
config: stop using config_exclusive_filename
config: provide a version of git_config with more options
config: teach git_config_rename_section a file argument
config: teach git_config_set_multivar_in_file a default path
config: copy the return value of prefix_filename
t1300: add missing &&-chaining
docs/api-config: minor clarifications
docs: add a basic description of the config API

Merge branch 'jc/add-refresh-unmerged'Junio C Hamano Thu, 23 Feb 2012 21:30:10 +0000 (13:30 -0800)

Merge branch 'jc/add-refresh-unmerged'

* jc/add-refresh-unmerged:
refresh_index: do not show unmerged path that is outside pathspec

Merge branch 'js/configure-libintl'Junio C Hamano Thu, 23 Feb 2012 21:30:04 +0000 (13:30 -0800)

Merge branch 'js/configure-libintl'

* js/configure-libintl:
configure: don't use -lintl when there is no gettext support

Merge 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

Merge 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

Merge 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

git-p4: add initial support for RCS keywordsLuke Diamand Thu, 23 Feb 2012 07:51:30 +0000 (07:51 +0000)

git-p4: add initial support for RCS keywords

RCS keywords cause problems for git-p4 as perforce always
expands them (if +k is set) and so when applying the patch,
git reports that the files have been modified by both sides,
when in fact they haven't.

This change means that when git-p4 detects a problem applying
a patch, it will check to see if keyword expansion could be
the culprit. If it is, it strips the keywords in the p4
repository so that they match what git is expecting. It then
has another go at applying the patch.

This behaviour is enabled with a new git-p4 configuration
option and is off by default.

Acked-by: Pete Wyckoff <pw@padd.com>
Signed-off-by: Luke Diamand <luke@diamand.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

merge: do not trust fstat(2) too much when checking... 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>

README: point to Documentation/SubmittingPatchesMatthieu 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>

Document merge.branchdesc configuration variableJunio 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>

Sync with 1.7.9.2Junio 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>

Git 1.7.9.2 v1.7.9.2Junio 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>

completion: use tabs for indentationPhilip 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>

completion: remove stale "to submit patches" documentationPhilip 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>

git-p4: the option to specify 'host' is -H, not -hRussell 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>

t9100: remove bogus " || test" after each test scriptletJunio 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>

Merge branch 'master' of git://bogomips.org/git-svnJunio 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

Update draft release notes to 1.7.10Junio 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>

Merge 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

Merge 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

Merge 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

Update draft release notes to 1.7.9.2Junio 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>

Merge branch 'cb/receive-pack-keep-errors' into maintJunio 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

Merge branch 'cb/transfer-no-progress' into maintJunio 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

Merge branch 'jk/git-dir-lookup' into maintJunio 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

Merge branch 'jc/diff-stat-scaler' into maintJunio 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

Merge branch 'zj/term-columns' into maintJunio 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

Merge branch 'cb/maint-rev-list-verify-object' into... 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

Merge branch 'cb/maint-t5541-make-server-port-portable... 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

Merge branch 'dp/i18n-libcharset' into maintJunio 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

Merge branch 'jk/grep-binary-attribute' into maintJunio 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

Merge branch 'nd/diffstat-gramnum' into maintJunio 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

Merge branch 'nd/find-pack-entry-recent-cache-invalidat... 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()

Merge branch 'tt/profile-build-fix' into maintJunio 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

Merge branch 'fc/zsh-completion' into maintJunio 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

git-svn.perl: fix a false-positive in the "already... 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>

git-svn.perl: perform deletions before anything elseSteven 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>

git-svn: Fix time zone in --localtimeWei-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>

git-svn: un-break "git svn rebase" when log.abbrevCommi... Æ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>

git-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>

completion: add --interactive option to git svn dcommitFrederic 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>

completion: Allow dash as the first character for __git_ps1Christian 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>

Update draft release notes to 1.7.10Junio 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>

Merge 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

Merge 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

Merge 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

Merge 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

Merge 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

Merge 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

Merge 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

Merge 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

Merge 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

Update draft release notes to 1.7.9.2Junio 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>

configure: don't use -lintl when there is no gettext... John Szakmeister Sat, 18 Feb 2012 19:38:04 +0000 (14:38 -0500)

configure: don't use -lintl when there is no gettext support

The current configure script uses -lintl if gettext is not found in the C
library, but does so before checking if there is libintl.h available in
the first place, in which case we would later define NO_GETTEXT.

Instead, check for the existence of libintl.h first. Only when libintl.h
exists and libintl is not in libc, ask for -lintl.

Signed-off-by: John Szakmeister <john@szakmeister.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

remote: fix set-branches usage and documentationPhilip 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>

gitweb: Fix 'grep' search for multiple matches in fileJakub 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>

refresh_index: do not show unmerged path that is outsid... Junio C Hamano Fri, 17 Feb 2012 18:11:05 +0000 (10:11 -0800)

refresh_index: do not show unmerged path that is outside pathspec

When running "git add --refresh <pathspec>", we incorrectly showed the
path that is unmerged even if it is outside the specified pathspec, even
though we did honor pathspec and refreshed only the paths that matched.

Note that this cange does not affect "git update-index --refresh"; for
hysterical raisins, it does not take a pathspec (it takes real paths) and
more importantly itss command line options are parsed and executed one by
one as they are encountered, so "git update-index --refresh foo" means
"first refresh the index, and then update the entry 'foo' by hashing the
contents in file 'foo'", not "refresh only entry 'foo'".

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

gitweb: Fix "heads" view when there is no current branchJakub 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>

Add a performance test for git-grepThomas 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>

Introduce a performance testing frameworkThomas 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>

Move the user-facing test library to test-lib-functions.shThomas 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>

config: add include directiveJeff King Mon, 6 Feb 2012 09:54:04 +0000 (04:54 -0500)

config: add include directive

It can be useful to split your ~/.gitconfig across multiple
files. For example, you might have a "main" file which is
used on many machines, but a small set of per-machine
tweaks. Or you may want to make some of your config public
(e.g., clever aliases) while keeping other data back (e.g.,
your name or other identifying information). Or you may want
to include a number of config options in some subset of your
repos without copying and pasting (e.g., you want to
reference them from the .git/config of participating repos).

This patch introduces an include directive for config files.
It looks like:

[include]
path = /path/to/file

This is syntactically backwards-compatible with existing git
config parsers (i.e., they will see it as another config
entry and ignore it unless you are looking up include.path).

The implementation provides a "git_config_include" callback
which wraps regular config callbacks. Callers can pass it to
git_config_from_file, and it will transparently follow any
include directives, passing all of the discovered options to
the real callback.

Include directives are turned on automatically for "regular"
git config parsing. This includes calls to git_config, as
well as calls to the "git config" program that do not
specify a single file (e.g., using "-f", "--global", etc).
They are not turned on in other cases, including:

1. Parsing of other config-like files, like .gitmodules.
There isn't a real need, and I'd rather be conservative
and avoid unnecessary incompatibility or confusion.

2. Reading single files via "git config". This is for two
reasons:

a. backwards compatibility with scripts looking at
config-like files.

b. inspection of a specific file probably means you
care about just what's in that file, not a general
lookup for "do we have this value anywhere at
all". If that is not the case, the caller can
always specify "--includes".

3. Writing files via "git config"; we want to treat
include.* variables as literal items to be copied (or
modified), and not expand them. So "git config
--unset-all foo.bar" would operate _only_ on
.git/config, not any of its included files (just as it
also does not operate on ~/.gitconfig).

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

config: eliminate config_exclusive_filenameJeff King Thu, 16 Feb 2012 08:09:32 +0000 (03:09 -0500)

config: eliminate config_exclusive_filename

This is a magic global variable that was intended as an
override to the usual git-config lookup process. Once upon a
time, you could specify GIT_CONFIG to any git program, and
it would look only at that file. This turned out to be
confusing and cause a lot of bugs for little gain. As a
result, dc87183 (Only use GIT_CONFIG in "git config", not
other programs, 2008-06-30) took this away for all callers
except git-config.

Since git-config no longer uses it either, the variable can
just go away. As the diff shows, nobody was setting to
anything except NULL, so we can just replace any sites where
it was read with NULL.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

config: stop using config_exclusive_filenameJeff King Thu, 16 Feb 2012 08:07:32 +0000 (03:07 -0500)

config: stop using config_exclusive_filename

The git-config command sometimes operates on the default set
of config files (either reading from all, or writing to repo
config), and sometimes operates on a specific file. In the
latter case, we set the magic global config_exclusive_filename,
and the code in config.c does the right thing.

Instead, let's have git-config use the "advanced" variants
of config.c's functions which let it specify an individual
filename (or NULL for the default). This makes the code a
lot more obvious, and fixes two small bugs:

1. A relative path specified by GIT_CONFIG=foo will look
in the wrong directory if we have to chdir as part of
repository setup. We already handle this properly for
"git config -f foo", but the GIT_CONFIG lookup used
config_exclusive_filename directly. By dropping to a
single magic variable, the GIT_CONFIG case now just
works.

2. Calling "git config -f foo --edit" would not respect
core.editor. This is because just before editing, we
called git_config, which would respect the
config_exclusive_filename setting, even though this
particular git_config call was not about looking in the
user's specified file, but rather about loading actual
git config, just as any other git program would.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

config: provide a version of git_config with more optionsJeff King Thu, 16 Feb 2012 08:05:56 +0000 (03:05 -0500)

config: provide a version of git_config with more options

Callers may want to provide a specific version of a file in which to look
for config. Right now this can be done by setting the magic global
config_exclusive_filename variable. By providing a version of git_config
that takes a filename, we can take a step towards making this magic global
go away.

Furthermore, by providing a more "advanced" interface, we now have a a
natural place to add new options for callers like git-config, which care
about tweaking the specifics of config lookup, without disturbing the
large number of "simple" users (i.e., every other part of git).

The astute reader of this patch may notice that the logic for handling
config_exclusive_filename was taken out of git_config_early, but added
into git_config. This means that git_config_early will no longer respect
config_exclusive_filename. That's OK, because the only other caller of
git_config_early is check_repository_format_gently, but the only function
which sets config_exclusive_filename is cmd_config, which does not call
check_repository_format_gently (and if it did, it would have been a bug,
anyway, as we would be checking the repository format in the wrong file).

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

config: teach git_config_rename_section a file argumentJeff King Thu, 16 Feb 2012 08:04:25 +0000 (03:04 -0500)

config: teach git_config_rename_section a file argument

The other config-writing functions (git_config_set and
git_config_set_multivar) each have an -"in_file" version to
write a specific file. Let's add one for rename_section,
with the eventual goal of moving away from the magic
config_exclusive_filename global.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

config: teach git_config_set_multivar_in_file a default... Jeff King Thu, 16 Feb 2012 08:04:05 +0000 (03:04 -0500)

config: teach git_config_set_multivar_in_file a default path

The git_config_set_multivar_in_file function takes a
filename argument to specify the file into which the values
should be written. Currently, this value must be non-NULL.
Callers which want to write to the default location must use
the regular, non-"in_file" version, which will either write
to config_exclusive_filename, or to the repo config if the
exclusive filename is NULL.

Let's migrate the "default to using repo config" logic into
the "in_file" form. That will let callers get the same
default-if-NULL behavior as one gets with
config_exclusive_filename, but without having to use the
global variable.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

config: copy the return value of prefix_filenameJeff King Thu, 16 Feb 2012 08:03:52 +0000 (03:03 -0500)

config: copy the return value of prefix_filename

The prefix_filename function returns a pointer to a static
buffer which may be overwritten by subsequent calls. Since
we are going to keep the result around for a while, let's be
sure to duplicate it for safety.

I don't think this can be triggered as a bug in the current
code, but it's a good idea to be defensive, as any resulting
bug would be quite subtle.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

t1300: add missing &&-chainingJeff 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>

docs/api-config: minor clarificationsJeff 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>

Sync with maintJunio C Hamano Thu, 16 Feb 2012 22:27:20 +0000 (14:27 -0800)

Sync with maint

Update draft release notes to 1.7.9.2Junio 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>

Merge branch 'jc/checkout-out-of-unborn' into maintJunio 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

Merge branch 'jc/maint-mailmap-output' into maintJunio 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()

Merge branch 'jk/prompt-fallback-to-tty' into maintJunio 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

Merge branch 'jn/gitweb-search-utf-8' into maintJunio 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

Merge branch 'jc/maint-commit-ignore-i-t-a' into maintJunio 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

Merge branch 'mm/empty-loose-error-message' into maintJunio 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

Merge branch 'nk/ctype-for-perf' into maintJunio 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

Merge branch 'jx/i18n-more-marking' into maintJunio 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

man: rearrange git synopsis to fit in 80 linesZbigniew 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>

completion: --list option for git-branchRalf 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>

Merge branch 'rt/completion-branch-edit-desc' into... 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

make lineno_width() from blame reusable for othersZbigniew 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>

diff --stat: show bars of same length for paths with... 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>

Merge 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

Merge 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

Merge 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,"

Merge 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