summaryrefslogtreecommitdiff
path: root/builtin
AgeCommit message (Collapse)AuthorFilesLines
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-05-25Merge branch 'maint'Libravatar Junio C Hamano1-1/+2
* maint: Documentation/SubmittingPatches: clarify GMail section and SMTP show-branch: use DEFAULT_ABBREV instead of 7 t7502-commit: fix spelling test get_git_work_tree() return value for NULL
2010-05-25show-branch: use DEFAULT_ABBREV instead of 7Libravatar Tay Ray Chuan1-1/+2
Signed-off-by: Tay Ray Chuan <rctay89@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-05-21Merge branch 'pb/patch-id-plus'Libravatar Junio C Hamano1-19/+88
* pb/patch-id-plus: patch-id: Add support for mbox format patch-id: extract parsing one diff out of generate_id_list
2010-05-21Merge branch 'st/remote-tags-no-tags'Libravatar Junio C Hamano1-1/+20
* st/remote-tags-no-tags: remote add: add a --[no-]tags option Honor "tagopt = --tags" configuration option
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-19remote add: add a --[no-]tags optionLibravatar Samuel Tardieu1-1/+20
Add '--[no-]tags' options to 'git remote add' which add the 'remote.REMOTE.tagopt = --[no-]tags' to the configuration file. This mimics the "--tags" and "--no-tags" options of "git fetch". Signed-off-by: Samuel Tardieu <sam@rfc1149.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-04-19patch-id: Add support for mbox formatLibravatar Paolo Bonzini1-6/+62
I have an alias that takes two arguments and compares their patch IDs. I would like to use to make sure I've tested exactly what I submit (patch by patch), like git patch-cmp origin/master.. file-being-sent However, I cannot do that because git patch-id is fooled by the "-- " trailer that git format-patch puts, or likely by the MIME boundary. This patch adds hunk parsing logic to git patch-id in order to detect an out of place "-" line and split the patch when it comes. In addition, commit ids in the "From " lines are considered and printed in the output. Signed-off-by: Paolo Bonzini <bonzini@gnu.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-04-19patch-id: extract parsing one diff out of generate_id_listLibravatar Paolo Bonzini1-13/+26
This simplifies a bit the next patch, since it will have more than one condition to exit the loop. Signed-off-by: Paolo Bonzini <bonzini@gnu.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
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>