summaryrefslogtreecommitdiff
path: root/builtin
AgeCommit message (Collapse)AuthorFilesLines
2010-05-21Merge branch 'jn/shortlog'Libravatar Junio C Hamano1-1/+2
* jn/shortlog: pretty: Respect --abbrev option shortlog: Document and test --format option t4201 (shortlog): Test output format with multiple authors t4201 (shortlog): guard setup with test_expect_success Documentation/shortlog: scripted users should not rely on implicit HEAD
2010-05-21Merge branch 'js/maint-receive-pack-symref-alias'Libravatar Junio C Hamano1-37/+91
* js/maint-receive-pack-symref-alias: t5516-fetch-push.sh: style cleanup 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-05-21Merge branch 'np/index-pack-memsave'Libravatar Junio C Hamano1-44/+45
* np/index-pack-memsave: index-pack: smarter memory usage when appending objects index-pack: rationalize unpack_entry_data() index-pack: smarter memory usage when resolving deltas
2010-05-21Merge branch 'jc/maint-no-reflog-expire-unreach-for-head'Libravatar Junio C Hamano1-10/+59
* jc/maint-no-reflog-expire-unreach-for-head: reflog --expire-unreachable: special case entries in "HEAD" reflog more war on "sleep" in tests Document gc.<pattern>.reflogexpire variables Conflicts: Documentation/config.txt
2010-05-21Merge branch 'sp/maint-describe-tiebreak-with-tagger-date'Libravatar Junio C Hamano1-4/+45
* sp/maint-describe-tiebreak-with-tagger-date: describe: Break annotated tag ties by tagger date tag.c: Parse tagger date (if present) tag.c: Refactor parse_tag_buffer to be saner to program tag.h: Remove unused signature field tag.c: Correct indentation
2010-05-21Merge branch 'jc/status-show-ignored'Libravatar Junio C Hamano1-1/+5
* jc/status-show-ignored: wt-status: fix 'fprintf' compilation warning status: --ignored option shows ignored files wt-status: rename and restructure status-print-untracked wt-status: collect ignored files wt-status: plug memory leak while collecting untracked files wt-status: remove unused workdir_untracked member
2010-05-21Merge branch 'np/malloc-threading'Libravatar Junio C Hamano2-3/+12
* np/malloc-threading: Thread-safe xmalloc and xrealloc needs a recursive mutex Make xmalloc and xrealloc thread-safe
2010-05-21Merge branch 'sr/remote-helper-export'Libravatar Junio C Hamano1-8/+8
* sr/remote-helper-export: t5800: testgit helper requires Python support Makefile: Simplify handling of python scripts remote-helpers: add tests for testgit helper remote-helpers: add testgit helper remote-helpers: add support for an export command remote-helpers: allow requesing the path to the .git directory fast-import: always create marks_file directories clone: also configure url for bare clones clone: pass the remote name to remote_get Conflicts: Makefile
2010-05-21Merge branch 'ar/config-from-command-line'Libravatar Junio C Hamano1-1/+5
* ar/config-from-command-line: Complete prototype of git_config_from_parameters() Use strbufs instead of open-coded string manipulation Allow passing of configuration parameters in the command line
2010-05-21Merge branch 'em/checkout-orphan'Libravatar Junio C Hamano1-2/+13
* em/checkout-orphan: git checkout: create unparented branch by --orphan
2010-05-18for-each-ref: Field with abbreviated objectnameLibravatar Michael J Gruber1-0/+3
Introduce a :short modifier to objectname which outputs the abbreviated object name. Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net> Reviewed-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-05-10Merge branch 'maint'Libravatar Junio C Hamano1-1/+1
* maint: handle "git --bare init <dir>" properly
2010-05-10handle "git --bare init <dir>" properlyLibravatar Jeff King1-1/+1
If we know we are creating a bare repository, we use setenv to set the GIT_DIR directory to the current directory (either where we already were, or one we created and chdir'd into with "git init --bare <dir>"). However, with "git --bare init <dir>" (note the --bare as a git wrapper option), the setup code actually sets GIT_DIR for us, but it uses the wrong, original cwd when a directory is given. Because our setenv does not use the overwrite flag, it is ignored. We need to set the overwrite flag, but only when we are given a directory on the command line. That still allows: GIT_DIR=foo.git git init --bare to work. The behavior is changed for: GIT_DIR=foo.git git init --bare bar.git which used to create the repository in foo.git, but now will use bar.git. This is more sane, as command line options should generally override the environment. Noticed by Oliver Hoffmann. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-05-08Merge branch 'bg/apply-blank-trailing-context'Libravatar Junio C Hamano1-6/+6
* bg/apply-blank-trailing-context: apply: Allow blank *trailing* context lines to match beyond EOF
2010-05-08Merge branch 'rc/ls-remote-default'Libravatar Junio C Hamano1-4/+7
* rc/ls-remote-default: ls-remote: fall-back to default remotes when no remote specified
2010-05-08Merge branch 'ab/commit-empty-message'Libravatar Junio C Hamano1-3/+9
* ab/commit-empty-message: Add option to git-commit to allow empty log messages
2010-05-08Merge branch 'jc/maint-reflog-expire-unreachable'Libravatar Junio C Hamano1-40/+56
* jc/maint-reflog-expire-unreachable: reflog --expire-unreachable: avoid merge-base computation
2010-05-08Merge branch 'sd/log-decorate'Libravatar Junio C Hamano1-6/+40
* 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-08Merge branch 'mh/status-optionally-refresh'Libravatar Junio C Hamano1-0/+9
* 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-08Merge branch 'cw/ws-indent-with-tab'Libravatar Junio C Hamano1-42/+39
* 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-08Merge branch 'cc/revert-strategy'Libravatar Junio C Hamano2-110/+150
* 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-08Merge branch 'jk/cached-textconv'Libravatar Junio C Hamano1-69/+1
* 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-08Merge branch 'pc/remove-warn'Libravatar 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
2010-05-08cherry-pick: do not dump core when iconv failsLibravatar Jonathan Nieder1-2/+7
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 cloneLibravatar Junio C Hamano1-1/+5
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-01Merge branch 'maint'Libravatar Junio C Hamano1-1/+1
* maint: index-pack: fix trivial typo in usage string git-submodule.sh: properly initialize shell variables
2010-04-19Merge branch 'maint'Libravatar Junio C Hamano1-1/+1
* 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-18Merge branch 'jg/auto-initialize-notes-with-percent-n-in-format'Libravatar Junio C Hamano1-1/+5
* 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-tagLibravatar Jonathan Nieder1-2/+2
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-13pretty: Initialize notes if %N is usedLibravatar Johannes Gilger1-1/+5
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-10status: --ignored option shows ignored filesLibravatar Junio C Hamano1-1/+5
There is no stronger reason behind the choice of "!!" than just I happened to have typed them. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-04-09Merge branch 'maint'Libravatar Junio C Hamano3-9/+6
* maint: Let check_preimage() use memset() to initialize "struct checkout" fetch/push: fix usage strings
2010-04-08ls-remote: fall-back to default remotes when no remote specifiedLibravatar Tay Ray Chuan1-4/+7
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'Libravatar Junio C Hamano1-1/+2
* jn/mailinfo-scissors: Teach mailinfo %< as an alternative scissors mark
2010-04-07Add option to git-commit to allow empty log messagesLibravatar Ævar Arnfjörð Bjarmason1-3/+9
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'Libravatar Junio C Hamano1-103/+56
* 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'Libravatar Junio C Hamano1-1/+4
* 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 *dstLibravatar Chris Webb1-42/+39
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 markLibravatar Jonathan Nieder1-1/+2
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'Libravatar Junio C Hamano1-1/+1
* 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'Libravatar Junio C Hamano3-42/+70
* 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'Libravatar Junio C Hamano3-27/+25
* ef/cherry-abbrev: ls: remove redundant logic cherry: support --abbrev option
2010-04-03Merge branch 'rs/threaded-grep-context'Libravatar Junio C Hamano1-2/+13
* rs/threaded-grep-context: grep: enable threading for context line printing Conflicts: grep.c
2010-04-02git status: refresh the index if possibleLibravatar Markus Heidelberg1-0/+9
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 definitionLibravatar Markus Heidelberg1-1/+1
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 commentLibravatar Markus Heidelberg1-2/+2
Signed-off-by: Markus Heidelberg <markus.heidelberg@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-04-01make commit_tree a library functionLibravatar Jeff King1-69/+1
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 strategyLibravatar Christian Couder1-2/+23
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 staticLibravatar Christian Couder1-2/+2
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"Libravatar Christian Couder1-36/+45
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>