aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAge
* Merge branch 'bc/portable'Junio C Hamano2010-06-21
|\ | | | | | | | | | | | | | | | | | | | | * bc/portable: Remove python 2.5'isms Makefile: add PYTHON_PATH to GIT-BUILD-OPTIONS t/aggregate-results: accomodate systems with small max argument list length t/t7006: ignore return status of shell's unset builtin t/t5150: remove space from sed script git-request-pull.sh: remove -e switch to shell interpreter which breaks ksh t/t5800: skip if python version is older than 2.5
| * Remove python 2.5'ismsBrandon Casey2010-06-13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The following python 2.5 features were worked around: * the sha module is used as a fallback when the hashlib module is not available * the 'any' built-in method was replaced with a 'for' loop * a conditional expression was replaced with an 'if' statement * the subprocess.check_call method was replaced by a call to subprocess.Popen followed by a call to subprocess.wait with a check of its return status These changes allow the python infrastructure to be used with python 2.4 which is distributed with RedHat's RHEL 5, for example. t5800 was updated to check for python >= 2.4 to reflect these changes. Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * Makefile: add PYTHON_PATH to GIT-BUILD-OPTIONSBrandon Casey2010-06-13
| | | | | | | | | | | | | | | | | | | | | | The PYTHON_PATH environment variable is not set when running test scripts manually i.e. when not using 'make test'. Scripts which attempt to use this variable will fail. So add it to the list of variables written to the GIT-BUILD-OPTIONS file so that the test suite will import it when running the test scripts. Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * t/aggregate-results: accomodate systems with small max argument list lengthBrandon Casey2010-06-02
| | | | | | | | | | | | | | | | | | | | IRIX 6.5 has a default maximum argument list length of 20480. The file glob that is passed to aggregate-results currently exceeds this length, and so the script cannot run successfully. Work around this issue by passing the file names in via the standard input rather than the argument list. Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * t/t7006: ignore return status of shell's unset builtinBrandon Casey2010-06-02
| | | | | | | | | | | | | | | | | | | | | | The unset builtin of Solaris's xpg4/sh returns non-zero if it is passed a variable name which was not previously set. Since the unset is not likely to fail, ignore its return status, but add a semicolon as a clue that the '&&' was deliberately left off. Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil> Acked-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * t/t5150: remove space from sed scriptBrandon Casey2010-06-02
| | | | | | | | | | | | | | | | | | Solaris's xpg4/sed and IRIX's sed fail to parse these negated matching expressions when the '!' is separated from the command that follows. Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil> Acked-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * git-request-pull.sh: remove -e switch to shell interpreter which breaks kshBrandon Casey2010-06-02
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The -e option causes the shell to exit immediately when a command exits with a non-zero exit status. This does not seem to cause a problem for Bash, but it does cause a problem for the Korn shell, like Solaris's xpg4/sh, whose unset utility returns non-zero if it is passed a variable name which was not previously set. When using xpg4/sh, git-request-pull exits while sourcing git-sh-setup since git-sh-setup tries to unset the CDPATH environment variable. When git-request-pull was originally written, it did not do any error checking and it used this shell feature to exit when an error occurred. This script now performs proper error checking and provides useful error messages, so this -e option appears to be merely a historical artifact and can be removed. Kudos to Jonathan Nieder for introducing t5150 which exercises the request-pull code path. Suggested-by: Brandon Casey <drafnel@gmail.com> Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * t/t5800: skip if python version is older than 2.5Brandon Casey2010-06-02
| | | | | | | | | | | | | | | | | | | | This test script depends on the git-remote-testgit python script. This python script makes use of the hashlib module which was released in python version 2.5. So, add a new pre-requisite named PYTHON_2_5_OR_NEWER to test-lib.sh and check for it in t5800. Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | Merge branch 'jn/gitweb-fastcgi'Junio C Hamano2010-06-21
|\ \ | | | | | | | | | | | | | | | | | | * jn/gitweb-fastcgi: gitweb: Run in FastCGI mode if gitweb script has .fcgi extension gitweb: Add support for FastCGI, using CGI::Fast gitweb: Put all per-connection code in run() subroutine
| * | gitweb: Run in FastCGI mode if gitweb script has .fcgi extensionJakub Narebski2010-06-11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If the name of the script ($SCRIPT_NAME or $SCRIPT_FILENAME CGI environment variable, or __FILE__ literal) ends with '.fcgi' extension, run gitweb in FastCGI mode, as if it was run with '--fastcgi' / '--fcgi' option. This is intended for easy deploying gitweb using FastCGI interface. Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | gitweb: Add support for FastCGI, using CGI::FastSam Vilain2010-05-08
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Former run() subroutine got renamed to run_request(). The new run() subroutine can run multiple requests at once if run as FastCGI script. To run gitweb as FastCGI script you must specify '--fastcgi' / '-f' command line option to gitweb, otherwise it runs as an ordinary CGI script. [jn: cherry picked from 56d7d436644ab296155a697552ea1345f2701620 in http://utsl.gen.nz/gitweb/?p=gitweb which was originally based on v264 (2326acfa95ac86a53804ca8eeeb482c2f9265e34) by Kay Sievers; updated to reflect current gitweb code] TODO: update 'gitweb/README' and/or 'gitweb/INSTALL' files. Signed-off-by: Sam Vilain <sam.vilain@catalyst.net.nz> Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | gitweb: Put all per-connection code in run() subroutineJakub Narebski2010-05-08
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | All code that is run per-connection (as opposed to those parts of gitweb code that can be run once) is put into appropriate subroutines: - evaluate_uri - evaluate_gitweb_config - evaluate_git_version (here only because $GIT can be set in config) - check_loadavg (as soon as possible; $git_version must be defined) - evaluate_query_params (counterpart to evaluate_path_info) - evaluate_and_validate_params - evaluate_git_dir (requires $project) - configure_gitweb_features (@snapshot_fmts, $git_avatar) - dispatch (includes setting default $action) The difference is best viewed with '-w', '--ignore-all-space' option, because of reindent caused by putting code in subroutines. Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | Merge branch 'jn/checkout-doc'Junio C Hamano2010-06-21
|\ \ \ | | | | | | | | | | | | | | | | | | | | * jn/checkout-doc: Documentation/checkout: clarify description Documentation/checkout: clarify description
| * | | Documentation/checkout: clarify descriptionJonathan Nieder2010-06-11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git checkout can be used to switch branches and to retrieve files from the index or an arbitrary tree. Split the description into subsections corresponding to each mode to make each use easier to understand. Helped-by: Jeff King <peff@peff.net> Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | Documentation/checkout: clarify descriptionJonathan Nieder2010-05-31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | To the first-time reader, it may not be obvious that ‘git checkout’ has two modes, nor that if no branch is specified it will read from the index. Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | Merge branch 'em/checkout-orphan'Junio C Hamano2010-06-21
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * em/checkout-orphan: log_ref_setup: don't return stack-allocated array bash completion: add --orphan to 'git checkout' t3200: test -l with core.logAllRefUpdates options checkout --orphan: respect -l option always refs: split log_ref_write logic into log_ref_setup Documentation: alter checkout --orphan description
| * | | | log_ref_setup: don't return stack-allocated arrayThomas Rast2010-06-12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 859c301 (refs: split log_ref_write logic into log_ref_setup, 2010-05-21) refactors the stack allocation of the log_file array into the new log_ref_setup() function, but passes it back to the caller. Since the original intent seems to have been to split the work between log_ref_setup and log_ref_write, make it the caller's responsibility to allocate the buffer. Signed-off-by: Thomas Rast <trast@student.ethz.ch> Reported-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | bash completion: add --orphan to 'git checkout'Erick Mattos2010-06-03
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Update git-completion.bash with new --orphan option to 'git checkout'. Signed-off-by: Erick Mattos <erick.mattos@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | t3200: test -l with core.logAllRefUpdates optionsErick Mattos2010-06-03
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | By default reflogs are always created for new local branches by "checkout -b". But by setting core.logAllRefUpdates to false this will not be true anymore. In that case you only create the reflogs when you use -l switch with "checkout -b". Added missing tests to check expected behaviors. Signed-off-by: Erick Mattos <erick.mattos@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | checkout --orphan: respect -l option alwaysErick Mattos2010-06-03
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Added changes to satisfy a corner case: creating reflogs by using -l when core.logAllRefUpdates is set to false. Signed-off-by: Erick Mattos <erick.mattos@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | refs: split log_ref_write logic into log_ref_setupErick Mattos2010-06-02
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Separation of the logic for testing and preparing the reflogs from function log_ref_write to a new non static new function: log_ref_setup. This allows to be performed from outside the first all reasonable checks and procedures for writing reflogs. Signed-off-by: Erick Mattos <erick.mattos@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | Documentation: alter checkout --orphan descriptionErick Mattos2010-06-02
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The present text is a try to enhance description accuracy. It is a merge of the rewritten text made by native english speaker Chris Johnsen and further changes of Junio. It came from the last thread messages of --orphan patch. Signed-off-by: Erick Mattos <erick.mattos@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | Drop items that are 1.7.1.1 fixes from the 1.7.1 release notesJunio C Hamano2010-06-21
| | | | |
* | | | | Merge branch 'maint'Junio C Hamano2010-06-21
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | * maint: Update draft release notes to 1.7.1.1
| * | | | | Update draft release notes to 1.7.1.1Junio C Hamano2010-06-21
| | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | | Merge branch 'mc/maint-zoneparse' into maintJunio C Hamano2010-06-21
| |\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | * mc/maint-zoneparse: Add "Z" as an alias for the timezone "UTC"
| * \ \ \ \ \ Merge branch 'jk/diff-m-doc' into maintJunio C Hamano2010-06-21
| |\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * jk/diff-m-doc: docs: clarify meaning of -M for git-log
| * \ \ \ \ \ \ Merge branch 'jn/maint-doc-ignore' into maintJunio C Hamano2010-06-21
| |\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * jn/maint-doc-ignore: gitignore.5: Clarify matching rules
| * \ \ \ \ \ \ \ Merge branch 'bs/userdiff-php' into maintJunio C Hamano2010-06-21
| |\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * bs/userdiff-php: diff: Support visibility modifiers in the PHP hunk header regexp
| * \ \ \ \ \ \ \ \ Merge branch 'jk/maint-sha1-file-name-fix' into maintJunio C Hamano2010-06-21
| |\ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * jk/maint-sha1-file-name-fix: remove over-eager caching in sha1_file_name
| * \ \ \ \ \ \ \ \ \ Merge branch 'jk/maint-pull-dry-run-noop' into maintJunio C Hamano2010-06-21
| |\ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * jk/maint-pull-dry-run-noop: pull: do nothing on --dry-run
| * \ \ \ \ \ \ \ \ \ \ Merge branch 'bw/diff-metainfo-color' into maintJunio C Hamano2010-06-21
| |\ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * bw/diff-metainfo-color: diff: fix coloring of extended diff headers
| * \ \ \ \ \ \ \ \ \ \ \ Merge branch 'cb/assume-unchanged-fix' into maintJunio C Hamano2010-06-21
| |\ \ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * cb/assume-unchanged-fix: Documentation: git-add does not update files marked "assume unchanged" do not overwrite files marked "assume unchanged"
| * \ \ \ \ \ \ \ \ \ \ \ \ Merge branch 'jn/notes-doc' into maintJunio C Hamano2010-06-21
| |\ \ \ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * jn/notes-doc: Documentation/notes: nitpicks Documentation/notes: clean up description of rewriting configuration Documentation/notes: simplify treatment of default display refs Documentation/log: add a CONFIGURATION section Documentation/notes: simplify treatment of default notes ref Documentation/notes: add configuration section Documentation/notes: describe content of notes blobs Documentation/notes: document format of notes trees
| * \ \ \ \ \ \ \ \ \ \ \ \ \ Merge branch 'ab/test-cleanup' into maintJunio C Hamano2010-06-21
| |\ \ \ \ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * ab/test-cleanup: Turn setup code in t2007-checkout-symlink.sh into a test Move t6000lib.sh to lib-*
| * \ \ \ \ \ \ \ \ \ \ \ \ \ \ Merge branch 'rs/diff-no-minimal' into maintJunio C Hamano2010-06-21
| |\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * rs/diff-no-minimal: git diff too slow for a file
| * \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ Merge branch 'bg/apply-blank-trailing-context' into maintJunio C Hamano2010-06-21
| |\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * bg/apply-blank-trailing-context: apply: Allow blank *trailing* context lines to match beyond EOF
* | \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ Merge branch 'maint'Junio C Hamano2010-06-20
|\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ | |/ / / / / / / / / / / / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * maint: gitweb/Makefile: fix typo in gitweb.min.css rule Conflicts: gitweb/Makefile
| * | | | | | | | | | | | | | | | | gitweb/Makefile: fix typo in gitweb.min.css ruleJay Soffian2010-06-20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This typo has been in place since the rule was originally added by 0e6ce21 (Gitweb: add support for minifying gitweb.css). Signed-off-by: Jay Soffian <jaysoffian@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | | | | | | | | | | | | | | git-cvsserver: fix error for invalid password formatsÆvar Arnfjörð Bjarmason2010-06-20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change the error message to report the erroneous password character. $1 was never set in the previos version, it was a leftover from older code that used a regex for the test. Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | | | | | | | | | | | | | | git-cvsserver: typo in a comment: bas -> hasÆvar Arnfjörð Bjarmason2010-06-20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | | | | | | | | | | | | | | Update draft release notes to 1.7.2Junio C Hamano2010-06-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | | | | | | | | | | | | | | Merge branch 'cc/maint-diff-CC-binary'Junio C Hamano2010-06-18
|\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * cc/maint-diff-CC-binary: diff: fix "git show -C -C" output when renaming a binary file Conflicts: diff.c
| * | | | | | | | | | | | | | | | | | diff: fix "git show -C -C" output when renaming a binary fileChristian Couder2010-06-06
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A bug was introduced in 3e97c7c6af2901cec63bf35fcd43ae3472e24af8 (No diff -b/-w output for all-whitespace changes, Nov 19 2009) that made the lines: diff --git a/bar b/sub/bar similarity index 100% rename from bar rename to sub/bar disappear from "git show -C -C" output when file bar is a binary file. Signed-off-by: Christian Couder <chriscool@tuxfamily.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | | | | | | | | | | | | | | | Merge branch 'by/diff-graph'Junio C Hamano2010-06-18
|\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * by/diff-graph: Make --color-words work well with --graph graph.c: register a callback for graph output Emit a whole line in one go diff.c: Output the text graph padding before each diff line Output the graph columns at the end of the commit message Add a prefix output callback to diff output Conflicts: diff.c
| * | | | | | | | | | | | | | | | | | | Make --color-words work well with --graphBo Yang2010-05-31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | '--color-words' algorithm can be described as: 1. collect a the minus/plus lines of a diff hunk, divided into minus-lines and plus-lines; 2. break both minus-lines and plus-lines into words and place them into two mmfile_t with one word for each line; 3. use xdiff to run diff on the two mmfile_t to get the words level diff; And for the common parts of the both file, we output the plus side text. diff_words->current_plus is used to trace the current position of the plus file which printed. diff_words->last_minus is used to trace the last minus word printed. For '--graph' to work with '--color-words', we need to output the graph prefix on each line of color words output. Generally, there are two conditions on which we should output the prefix. 1. diff_words->last_minus == 0 && diff_words->current_plus == diff_words->plus.text.ptr that is: the plus text must start as a new line, and if there is no minus word printed, a graph prefix must be printed. 2. diff_words->current_plus > diff_words->plus.text.ptr && *(diff_words->current_plus - 1) == '\n' that is: a graph prefix must be printed following a '\n' Signed-off-by: Bo Yang <struggleyb.nku@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | | | | | | | | | | | | | | | | graph.c: register a callback for graph outputBo Yang2010-05-31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It will look better if the 'git log --graph' print the graph pading lines before the diff output just like what it does for commit message. And this patch leverage the new diff prefix callback function to achieve this. Signed-off-by: Bo Yang <struggleyb.nku@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | | | | | | | | | | | | | | | | Emit a whole line in one goBo Yang2010-05-31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since the graph prefix will be printed when calling emit_line, so the functions should be used to emit a complete line out once a time. No one should call emit_line to just output some strings instead of a complete line. Use a strbuf to compose the whole line, and then call emit_line to output it once. Signed-off-by: Bo Yang <struggleyb.nku@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | | | | | | | | | | | | | | | | diff.c: Output the text graph padding before each diff lineBo Yang2010-05-31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change output from diff with -p/--dirstat/--binary/--numstat/--stat/ --shortstat/--check/--summary options to align with graph paddings. Thanks Jeff King <peff@peff.net> for reporting the '--summary' bug and his initial patch. Signed-off-by: Bo Yang <struggleyb.nku@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | | | | | | | | | | | | | | | | Output the graph columns at the end of the commit messageBo Yang2010-05-31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There is an empty line between the commit message and the diff output. Add the graph columns as prefix of this line. Signed-off-by: Bo Yang <struggleyb.nku@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>