summaryrefslogtreecommitdiff
path: root/builtin
AgeCommit message (Collapse)AuthorFilesLines
2010-08-15Introduce advise() to print hintsLibravatar Jonathan Nieder1-0/+9
Like error(), warn(), and die(), advise() prints a short message with a formulaic prefix to stderr. It is local to revert.c for now because I am not sure this is the right API (we may want to take an array of advice lines or a boolean argument for easy suppression of unwanted advice). Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-08-15Eliminate “Finished cherry-pick/revert” messageLibravatar Jonathan Nieder1-2/+0
When cherry-pick was written (v0.99.6~63, 2005-08-27), “git commit” was quiet, and the output from cherry-pick provided useful information about the progress of a rebase. Now next to the output from “git commit”, the cherry-pick notification is so much noise (except for the name of the picked commit). $ git cherry-pick ..topic Finished cherry-pick of 499088b. [detached HEAD 17e1ff2] Move glob module to libdpkg Author: Guillem Jover <guillem@debian.org> 8 files changed, 12 insertions(+), 9 deletions(-) rename {src => lib/dpkg}/glob.c (98%) rename {src => lib/dpkg}/glob.h (93%) Finished cherry-pick of ae947e1. [detached HEAD 058caa3] libdpkg: Add missing symbols to Versions script Author: Guillem Jover <guillem@debian.org> 1 files changed, 2 insertions(+), 0 deletions(-) $ The noise is especially troublesome when sifting through the output of a rebase or multiple cherry-pick that eventually failed. With the commit subject, it is already not hard to figure out where the commit came from. So drop the “Finished” message. Cc: Christian Couder <chriscool@tuxfamily.org> Cc: Thomas Rast <trast@student.ethz.ch> Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-07-16revert: improve success message by adding abbreviated commit sha1Libravatar Christian Couder1-2/+3
Instead of saying "Finished one cherry-pick." or "Finished one revert.", we now say "Finished cherry-pick of commit <abbreviated sha1>." or "Finished revert of commit <abbreviated sha1>." which is more informative, especially when cherry-picking or reverting many commits. In case of failure the message is now "Automatic cherry-pick of commit <abbreviated sha1> failed." instead of "Automatic cherry-pick failed." Signed-off-by: Christian Couder <chriscool@tuxfamily.org> Reviewed-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-07-16revert: don't print "Finished one cherry-pick." if commit failedLibravatar Christian Couder1-12/+5
Signed-off-by: Christian Couder <chriscool@tuxfamily.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-07-16revert: refactor commit code into a new run_git_commit() functionLibravatar Christian Couder1-25/+27
Signed-off-by: Christian Couder <chriscool@tuxfamily.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-07-16revert: report success when using option --strategyLibravatar Christian Couder1-22/+29
"git cherry-pick foo" has always reported success with "Finished one cherry-pick" but "cherry-pick --strategy" does not print anything. So move the code to write that message from do_recursive_merge() to do_cherry_pick() so other strategies can share it. This patch also refactors the code that prints a message like "Automatic cherry-pick failed. <help message>". This code was duplicated in both do_recursive_merge() and do_pick_commit(). To do that, now do_recursive_merge() returns an int to signal success or failure. And in case of failure we just return 1 from do_pick_commit() instead of doing "exit(1)" from either do_recursive_merge() or do_pick_commit(). Signed-off-by: Christian Couder <chriscool@tuxfamily.org> Reviewed-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-07-15Merge branch 'wp/merge-tree-fix'Libravatar Junio C Hamano1-1/+2
* wp/merge-tree-fix: merge-tree: fix where two branches share no changes add basic tests for merge-tree
2010-07-15Merge branch 'js/merge-rr-fix'Libravatar Junio C Hamano1-1/+1
* js/merge-rr-fix: MERGE_RR is in .git, not .git/rr-cache
2010-07-15Merge branch 'jc/diff-merge-base-multi'Libravatar Junio C Hamano1-8/+23
* jc/diff-merge-base-multi: diff A...B: give one possible diff when there are more than one merge-base
2010-07-15Merge branch 'jn/grep-open'Libravatar Junio C Hamano1-0/+1
* jn/grep-open: grep -O: Do not pass color sequences as filenames to pager
2010-07-15Merge branch 'jk/maint-status-keep-index-timestamp'Libravatar Junio C Hamano1-5/+11
* jk/maint-status-keep-index-timestamp: do not write out index when status does not have to
2010-07-14MERGE_RR is in .git, not .git/rr-cacheLibravatar Jay Soffian1-1/+1
0af0ac7 (Move MERGE_RR from .git/rr-cache/ into .git/) moved the location of MERGE_RR but I found a few references to the old location. Signed-off-by: Jay Soffian <jaysoffian@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-07-14merge-tree: fix where two branches share no changesLibravatar Will Palmer1-1/+2
15b4f7a (merge-tree: use ll_merge() not xdl_merge(), 2010-01-16) introduced a regression to merge-tree to cause it to segfault when merging files which existed in one branch, but not in the other or in the merge-base. This was caused by referencing entry->path at a time when entry was known to be possibly-NULL. To correct the problem, we save the path of the entry we came in with, as the path should be the same among all the stages no matter which sides are involved in the merge. Signed-off-by: Will Palmer <wmpalmer@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-07-08Merge remote branch 'ko/master' into jc/read-tree-cache-tree-fixLibravatar Junio C Hamano90-0/+43957
* ko/master: (2325 commits) Git 1.7.2-rc2 backmerge a few more fixes to 1.7.1.X series fix git branch -m in presence of cross devices t/t0006: specify timezone as EST5 not EST to comply with POSIX add missing && to submodule-merge testcase t/README: document more test helpers test-date: fix sscanf type conversion xdiff: optimise for no whitespace difference when ignoring whitespace. gitweb: Move evaluate_gitweb_config out of run_request parse_date: fix signedness in timezone calculation t0006: test timezone parsing rerere.txt: Document forget subcommand t/README: proposed rewording... t/README: Document the do's and don'ts of tests t/README: Add a section about skipping tests t/README: Document test_expect_code t/README: Document test_external* t/README: Document the prereq functions, and 3-arg test_* t/README: Typo: paralell -> parallel t/README: The trash is in 't/trash directory.$name' ... Conflicts: builtin-read-tree.c
2010-07-07grep -O: Do not pass color sequences as filenames to pagerLibravatar Nazri Ramliy1-0/+1
With a .gitconfig like this: [color] ui = auto [color "grep"] filename = magenta if stdout is a terminal, the grep machinery will output the color sequence \e[36m before each filename in its output. In the case of "git grep -O foo", output is argv for the pager. Disable color when calling the grep machinery in this case. Signed-off-by: Nazri Ramliy <ayiehere@gmail.com> Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-07-07Merge branch 'maint'Libravatar Junio C Hamano1-2/+2
* maint: backmerge a few more fixes to 1.7.1.X series rev-parse: fix --parse-opt --keep-dashdash --stop-at-non-option fix git branch -m in presence of cross devices Conflicts: RelNotes builtin/rev-parse.c
2010-07-07Merge branch 'maint-1.6.4' into maintLibravatar Junio C Hamano1-2/+2
* maint-1.6.4: rev-parse: fix --parse-opt --keep-dashdash --stop-at-non-option
2010-07-07Merge branch 'tr/receive-pack-aliased-update-fix' into maintLibravatar Junio C Hamano1-37/+91
* tr/receive-pack-aliased-update-fix: check_aliased_update: strcpy() instead of strcat() to copy receive-pack: detect aliased updates which can occur with symrefs receive-pack: switch global variable 'commands' to a parameter Conflicts: t/t5516-fetch-push.sh
2010-07-06do not write out index when status does not have toLibravatar Junio C Hamano1-5/+11
Some codepaths, such as "git status" and "git commit --dry-run", tried to opportunisticly refresh the index and write the result out. But they did so without checking if there was actually any change that needs to be written out. Noticed by Jeff King and Daniel at Rutgers.edu Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-06-30Merge branch 'ar/decorate-color'Libravatar Junio C Hamano1-0/+3
* ar/decorate-color: Add test for correct coloring of git log --decoration Allow customizable commit decorations colors log --decorate: Colorize commit decorations log-tree.c: Use struct name_decoration's type for classifying decoration commit.h: add 'type' to struct name_decoration
2010-06-30Merge branch 'cc/cherry-pick-stdin'Libravatar Junio C Hamano1-17/+18
* cc/cherry-pick-stdin: revert: do not rebuild argv on heap revert: accept arbitrary rev-list options t3508 (cherry-pick): futureproof against unmerged files
2010-06-30Merge branch 'jl/status-ignore-submodules'Libravatar Junio C Hamano1-1/+6
* jl/status-ignore-submodules: Add the option "--ignore-submodules" to "git status" git submodule: ignore dirty submodules for summary and status Conflicts: builtin/commit.c t/t7508-status.sh wt-status.c wt-status.h
2010-06-30Merge branch 'jn/grep-open'Libravatar Junio C Hamano1-26/+95
* jn/grep-open: t/t7811-grep-open.sh: remove broken/redundant creation of fake "less" script t/t7811-grep-open.sh: ensure fake "less" is made executable t/lib-pager.sh: remove unnecessary '^' from 'expr' regular expression grep -O: allow optional argument specifying the pager (or editor) grep: Add the option '--open-files-in-pager' Unify code paths of threaded greps grep: refactor grep_objects loop into its own function Conflicts: t/t7006-pager.sh
2010-06-30Merge branch 'jp/string-list-api-cleanup'Libravatar Junio C Hamano14-79/+79
* jp/string-list-api-cleanup: string_list: Fix argument order for string_list_append string_list: Fix argument order for string_list_lookup string_list: Fix argument order for string_list_insert_at_index string_list: Fix argument order for string_list_insert string_list: Fix argument order for for_each_string_list string_list: Fix argument order for print_string_list
2010-06-30Merge branch 'tr/rev-list-count'Libravatar Junio C Hamano1-0/+16
* tr/rev-list-count: bash completion: Support "divergence from upstream" messages in __git_ps1 rev-list: introduce --count option Conflicts: contrib/completion/git-completion.bash
2010-06-29revert: do not rebuild argv on heapLibravatar Jonathan Nieder1-16/+16
Set options in struct rev_info directly so we can reuse the arguments collected from parse_options without modification. This is just a cleanup; no noticeable change is intended. Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-06-28Merge branch 'maint'Libravatar Junio C Hamano1-0/+4
* maint: Update draft release notes to 1.7.1.1 notes: Initialise variable to appease gcc notes: check number of parameters to "git notes copy"
2010-06-28notes: check number of parameters to "git notes copy"Libravatar Jeff King1-0/+4
Otherwise we may segfault with too few parameters. Signed-off-by: Jeff King <peff@peff.net> Tested-by: Bert Wesarg <Bert.Wesarg@googlemail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-06-27Merge branch 'cp/textconv-cat-file'Libravatar Junio C Hamano2-8/+38
* cp/textconv-cat-file: git-cat-file.txt: Document --textconv t/t8007: test textconv support for cat-file textconv: support for cat_file sha1_name: add get_sha1_with_context()
2010-06-27Merge branch 'ab/blame-textconv'Libravatar Junio C Hamano1-13/+72
* ab/blame-textconv: t/t8006: test textconv support for blame textconv: support for blame textconv: make the API public Conflicts: diff.h
2010-06-27Merge branch 'jp/string-list-api-cleanup' into jn/grep-openLibravatar Julian Phillips15-82/+82
An evil merge to adjust the series to cleaned-up API. From: Julian Phillips <julian@quantumfyre.co.uk> Subject: [PATCH v2 7/7] grep: fix string_list_append calls Date: Sat, 26 Jun 2010 00:41:39 +0100 Message-ID: <20100625234140.18927.35025.julian@quantumfyre.co.uk> * jp/string-list-api-cleanup: string_list: Fix argument order for string_list_append string_list: Fix argument order for string_list_lookup string_list: Fix argument order for string_list_insert_at_index string_list: Fix argument order for string_list_insert string_list: Fix argument order for for_each_string_list string_list: Fix argument order for print_string_list Signed-off-by: Julian Phillips <julian@quantumfyre.co.uk> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-06-27string_list: Fix argument order for string_list_appendLibravatar Julian Phillips9-52/+52
Update the definition and callers of string_list_append to use the string_list as the first argument. This helps make the string_list API easier to use by being more consistent. Signed-off-by: Julian Phillips <julian@quantumfyre.co.uk> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-06-27string_list: Fix argument order for string_list_lookupLibravatar Julian Phillips3-4/+4
Update the definition and callers of string_list_lookup to use the string_list as the first argument. This helps make the string_list API easier to use by being more consistent. Signed-off-by: Julian Phillips <julian@quantumfyre.co.uk> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-06-27string_list: Fix argument order for string_list_insertLibravatar Julian Phillips8-13/+13
Update the definition and callers of string_list_insert to use the string_list as the first argument. This helps make the string_list API easier to use by being more consistent. Signed-off-by: Julian Phillips <julian@quantumfyre.co.uk> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-06-27string_list: Fix argument order for for_each_string_listLibravatar Julian Phillips3-10/+10
Update the definition and callers of for_each_string_list to use the string_list as the first argument. This helps make the string_list API easier to use by being more consistent. Signed-off-by: Julian Phillips <julian@quantumfyre.co.uk> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-06-25Merge branch 'maint'Libravatar Junio C Hamano1-1/+1
* maint: msvc: Fix some compiler warnings Documentation: grep: fix asciidoc problem with -- msvc: Fix some "expr evaluates to function" compiler warnings
2010-06-25Add the option "--ignore-submodules" to "git status"Libravatar Jens Lehmann1-1/+6
In some use cases it is not desirable that "git status" considers submodules that only contain untracked content as dirty. This may happen e.g. when the submodule is not under the developers control and not all build generated files have been added to .gitignore by the upstream developers. Using the "untracked" parameter for the "--ignore-submodules" option disables checking for untracked content and lets git diff report them as changed only when they have new commits or modified content. Sometimes it is not wanted to have submodules show up as changed when they just contain changes to their work tree (this was the behavior before 1.7.0). An example for that are scripts which just want to check for submodule commits while ignoring any changes to the work tree. Also users having large submodules known not to change might want to use this option, as the - sometimes substantial - time it takes to scan the submodule work tree(s) is saved when using the "dirty" parameter. And if you want to ignore any changes to submodules, you can now do that by using this option without parameters or with "all" (when the config option status.submodulesummary is set, using "all" will also suppress the output of the submodule summary). A new function handle_ignore_submodules_arg() is introduced to parse this option new to "git status" in a single location, as "git diff" already knew it. Signed-off-by: Jens Lehmann <Jens.Lehmann@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-06-25revert: accept arbitrary rev-list optionsLibravatar Christian Couder1-1/+2
This can be useful to do something like: git rev-list --reverse master -- README | git cherry-pick -n --stdin without using xargs. Signed-off-by: Christian Couder <chriscool@tuxfamily.org> Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-06-24Allow customizable commit decorations colorsLibravatar Nazri Ramliy1-0/+3
Signed-off-by: Nazri Ramliy <ayiehere@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-06-24msvc: Fix some "expr evaluates to function" compiler warningsLibravatar Ramsay Jones1-1/+1
In particular, the following warning is issued while compiling notes.c: notes.c(927) : warning C4550: expression evaluates to a \ function which is missing an argument list along with identical warnings on lines 928, 1016 and 1017. In order to suppress the warning, we change the definition of combine_notes_fn, so that the symbol type is an (explicit) "pointer to function ...". As a result, several other declarations need some minor fix-up to take account of the new typedef. Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk> Acked-by: Johan Herland <johan@herland.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-06-22Merge branch 'sb/format-patch-signature'Libravatar Junio C Hamano1-3/+15
* sb/format-patch-signature: completion: Add --signature and format.signature format-patch: Add a signature option (--signature)
2010-06-22Merge branch 'cc/cherry-pick-series'Libravatar Junio C Hamano1-41/+79
* cc/cherry-pick-series: Documentation/revert: describe passing more than one commit Documentation/cherry-pick: describe passing more than one commit revert: add tests to check cherry-picking many commits revert: allow cherry-picking more than one commit revert: change help_msg() to take no argument revert: refactor code into a do_pick_commit() function revert: use run_command_v_opt() instead of execv_git_cmd() revert: cleanup code for -x option
2010-06-22Merge branch 'cc/maint-commit-reflog-msg' into maintLibravatar Junio C Hamano1-4/+9
* cc/maint-commit-reflog-msg: commit: use value of GIT_REFLOG_ACTION env variable as reflog message
2010-06-22Merge branch 'jk/maint-advice-empty-amend' into maintLibravatar Junio C Hamano1-0/+7
* jk/maint-advice-empty-amend: commit: give advice on empty amend
2010-06-22Merge branch 'tc/commit-abbrev-fix' into maintLibravatar Junio C Hamano1-6/+4
* tc/commit-abbrev-fix: commit::print_summary(): don't use format_commit_message() t7502-commit: add summary output tests for empty and merge commits t7502-commit: add tests for summary output
2010-06-22Merge branch 'cb/ls-files-cdup' into maintLibravatar Junio C Hamano1-34/+41
* cb/ls-files-cdup: ls-files: allow relative pathspec quote.c: separate quoting and relative path generation
2010-06-22Merge branch 'tc/merge-m-log' into maintLibravatar Junio C Hamano2-36/+60
* tc/merge-m-log: merge: --log appends shortlog to message if specified fmt-merge-msg: add function to append shortlog only fmt-merge-msg: refactor merge title formatting fmt-merge-msg: minor refactor of fmt_merge_msg() merge: rename variable merge: update comment t7604-merge-custom-message: show that --log doesn't append to -m t7604-merge-custom-message: shift expected output creation
2010-06-22Merge branch 'ph/clone-message-reword' into maintLibravatar Junio C Hamano1-1/+2
* ph/clone-message-reword: clone: reword messages to match the end-user perception
2010-06-22Merge branch 'jn/maint-amend-missing-name' into maintLibravatar Junio C Hamano1-7/+13
* jn/maint-amend-missing-name: commit --amend: cope with missing display name
2010-06-22Merge branch 'pc/remove-warn' into maintLibravatar Junio C Hamano1-5/+1
* pc/remove-warn: Remove a redundant errno test in a usage of remove_path Introduce remove_or_warn function Implement the rmdir_or_warn function Generalise the unlink_or_warn function