summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2012-04-27column: add dense layout supportLibravatar Nguyễn Thái Ngọc Duy4-1/+137
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>
2012-04-27t9002: work around shells that are unable to set COLUMNS to 1Libravatar Zbigniew Jędrzejewski-Szmek1-2/+3
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>
2012-04-27column: add columnar layoutLibravatar Nguyễn Thái Ngọc Duy4-0/+206
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>
2012-04-27Stop starting pager recursivelyLibravatar Nguyễn Thái Ngọc Duy1-1/+1
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>
2012-04-27Add column layout skeleton and git-columnLibravatar Nguyễn Thái Ngọc Duy12-0/+391
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>
2012-04-27test-lib: skip test with COLUMNS=1 under mkshLibravatar Zbigniew Jędrzejewski-Szmek1-0/+1
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>
2012-02-23Update draft release notes to 1.7.10Libravatar Junio C Hamano1-1/+24
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-02-23Merge branch 'ld/git-p4-expanded-keywords'Libravatar Junio C Hamano3-10/+501
* 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
2012-02-23Merge branch 'jk/config-include'Libravatar Junio C Hamano8-60/+495
* 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
2012-02-23Merge branch 'jc/add-refresh-unmerged'Libravatar Junio C Hamano2-2/+24
* jc/add-refresh-unmerged: refresh_index: do not show unmerged path that is outside pathspec
2012-02-23Merge branch 'js/configure-libintl'Libravatar Junio C Hamano1-8/+12
* js/configure-libintl: configure: don't use -lintl when there is no gettext support
2012-02-23Merge branch 'pj/remote-set-branches-usage-fix'Libravatar Junio C Hamano2-2/+2
* pj/remote-set-branches-usage-fix: remote: fix set-branches usage and documentation Conflicts: builtin/remote.c
2012-02-23Merge branch 'tr/perftest'Libravatar Junio C Hamano14-552/+1363
* 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
2012-02-23Merge branch 'maint'Libravatar Junio C Hamano2-4/+11
* maint: README: point to Documentation/SubmittingPatches Document merge.branchdesc configuration variable
2012-02-23git-p4: add initial support for RCS keywordsLibravatar Luke Diamand3-10/+501
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>
2012-02-23merge: do not trust fstat(2) too much when checking interactivenessLibravatar Junio C Hamano1-1/+1
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>
2012-02-23README: point to Documentation/SubmittingPatchesLibravatar Matthieu Moy1-4/+6
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>
2012-02-23Document merge.branchdesc configuration variableLibravatar Junio C Hamano1-0/+5
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>
2012-02-22Sync with 1.7.9.2Libravatar Junio C Hamano2-17/+6
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-02-22Git 1.7.9.2Libravatar Junio C Hamano2-2/+3
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-02-22completion: use tabs for indentationLibravatar Philip Jägenstedt1-4/+4
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>
2012-02-22completion: remove stale "to submit patches" documentationLibravatar Philip Jägenstedt1-12/+0
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>
2012-02-22git-p4: the option to specify 'host' is -H, not -hLibravatar Russell Myers1-1/+1
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>
2012-02-21t9100: remove bogus " || test" after each test scriptletLibravatar Junio C Hamano1-5/+9
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-02-21Merge branch 'master' of git://bogomips.org/git-svnLibravatar Junio C Hamano3-44/+59
* '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
2012-02-21Update draft release notes to 1.7.10Libravatar Junio C Hamano1-40/+6
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-02-21Merge branch 'jn/gitweb-unborn-head'Libravatar Junio C Hamano2-2/+11
* jn/gitweb-unborn-head: gitweb: Fix "heads" view when there is no current branch
2012-02-21Merge branch 'jk/diff-highlight'Libravatar Junio C Hamano2-37/+181
* 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
2012-02-21Merge branch 'maint'Libravatar Junio C Hamano2-17/+56
* maint: Update draft release notes to 1.7.9.2 completion: Allow dash as the first character for __git_ps1
2012-02-21Update draft release notes to 1.7.9.2Libravatar Junio C Hamano1-16/+55
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-02-21Merge branch 'cb/receive-pack-keep-errors' into maintLibravatar Junio C Hamano2-11/+35
* cb/receive-pack-keep-errors: do not override receive-pack errors
2012-02-21Merge branch 'cb/transfer-no-progress' into maintLibravatar Junio C Hamano7-21/+28
* cb/transfer-no-progress: push/fetch/clone --no-progress suppresses progress output
2012-02-21Merge branch 'jk/git-dir-lookup' into maintLibravatar Junio C Hamano5-5/+109
* jk/git-dir-lookup: standardize and improve lookup rules for external local repos
2012-02-21Merge branch 'jc/diff-stat-scaler' into maintLibravatar Junio C Hamano1-7/+20
* jc/diff-stat-scaler: diff --stat: show bars of same length for paths with same amount of changes
2012-02-21Merge branch 'zj/term-columns' into maintLibravatar Junio C Hamano3-22/+38
* zj/term-columns: pager: find out the terminal width before spawning the pager
2012-02-21Merge branch 'cb/maint-rev-list-verify-object' into maintLibravatar Junio C Hamano2-2/+28
* cb/maint-rev-list-verify-object: git rev-list: fix invalid typecast
2012-02-21Merge branch 'cb/maint-t5541-make-server-port-portable' into maintLibravatar Junio C Hamano1-1/+1
* cb/maint-t5541-make-server-port-portable: t5541: check error message against the real port number used
2012-02-21Merge branch 'dp/i18n-libcharset' into maintLibravatar Junio C Hamano3-0/+16
* dp/i18n-libcharset: Makefile: introduce CHARSET_LIB to link with -lcharset
2012-02-21Merge branch 'jk/grep-binary-attribute' into maintLibravatar Junio C Hamano5-192/+308
* 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
2012-02-21Merge branch 'nd/diffstat-gramnum' into maintLibravatar Junio C Hamano69-118/+168
* nd/diffstat-gramnum: Use correct grammar in diffstat summary line
2012-02-21Merge branch 'nd/find-pack-entry-recent-cache-invalidation' into maintLibravatar Junio C Hamano1-38/+46
* 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()
2012-02-21Merge branch 'tt/profile-build-fix' into maintLibravatar Junio C Hamano2-22/+50
* tt/profile-build-fix: Makefile: fix syntax for older make Fix build problems related to profile-directed optimization
2012-02-21Merge branch 'fc/zsh-completion' into maintLibravatar Junio C Hamano1-56/+11
* 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
2012-02-21git-svn.perl: fix a false-positive in the "already exists" testLibravatar Steven Walter2-32/+44
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>
2012-02-21git-svn.perl: perform deletions before anything elseLibravatar Steven Walter1-1/+1
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>
2012-02-21git-svn: Fix time zone in --localtimeLibravatar Wei-Yin Chen (陳威尹)1-7/+11
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>
2012-02-21git-svn: un-break "git svn rebase" when log.abbrevCommit=trueLibravatar Ævar Arnfjörð Bjarmason1-2/+1
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>
2012-02-21git-svn: remove redundant porcelain option to rev-listLibravatar Ævar Arnfjörð Bjarmason1-1/+1
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>
2012-02-21completion: add --interactive option to git svn dcommitLibravatar Frederic Heitzmann1-1/+1
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>
2012-02-21completion: Allow dash as the first character for __git_ps1Libravatar Christian Hammerl1-1/+1
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>