summaryrefslogtreecommitdiff
path: root/builtin
AgeCommit message (Collapse)Author
2010-05-09Merge branch 'bg/apply-blank-trailing-context'Junio C Hamano
* bg/apply-blank-trailing-context: apply: Allow blank *trailing* context lines to match beyond EOF
2010-05-09Merge branch 'rc/ls-remote-default'Junio C Hamano
* rc/ls-remote-default: ls-remote: fall-back to default remotes when no remote specified
2010-05-09Merge branch 'ab/commit-empty-message'Junio C Hamano
* ab/commit-empty-message: Add option to git-commit to allow empty log messages
2010-05-09Merge branch 'jc/maint-reflog-expire-unreachable'Junio C Hamano
* jc/maint-reflog-expire-unreachable: reflog --expire-unreachable: avoid merge-base computation
2010-05-09Merge branch 'sd/log-decorate'Junio C Hamano
* sd/log-decorate: log.decorate: only ignore it under "log --pretty=raw" script with rev-list instead of log log --pretty/--oneline: ignore log.decorate log.decorate: usability fixes Add `log.decorate' configuration variable. git_config_maybe_bool() Conflicts: builtin/log.c
2010-05-09Merge branch 'mh/status-optionally-refresh'Junio C Hamano
* mh/status-optionally-refresh: t7508: add a test for "git status" in a read-only repository git status: refresh the index if possible t7508: add test for "git status" refreshing the index
2010-05-09Merge branch 'cw/ws-indent-with-tab'Junio C Hamano
* cw/ws-indent-with-tab: whitespace: tests for git-apply --whitespace=fix with tab-in-indent whitespace: add tab-in-indent support for --whitespace=fix whitespace: replumb ws_fix_copy to take a strbuf *dst instead of char *dst whitespace: tests for git-diff --check with tab-in-indent error class whitespace: add tab-in-indent error class whitespace: we cannot "catch all errors known to git" anymore
2010-05-09Merge branch 'cc/revert-strategy'Junio C Hamano
* cc/revert-strategy: revert: add "--strategy" option to choose merge strategy merge: make function try_merge_command non static merge: refactor code that calls "git merge-STRATEGY" revert: refactor merge recursive code into its own function revert: use strbuf to refactor the code that writes the merge message Conflicts: builtin/revert.c
2010-05-09Merge branch 'jk/cached-textconv'Junio C Hamano
* jk/cached-textconv: diff: avoid useless filespec population diff: cache textconv output textconv: refactor calls to run_textconv introduce notes-cache interface make commit_tree a library function
2010-05-09Merge branch 'pc/remove-warn'Junio C Hamano
* 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
2010-05-08cherry-pick: do not dump core when iconv failsJonathan Nieder
When cherry-picking, usually the new and old commit encodings are both UTF-8. Most old iconv implementations do not support this trivial conversion, so on old platforms, out->message remains NULL, and later attempts to read it segfault. Fix this by noticing the input and output encodings match and skipping the iconv step, like the other reencode_string() call sites already do. Also stop segfaulting on other iconv failures: if iconv fails for some other reason, the best we can do is to pass the old message through. This fixes a regression introduced in v1.7.1-rc0~15^2~2 (revert: clarify label on conflict hunks, 2010-03-20). Reported-by: Andreas Krey <a.krey@gmx.de> Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-05-04clone: quell the progress report from init and report on cloneJunio C Hamano
Currently, a local git clone reports only initializing an empty git dir, which is potentially confusing. Instead, report that cloning is in progress and when it is done (unless -q) is given, and suppress the init report. Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-05-02Merge branch 'maint'Junio C Hamano
* maint: index-pack: fix trivial typo in usage string git-submodule.sh: properly initialize shell variables
2010-04-20Merge branch 'maint'Junio C Hamano
* maint: t7012: Mark missing tests as TODO reflog: remove 'show' from 'expire's usage string MSVC: Fix build by adding missing termios.h dummy
2010-04-19Merge branch 'jg/auto-initialize-notes-with-percent-n-in-format'Junio C Hamano
* jg/auto-initialize-notes-with-percent-n-in-format: t3301: add tests to use --format="%N" pretty: Initialize notes if %N is used
2010-04-17tag -v: use RUN_GIT_CMD to run verify-tagJonathan Nieder
This is the preferred way to run a git command. The only obvious observable effects I can think of are that the exec is properly reported in GIT_TRACE output and that verifying signed tags will still work if the git-verify-tag hard link in gitexecdir goes missing. Helped-by: Johannes Sixt <j6t@kdbg.org> Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-04-14pretty: Initialize notes if %N is usedJohannes Gilger
When using git log --pretty='%N' without an explicit --show-notes, git would segfault. This patches fixes this behaviour by loading the needed notes datastructures if --pretty is used and the format contains %N. When --pretty='%N' is used together with --no-notes, %N won't be expanded. This is an extension to a proposed patch by Jeff King. Signed-off-by: Johannes Gilger <heipei@hackvalue.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-04-10Merge branch 'maint'Junio C Hamano
* maint: Let check_preimage() use memset() to initialize "struct checkout" fetch/push: fix usage strings
2010-04-09ls-remote: fall-back to default remotes when no remote specifiedTay Ray Chuan
Instead of breaking execution when no remote (as specified in the variable dest) is specified when git-ls-remote is invoked, continue on and let remote_get() handle it. This way, we are able to use the default remotes (eg. "origin", branch.<name>.remote), as git-fetch, git-push, and other users of remote_get(), do. If no suitable remote is found, exit with a message describing the issue, instead of just the usage text, as we do previously. Add several tests to check that git-ls-remote handles the no-remote-specified situation. Also add a test that "git ls-remote <pattern>" does not work; we are unable to guess the remote in that situation, as are git-fetch and git-push. In that test, we are testing for messages coming from two separate processes, but we should be OK, because the second message is triggered by closing the fd which must happen after the first message is printed. (analysis by Jeff King.) Signed-off-by: Tay Ray Chuan <rctay89@gmail.com> Acked-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-04-07Merge branch 'jn/mailinfo-scissors'Junio C Hamano
* jn/mailinfo-scissors: Teach mailinfo %< as an alternative scissors mark
2010-04-07Add option to git-commit to allow empty log messagesÆvar Arnfjörð Bjarmason
Change git-commit(1) to accept the --allow-empty-message option to allow a commit with an empty message. This is analogous to the existing --allow-empty option which allows a commit that records no changes. As these are mainly for interoperating with foreign SCM systems, and are not meant for normal use, ensure that "git commit -h" does not talk about them. Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-04-06Merge branch 'sb/fmt-merge-msg'Junio C Hamano
* sb/fmt-merge-msg: fmt-merge-msg: hide summary option fmt-merge-msg: remove custom string_list implementation string-list: add unsorted_string_list_lookup() fmt-merge-msg: use pretty.c routines t6200: test fmt-merge-msg more t6200: modernize with test_tick fmt-merge-msg: be quiet if nothing to merge
2010-04-06Merge branch 'ef/maint-empty-commit-log'Junio C Hamano
* ef/maint-empty-commit-log: rev-list: fix --pretty=oneline with empty message
2010-04-04whitespace: replumb ws_fix_copy to take a strbuf *dst instead of char *dstChris Webb
To implement --whitespace=fix for tab-in-indent, we have to allow for the possibility that whitespace can increase in size when it is fixed, expanding tabs to to multiple spaces in the initial indent. Signed-off-by: Chris Webb <chris@arachsys.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-04-04Teach mailinfo %< as an alternative scissors markJonathan Nieder
Handle perforations found “in the wild” more robustly by recognizing “%<” as an alternative scissors mark. This feature is only meant to support old habits. Discourage new use of the percent-based version by only documenting the 8< symbol so new users’ perforations can still be recognized by old versions of Git. Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-04-03Merge branch 'mg/use-default-abbrev-length-in-rev-list'Junio C Hamano
* mg/use-default-abbrev-length-in-rev-list: rev-list: use default abbrev length when abbrev-commit is in effect
2010-04-03Merge branch 'jn/merge-diff3-label'Junio C Hamano
* jn/merge-diff3-label: merge-recursive: add a label for ancestor cherry-pick, revert: add a label for ancestor revert: clarify label on conflict hunks compat: add mempcpy() checkout -m --conflict=diff3: add a label for ancestor merge_trees(): add ancestor label parameter for diff3-style output merge_file(): add comment explaining behavior wrt conflict style checkout --conflict=diff3: add a label for ancestor ll_merge(): add ancestor label parameter for diff3-style output merge-file --diff3: add a label for ancestor xdl_merge(): move file1 and file2 labels to xmparam structure xdl_merge(): add optional ancestor label to diff3-style output tests: document cherry-pick behavior in face of conflicts tests: document format of conflicts from checkout -m Conflicts: builtin/revert.c
2010-04-03Merge branch 'ef/cherry-abbrev'Junio C Hamano
* ef/cherry-abbrev: ls: remove redundant logic cherry: support --abbrev option
2010-04-03Merge branch 'rs/threaded-grep-context'Junio C Hamano
* rs/threaded-grep-context: grep: enable threading for context line printing Conflicts: grep.c
2010-04-03git status: refresh the index if possibleMarkus Heidelberg
This was already the case before commit 9e4b7ab6 (git status: not "commit --dry-run" anymore, 2009-08-15) with the difference that it died at failure. It got lost during the new implementation of "git status", which was meant to only change behaviour when invoked with arguments. Signed-off-by: Markus Heidelberg <markus.heidelberg@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-04-02builtin/commit: remove unnecessary variable definitionMarkus Heidelberg
The file descriptor is already defined at the beginning of the function. Signed-off-by: Markus Heidelberg <markus.heidelberg@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-04-02builtin/commit: fix duplicated sentence in a commentMarkus Heidelberg
Signed-off-by: Markus Heidelberg <markus.heidelberg@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-04-02make commit_tree a library functionJeff King
Until now, this has been part of the commit-tree builtin. However, it is already used by other builtins (like commit, merge, and notes), and it would be useful to access it from library code. The check_valid helper has to come along, too, but is given a more library-ish name of "assert_sha1_type". Otherwise, the code is unchanged. There are still a few rough edges for a library function, like printing the utf8 warning to stderr, but we can address those if and when they come up as inappropriate. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-04-01revert: add "--strategy" option to choose merge strategyChristian Couder
This patch makes it possible to use a different merge strategy when cherry-picking. This is usefull mainly for debugging purposes as it allows to see if some failures are caused by the merge strategy used or not. Signed-off-by: Christian Couder <chriscool@tuxfamily.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-04-01merge: make function try_merge_command non staticChristian Couder
Signed-off-by: Christian Couder <chriscool@tuxfamily.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-04-01merge: refactor code that calls "git merge-STRATEGY"Christian Couder
In the try_merge_strategy() function, when the strategy is "recursive" or "subtree", the merge_recursive() function is called. Otherwise we launch a "git merge-STRATEGY" process. To make it possible to reuse code that launches a "git merge-STRATEGY" process, this patch refactors this code into a new try_merge_command() function. Signed-off-by: Christian Couder <chriscool@tuxfamily.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-04-01revert: refactor merge recursive code into its own functionChristian Couder
The code that is used to do a recursive merge is extracted from the revert_or_cherry_pick() function and put into a new do_recursive_merge() function. Signed-off-by: Christian Couder <chriscool@tuxfamily.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-04-01revert: use strbuf to refactor the code that writes the merge messageChristian Couder
The code in this commit was written by Stephan Beyer for the sequencer GSoC project: git://repo.or.cz/git/sbeyer.git Signed-off-by: Christian Couder <chriscool@tuxfamily.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-03-31Sync with 1.7.0.4Junio C Hamano
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-03-30Merge branch 'maint'Junio C Hamano
* maint: format-patch: Squelch 'fatal: Not a range." error
2010-03-29Merge branch 'cc/cherry-pick-ff'Junio C Hamano
* cc/cherry-pick-ff: revert: fix tiny memory leak in cherry-pick --ff rebase -i: use new --ff cherry-pick option Documentation: describe new cherry-pick --ff option cherry-pick: add tests for new --ff option revert: add --ff option to allow fast forward when cherry-picking builtin/merge: make checkout_fast_forward() non static parse-options: add parse_options_concat() to concat options
2010-03-29Merge branch 'sb/notes-parse-opt'Junio C Hamano
* sb/notes-parse-opt: notes: rework subcommands and parse options Conflicts: builtin/notes.c
2010-03-29Merge branch 'maint'Junio C Hamano
* maint: t9350: fix careless use of "cd" difftool: Fix '--gui' when diff.guitool is unconfigured fast-export: don't segfault when marks file cannot be opened
2010-03-28Introduce remove_or_warn functionPeter Collingbourne
This patch introduces the remove_or_warn function which is a generalised version of the {unlink,rmdir}_or_warn functions. It takes an additional parameter indicating the mode of the file to be removed. The patch also modifies certain functions to use remove_or_warn where appropriate, and adds a test case for a bug fixed by the use of remove_or_warn. Signed-off-by: Peter Collingbourne <peter@pcc.me.uk> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-03-25fmt-merge-msg: hide summary optionStephen Boyd
The --summary command line option has been deprecated in favor of --log. Hide the option from the help message to further discourage the use of this option. Signed-off-by: Stephen Boyd <bebarino@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-03-25fmt-merge-msg: remove custom string_list implementationStephen Boyd
This command uses a custom version of string list when it could just as easily use the string_list API. Convert it to use string_list and reduce the code size a bit. Signed-off-by: Stephen Boyd <bebarino@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-03-25fmt-merge-msg: use pretty.c routinesStephen Boyd
This command duplicates functionality of the '%s' pretty format. Simplify the code a bit by using the pretty printing routine instead of open-coding it here. Signed-off-by: Stephen Boyd <bebarino@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-03-25fmt-merge-msg: be quiet if nothing to mergeStephen Boyd
When FETCH_HEAD contains only 'not-for-merge' entries fmt-merge-msg still outputs "Merge" (and if the branch isn't master " into <branch>"). In this case fmt-merge-msg is outputting junk and should really just be quiet. Fix it. Signed-off-by: Stephen Boyd <bebarino@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-03-24Merge branch 'tr/notes-display'Junio C Hamano
* tr/notes-display: git-notes(1): add a section about the meaning of history notes: track whether notes_trees were changed at all notes: add shorthand --ref to override GIT_NOTES_REF commit --amend: copy notes to the new commit rebase: support automatic notes copying notes: implement helpers needed for note copying during rewrite notes: implement 'git notes copy --stdin' rebase -i: invoke post-rewrite hook rebase: invoke post-rewrite hook commit --amend: invoke post-rewrite hook Documentation: document post-rewrite hook Support showing notes from more than one notes tree test-lib: unset GIT_NOTES_REF to stop it from influencing tests Conflicts: git-am.sh refs.c
2010-03-24Merge branch 'pb/log-first-parent-p-m'Junio C Hamano
* pb/log-first-parent-p-m: show --first-parent/-m: do not default to --cc show -c: show patch text revision: introduce setup_revision_opt t4013: add tests for log -p -m --first-parent git log -p -m: document -m and honor --first-parent