aboutsummaryrefslogtreecommitdiff
path: root/contrib
Commit message (Collapse)AuthorAge
* remove superfluous newlines in error messagesPete Wyckoff2012-04-30
| | | | | | | | The error handling routines add a newline. Remove the duplicate ones in error messages. Signed-off-by: Pete Wyckoff <pw@padd.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* Merge branch 'fc/completion-tests'Junio C Hamano2012-04-24
|\ | | | | | | | | | | | | | | | | | | | | | | By Felipe Contreras (4) and others * fc/completion-tests: completion: fix completion after 'git --option <TAB>' completion: avoid trailing space for --exec-path completion: add missing general options completion: simplify by using $prev completion: simplify __gitcomp_1 tests: add tests for the __gitcomp() completion helper function tests: add initial bash completion tests
| * completion: fix completion after 'git --option <TAB>'SZEDER Gábor2012-04-21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The bash completion doesn't work when certain options to git itself are specified, e.g. 'git --no-pager <TAB>' errors out with error: invalid key: alias.--no-pager The main _git() completion function finds out the git command name by looping through all the words on the command line and searching for the first word that is not a known option for the git command. Unfortunately the list of known git options was not updated in a long time, and newer options are not skipped but mistaken for a git command. Such a misrecognized "command" is then passed to __git_aliased_command(), which in turn passes it to a 'git config' query, hence the error. Currently the following options are misrecognized for a git command: -c --no-pager --exec-path --html-path --man-path --info-path --no-replace-objects --work-tree= --namespace= To fix this we could just update the list of options to be skipped, but the same issue will likely arise, if the git command learns a new option in the future. Therefore, to make it more future proof against new options, this patch changes that loop to skip all option-looking words, i.e. words starting with a dash. We also have to handle the '-c' option specially, because it takes a configutation parameter in a separate word, which must be skipped, too. [fc: added tests] Signed-off-by: SZEDER Gábor <szeder@ira.uka.de> Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * completion: avoid trailing space for --exec-pathJonathan Nieder2012-04-21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | "--exec-path" looks to the completion script like an unambiguous successful completion, but it is wrong to emit a SP after it as if declaring that we are done with completion; the user could be trying to do git --exec-path; # print name of helper directory or git --exec-path=/path/to/alternative/helper/dir <subcommand> so the most helpful thing to do is to leave out the trailing space and leave it to the operator to type an equal sign or carriage return according to the situation. [fc: added tests] Cc: Andreas Schwab <schwab@linux-m68k.org> Reported-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * completion: add missing general optionsFelipe Contreras2012-04-21
| | | | | | | | | | | | | | And add relevant tests. Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * completion: simplify by using $prevFelipe Contreras2012-04-21
| | | | | | | | | | | | | | cword-1 is the previous word ($prev). Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * completion: simplify __gitcomp_1Felipe Contreras2012-04-21
| | | | | | | | | | Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | Merge branch 'pw/git-p4'Junio C Hamano2012-04-23
|\ \ | |/ |/| | | | | | | | | | | By Pete Wyckoff * pw/git-p4: git p4: use "git p4" directly in tests git p4: update name in script git-p4: move to toplevel
| * git-p4: move to toplevelPete Wyckoff2012-04-09
| | | | | | | | | | | | | | | | Move git-p4 out of contrib/fast-import into the main code base, aside other foreign SCM tools. Signed-off-by: Pete Wyckoff <pw@padd.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | Fix git-subtree install instructionsDavid A. Greene2012-04-09
| | | | | | | | | | | | | | Update the install instructions to reflect the changes for an integrated git-subtree. Signed-off-by: David A. Greene <greened@obbligato.org>
* | Use git-subtree test MakefileDavid A. Greene2012-04-09
| | | | | | | | | | | | Use the Makefile in contrib/subtree/t to run git-subtree tests. Signed-off-by: David A. Greene <greened@obbligato.org>
* | Add subtree test MakefileDavid A. Greene2012-04-09
| | | | | | | | | | | | | | | | Add a Makefile to run subtree tests. This is largely copied from the standard test suite with irrelevant targets removed and some paths altered to account for where subtree tests live. Signed-off-by: David A. Greene <greened@obbligato.org>
* | Install git-subtree from contribDavid A. Greene2012-04-09
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Build git-subtree in its contrib directory and install from there. The main Makefile no longer discovers subcommands build in the main build area so we cannot count on it to install git-subtree. The user should make && make install in contrib/subtree to install git-subtree. Change the rule to install the git-subtree manpage. The main Documentation area doesn't directly support installing documentation from other directories so the user will have to do that from within contrib/subtree for now. Signed-off-by: David A. Greene <greened@obbligato.org>
* | Use configure settings for git-subtreeDavid A. Greene2012-04-09
| | | | | | | | | | | | | | Include config.make.autogen in the git-subtree contrib area to pick up settings for prefix and other such things. Signed-off-by: David A. Greene <greened@obbligato.org>
* | Use project config filesDavid A. Greene2012-04-09
| | | | | | | | | | | | Use project-wide files to process documentation for git-subtree. Signed-off-by: David A. Greene <greened@obbligato.org>
* | Remove unnecessary git-subtree filesDavid A. Greene2012-04-09
| | | | | | | | | | | | | | Remove various files that simply duplicate functionality already provided by the main project files. Signed-off-by: David A. Greene <greened@obbligato.org>
* | Set TEST_DIRECTORYDavid A. Greene2012-04-09
| | | | | | | | | | | | | | Set TEST_DIRECTORY to the main git test area. This allows the git-subtree out-of-tree tests to run correctly. Signed-off-by: David A. Greene <greened@obbligato.org>
* | Add 'contrib/subtree/' from commit 'd3a04e06c77d57978bb5230361c64946232cc346'David A. Greene2012-04-09
|/ | | | | | git-subtree-dir: contrib/subtree git-subtree-mainline: e8dde3e5f9ddb7cf95a6ff3cea6cf07c3a2db80d git-subtree-split: d3a04e06c77d57978bb5230361c64946232cc346
* correct spelling: an URL -> a URLJim Meyering2012-03-28
| | | | | Signed-off-by: Jim Meyering <meyering@redhat.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* Merge branch 'am/completion-zsh-fix'Junio C Hamano2012-03-23
|\ | | | | | | | | * am/completion-zsh-fix: contrib/completion: "local var=()" is misinterpreted as func-decl by zsh
| * contrib/completion: "local var=()" is misinterpreted as func-decl by zshAlex Merry2012-03-21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Certain versions of zsh seems to treat local var=() as a function declaration, rather than an assignment of an empty array, although its documentation does not suggest that this should be the case. With zsh 4.3.15 on Fedora Core 15, this causes __git_ps1 " (%s)" to trigger an error message: local:2: command not found: svn_url_pattern when GIT_PS1_SHOWUPSTREAM="auto". Signed-off-by: Alex Merry <dev@randomguy3.me.uk> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | Merge branch 'th/git-diffall'Junio C Hamano2012-03-15
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | * th/git-diffall: contrib/diffall: fix cleanup trap on Windows contrib/diffall: eliminate duplicate while loops contrib/diffall: eliminate use of tar contrib/diffall: create tmp dirs without mktemp contrib/diffall: comment actual reason for 'cdup'
| * | contrib/diffall: fix cleanup trap on WindowsTim Henigan2012-03-14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Prior to this commit, the cleanup trap that removes the tmp dir created by the script would fail on Windows. The error was silently ignored by the script. On Windows, a directory cannot be removed while it is the working directory of the process (thanks to Johannes Sixt on the Git list for this info [1]). This commit eliminates the 'cd' into the tmp directory that caused the error. [1]: http://article.gmane.org/gmane.comp.version-control.git/193086 Signed-off-by: Tim Henigan <tim.henigan@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | contrib/diffall: eliminate duplicate while loopsTim Henigan2012-03-14
| | | | | | | | | | | | | | | | | | | | | | | | There were 3 instances of a 'while read; do' that used identical logic to populate '/tmp/right_dir'. This commit groups them into a single loop. Signed-off-by: Tim Henigan <tim.henigan@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | contrib/diffall: eliminate use of tarTim Henigan2012-03-14
| | | | | | | | | | | | | | | | | | | | | | | | | | | The 'tar' utility is not available on all platforms (some only support 'gnutar'). An earlier commit created a work-around for this problem, but a better solution is to eliminate the use of 'tar' completely. Signed-off-by: Tim Henigan <tim.henigan@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | contrib/diffall: create tmp dirs without mktempTim Henigan2012-03-14
| | | | | | | | | | | | | | | | | | | | | | | | | | | mktemp is not available on all platforms. Instead of littering the code with a work-around, this commit replaces mktemp with a one-line Perl script. Signed-off-by: Tim Henigan <tim.henigan@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | contrib/diffall: comment actual reason for 'cdup'Tim Henigan2012-03-14
| | | | | | | | | | | | | | | | | | | | | | | | The comment from an earlier commit did not reflect the actual reason this operation is needed. Signed-off-by: Tim Henigan <tim.henigan@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | Merge branch 'zj/diff-stat-dyncol'Junio C Hamano2012-03-06
|\ \ \ | |/ / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | By Zbigniew Jędrzejewski-Szmek (8) and Junio C Hamano (1) * zj/diff-stat-dyncol: : This breaks tests. Perhaps it is not worth using the decimal-width stuff : for this series, at least initially. diff --stat: add config option to limit graph width diff --stat: enable limiting of the graph part diff --stat: add a test for output with COLUMNS=40 diff --stat: use a maximum of 5/8 for the filename part merge --stat: use the full terminal width log --stat: use the full terminal width show --stat: use the full terminal width diff --stat: use the full terminal width diff --stat: tests for long filenames and big change counts
| * | diff --stat: add config option to limit graph widthZbigniew Jędrzejewski-Szmek2012-03-01
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Config option diff.statGraphWidth=<width> is equivalent to --stat-graph-width=<width>, except that the config option is ignored by format-patch. For the graph-width limiting to be usable, it should happen 'automatically' once configured, hence the config option. Nevertheless, graph width limiting only makes sense when used on a wide terminal, so it should not influence the output of format-patch, which adheres to the 80-column standard. Signed-off-by: Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | Merge branch 'th/git-diffall'Junio C Hamano2012-03-01
|\ \ \ | | | | | | | | | | | | | | | | * th/git-diffall: contrib: add git-diffall script
| * | | contrib: add git-diffall scriptTim Henigan2012-02-27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The 'git difftool' allows the user to view diffs using an external tool. It runs a separate instance of the tool for each file in the diff. This makes it tedious to review changes spanning multiple files. The 'git-diffall' script instead prepares temporary directories with the files to be compared and launches a single instance of the external diff tool to view them (i.e. a directory diff). The 'diff.tool' or 'merge.tool' configuration variable is used to specify which external tool is used. Signed-off-by: Tim Henigan <tim.henigan@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | Merge branch 'pj/completion-remote-set-url-branches'Junio C Hamano2012-02-28
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | * pj/completion-remote-set-url-branches: completion: normalize increment/decrement style completion: remote set-* <name> and <branch>
| * | | | completion: normalize increment/decrement stylePhilip Jägenstedt2012-02-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The style used for incrementing and decrementing variables was fairly inconsistenty and was normalized to use x++, or ((x++)) in contexts where the former would otherwise be interpreted as a command. This is a bash-ism, but for obvious reasons this script is already bash-specific. Signed-off-by: Philip Jägenstedt <philip@foolip.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | completion: remote set-* <name> and <branch>Philip Jägenstedt2012-02-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Complete <name> only for set-url. For set-branches and set-head, complete <name> and <branch> over the network, like e.g. git pull already does. Signed-off-by: Philip Jägenstedt <philip@foolip.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | Merge branch 'maint'Junio C Hamano2012-02-27
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * maint: Update draft release notes to 1.7.9.3 CodingGuidelines: do not use 'which' in shell scripts CodingGuidelines: Add a note about spaces after redirection post-receive-email: match up $LOGBEGIN..$LOGEND pairs correctly post-receive-email: remove unused variable
| * | | | | post-receive-email: match up $LOGBEGIN..$LOGEND pairs correctlyMichael Haggerty2012-02-27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | | post-receive-email: remove unused variableMichael Haggerty2012-02-27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | prep_for_email neither is passed a fourth argument nor uses it. Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | | Merge branch 'maint'Junio C Hamano2012-02-26
|\ \ \ \ \ \ | |/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * maint: Document accumulated fixes since 1.7.9.2 Git 1.7.8.5 grep -P: Fix matching ^ and $ am: don't infloop for an empty input file rebase -m: only call "notes copy" when rewritten exists and is non-empty git-p4: remove bash-ism in t9800 git-p4: remove bash-ism in t9809 git-p4: fix submit regression with clientSpec and subdir clone git-p4: set useClientSpec variable on initial clone Makefile: add thread-utils.h to LIB_H Conflicts: RelNotes t/t9809-git-p4-client-view.sh
| * | | | | git-p4: fix submit regression with clientSpec and subdir clonePete Wyckoff2012-02-26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When the --use-client-spec is given to clone, and the clone path is a subset of the full tree as specified in the client, future submits will go to the wrong place. Factor out getClientSpec() so both clone/sync and submit can use it. Introduce getClientRoot() that is needed for the client spec case, and use it instead of p4Where(). Test the five possible submit behaviors (add, modify, rename, copy, delete). Reported-by: Laurent Charrière <lcharriere@promptu.com> Signed-off-by: Pete Wyckoff <pw@padd.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | | git-p4: set useClientSpec variable on initial clonePete Wyckoff2012-02-26
| |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If --use-client-spec was given, set the matching configuration variable. This is necessary to ensure that future submits work properly. The alternatives of requiring the user to set it, or providing a command-line option on every submit, are error prone. Signed-off-by: Pete Wyckoff <pw@padd.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | Merge branch 'ld/git-p4-expanded-keywords'Junio C Hamano2012-02-23
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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
| * | | | | git-p4: add initial support for RCS keywordsLuke Diamand2012-02-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | | | | Sync with 1.7.9.2Junio C Hamano2012-02-22
|\ \ \ \ \ \ | | |/ / / / | |/| | | | | | | | | | Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | | completion: use tabs for indentationPhilip Jägenstedt2012-02-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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ägenstedt2012-02-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 Myers2012-02-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | | | | Merge branch 'master' of git://bogomips.org/git-svnJunio C Hamano2012-02-21
|\ \ \ \ \ \ | |_|_|/ / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * '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
| * | | | | completion: add --interactive option to git svn dcommitFrederic Heitzmann2012-02-21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | | | | Merge branch 'jk/diff-highlight'Junio C Hamano2012-02-21
|\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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
| * | | | | | diff-highlight: document some non-optimal casesJeff King2012-02-13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>