summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* difftool: print list of valid tools with '--tool-help'th/mergetools-tool-helpTim Henigan2012-03-152-6/+18
| | | | | | | | | | | | | | | Since bc7a96a (mergetool--lib: Refactor tools into separate files, 2011-08-18), it is possible to add a new diff tool by creating a simple script in the '$(git --exec-path)/mergetools' directory. Updating the difftool help text is still a manual process, and the documentation can easily go out of sync. Teach the command to read the list of valid tools from the 'mergetools' directory and print them for the user when the '--tool-help' option is given. Signed-off-by: Tim Henigan <tim.henigan@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* mergetool--lib: Refactor tools into separate filesDavid Aguilar2011-08-1917-333/+369
| | | | | | | | | | | | | | Individual merge tools are now defined in a mergetools/$tool file which is sourced at runtime. The individual files are installed into $(git --exec-path)/mergetools/. New tools can be added by creating a new file instead of editing the git-mergetool--lib.sh scriptlet. http://thread.gmane.org/gmane.comp.version-control.git/134906/focus=135006 Signed-off-by: David Aguilar <davvid@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* mergetool--lib: Make style consistent with gitDavid Aguilar2011-08-191-53/+100
| | | | | | | | | | Use the predominant conditional style where "then" appears alone on the line after the test expression. Remove spaces after ">" output redirections. Remove unnecessary parentheses around the kdiff3 commands. Signed-off-by: David Aguilar <davvid@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* difftool--helper: Make style consistent with gitDavid Aguilar2011-08-191-6/+12
| | | | | | | | Use the predominant conditional style where "then" appears alone on the line after the test expression. Signed-off-by: David Aguilar <davvid@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* Update draft release notes to 1.7.7Junio C Hamano2011-08-181-0/+6
| | | | Signed-off-by: Junio C Hamano <gitster@pobox.com>
* Merge branch 'db/am-skip-blank-at-the-beginning'Junio C Hamano2011-08-182-3/+26
|\ | | | | | | | | * db/am-skip-blank-at-the-beginning: am: ignore leading whitespace before patch
| * am: ignore leading whitespace before patchDavid Barr2011-08-112-3/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some web-based email clients prepend whitespace to raw message transcripts to workaround content-sniffing in some browsers. Adjust the patch format detection logic to ignore leading whitespace. So now you can apply patches from GMail with "git am" in three steps: 1. choose "show original" 2. tell the browser to "save as" (for example by pressing Ctrl+S) 3. run "git am" on the saved file This fixes a regression introduced by v1.6.4-rc0~15^2~2 (git-am foreign patch support: autodetect some patch formats, 2009-05-27). GMail support was first introduced to "git am" by v1.5.4-rc0~274^2 (Make mailsplit and mailinfo strip whitespace from the start of the input, 2007-11-01). Signed-off-by: David Barr <davidbarr@google.com> Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | Merge branch 'ma/am-exclude'Junio C Hamano2011-08-182-2/+5
|\ \ | | | | | | | | | | | | | | | * ma/am-exclude: am: Document new --exclude=<path> option am: pass exclude down to apply
| * | am: Document new --exclude=<path> optionmaximilian attems2011-08-091-1/+3
| | | | | | | | | | | | | | | | | | | | | The --exclude=<path> option is passed down to apply; document it as such. Signed-off-by: maximilian attems <max@stro.at> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | am: pass exclude down to applymaximilian attems2011-08-031-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This allows to pass patches around from repositories, where the other repository doesn't feature certain files. In the special case this works for dash git sync to klibc dash: git am --directory="usr/dash" --exclude="usr/dash/configure.ac" \ --exclude="usr/dash/ChangeLog" --exclude="usr/dash/dash.1" \ .. -i -s -k ../dash/000X-foo.patch Signed-off-by: maximilian attems <max@stro.at> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | Merge branch 'maint'Junio C Hamano2011-08-181-0/+2
|\ \ \ | | | | | | | | | | | | | | | | * maint: fetch-pack: check for valid commit from server
| * | | fetch-pack: check for valid commit from serverNguyễn Thái Ngọc Duy2011-08-181-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A malicious server can return ACK with non-existent SHA-1 or not a commit. lookup_commit() in this case may return NULL. Do not let fetch-pack crash by accessing NULL address in this case. Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | Update draft release notes to 1.7.7Junio C Hamano2011-08-171-1/+34
| | | | | | | | | | | | | | | | Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | Merge branch 'mh/check-attr-relative'Junio C Hamano2011-08-1714-115/+322
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * mh/check-attr-relative: (29 commits) test-path-utils: Add subcommand "prefix_path" test-path-utils: Add subcommand "absolute_path" git-check-attr: Normalize paths git-check-attr: Demonstrate problems with relative paths git-check-attr: Demonstrate problems with unnormalized paths git-check-attr: test that no output is written to stderr Rename git_checkattr() to git_check_attr() git-check-attr: Fix command-line handling to match docs git-check-attr: Drive two tests using the same raw data git-check-attr: Add an --all option to show all attributes git-check-attr: Error out if no pathnames are specified git-check-attr: Process command-line args more systematically git-check-attr: Handle each error separately git-check-attr: Extract a function error_with_usage() git-check-attr: Introduce a new variable git-check-attr: Extract a function output_attr() Allow querying all attributes on a file Remove redundant check Remove redundant call to bootstrap_attr_stack() Extract a function collect_all_attrs() ...
| * | | | test-path-utils: Add subcommand "prefix_path"Michael Haggerty2011-08-041-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | test-path-utils: Add subcommand "absolute_path"Michael Haggerty2011-08-041-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | git-check-attr: Normalize pathsMichael Haggerty2011-08-042-10/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Normalize the path arguments (relative to the working tree root, if applicable) before looking up their attributes. This requires passing the prefix down the call chain. This fixes two test cases for different reasons: * "unnormalized paths" is fixed because the .gitattribute-file-seeking code is not confused into reading the top-level file twice. * "relative paths" is fixed because the canonical pathnames are passed to get_check_attr() or get_all_attrs(), allowing them to match the pathname patterns as expected. Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | git-check-attr: Demonstrate problems with relative pathsMichael Haggerty2011-08-041-1/+14
| | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | git-check-attr: Demonstrate problems with unnormalized pathsMichael Haggerty2011-08-041-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | git-check-attr: test that no output is written to stderrMichael Haggerty2011-08-041-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | Rename git_checkattr() to git_check_attr()Michael Haggerty2011-08-0410-16/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Suggested by: Junio Hamano <gitster@pobox.com> Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | git-check-attr: Fix command-line handling to match docsMichael Haggerty2011-08-043-9/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | According to the git-check-attr synopsis, if the '--stdin' option is used then no pathnames are expected on the command line. Change the behavior to match this description; namely, if '--stdin' is used but not '--', then treat all command-line arguments as attribute names. Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | git-check-attr: Drive two tests using the same raw dataMichael Haggerty2011-08-041-36/+23
| | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | git-check-attr: Add an --all option to show all attributesMichael Haggerty2011-08-043-18/+74
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add new usage patterns git check-attr [-a | --all] [--] pathname... git check-attr --stdin [-a | --all] < <list-of-paths> which display all attributes associated with the specified file(s). Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | git-check-attr: Error out if no pathnames are specifiedMichael Haggerty2011-08-042-2/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If no pathnames are passed as command-line arguments and the --stdin option is not specified, fail with the error message "No file specified". Add tests of this behavior. Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | git-check-attr: Process command-line args more systematicallyMichael Haggerty2011-08-041-7/+12
| | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | git-check-attr: Handle each error separatelyMichael Haggerty2011-08-041-7/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This will make the code easier to refactor. Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | git-check-attr: Extract a function error_with_usage()Michael Haggerty2011-08-041-2/+7
| | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | git-check-attr: Introduce a new variableMichael Haggerty2011-08-041-6/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Avoid reusing variable "doubledash" to mean something other than the expected "position of a double-dash, if any". Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | git-check-attr: Extract a function output_attr()Michael Haggerty2011-08-041-3/+9
| | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | Allow querying all attributes on a fileMichael Haggerty2011-08-043-14/+67
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a function, git_all_attrs(), that reports on all attributes that are set on a path. Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | Remove redundant checkMichael Haggerty2011-08-041-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | bootstrap_attr_stack() also checks whether attr_stack is already set. Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | Remove redundant call to bootstrap_attr_stack()Michael Haggerty2011-08-041-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | prepare_attr_stack() does the same thing. Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | Extract a function collect_all_attrs()Michael Haggerty2011-08-041-3/+14
| | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | Teach prepare_attr_stack() to figure out dirlen itselfMichael Haggerty2011-08-041-10/+11
| | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | git-check-attr: Use git_attr_name()Michael Haggerty2011-08-041-7/+6
| | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | Provide access to the name attribute of git_attrMichael Haggerty2011-08-043-1/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It will be present in any likely future reimplementation, and its availability simplifies other code. Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | git-check-attr: Add tests of command-line parsingMichael Haggerty2011-08-041-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | git-check-attr: Add missing "&&"Michael Haggerty2011-08-041-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | Disallow the empty string as an attribute nameMichael Haggerty2011-08-042-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, it was possible to have a line like "file.txt =foo" in a .gitattribute file, after which an invocation like "git check-attr '' -- file.txt" would succeed. This patch disallows both constructs. Please note that any existing .gitattributes file that tries to set an empty attribute will now trigger the error message "error: : not a valid attribute name" whereas previously the nonsense was allowed through. Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | Remove anachronism from commentMichael Haggerty2011-08-041-4/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Setting attributes to arbitrary values ("attribute=value") is now supported, so it is no longer necessary for this comment to justify prohibiting '=' in an attribute name. Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | doc: Correct git_attr() calls in example codeMichael Haggerty2011-08-041-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit 7fb0eaa2 (2010-01-17) changed git_attr() to take a string instead of a string and a length. Update the documentation accordingly. Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | doc: Add a link from gitattributes(5) to git-check-attr(1)Michael Haggerty2011-08-041-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | Merge branch 'js/bisect-no-checkout'Junio C Hamano2011-08-177-178/+430
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * js/bisect-no-checkout: bisect: add support for bisecting bare repositories bisect: further style nitpicks bisect: replace "; then" with "\n<tab>*then" bisect: cleanup whitespace errors in git-bisect.sh. bisect: add documentation for --no-checkout option. bisect: add tests for the --no-checkout option. bisect: introduce --no-checkout support into porcelain. bisect: introduce support for --no-checkout option. bisect: add tests to document expected behaviour in presence of broken trees. bisect: use && to connect statements that are deferred with eval. bisect: move argument parsing before state modification.
| * | | | | bisect: add support for bisecting bare repositoriesJon Seymour2011-08-094-3/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This enhances the support for bisecting history in bare repositories. The "git bisect" command no longer needs to be run inside a repository with a working tree; it defaults to --no-checkout when run in a bare repository. Two tests are included to demonstrate this behaviour. Suggested-by: Junio C Hamano <gitster@pobox.com> Reviewed-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Jon Seymour <jon.seymour@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | | bisect: further style nitpicksJunio C Hamano2011-08-051-10/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix a few remaining lines that indented with spaces. Also simplify the logic of checking out the original branch and reporting error during "bisect reset". Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | | bisect: replace "; then" with "\n<tab>*then"Jon Seymour2011-08-051-9/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Jon Seymour <jon.seymour@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | | bisect: cleanup whitespace errors in git-bisect.sh.Jon Seymour2011-08-051-134/+134
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | All leading whitespace is now encoded with tabs. After this patch, the following is true: RAW=$(cat git-bisect.sh | md5sum) && ROUNDTRIP=$(cat git-bisect.sh | expand -i - | unexpand --first-only - | md5sum) && LEADING=$(sed -n "/^ */p" < git-bisect.sh | wc -l) && test $RAW = $ROUNDTRIP && test $LEADING = 0 && test -z "$(git diff -w HEAD~1 HEAD)" Signed-off-by: Jon Seymour <jon.seymour@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | | bisect: add documentation for --no-checkout option.Jon Seymour2011-08-041-1/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Jon Seymour <jon.seymour@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | | bisect: add tests for the --no-checkout option.Jon Seymour2011-08-041-0/+82
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These tests verify that git-bisect --no-checkout can successfully bisect commit histories that reference damaged trees. Signed-off-by: Jon Seymour <jon.seymour@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>