summaryrefslogtreecommitdiff
path: root/builtin
AgeCommit message (Collapse)AuthorFilesLines
2011-05-15read_sha1_file(): get rid of read_sha1_file_repl() madnessLibravatar Junio C Hamano1-2/+2
Most callers want to silently get a replacement object, and they do not care what the real name of the replacement object is. Worse yet, no sane interface to return the underlying object without replacement is provided. Remove the function and make only the few callers that want the name of the replacement object find it themselves. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-05-06Merge branch 'js/blame-parsename'Libravatar Junio C Hamano1-1/+1
* js/blame-parsename: t/annotate-tests: Use echo & cat instead of sed blame: tolerate bogus e-mail addresses a bit better
2011-05-06Merge branch 'nd/struct-pathspec'Libravatar Junio C Hamano5-17/+26
* nd/struct-pathspec: pathspec: rename per-item field has_wildcard to use_wildcard Improve tree_entry_interesting() handling code Convert read_tree{,_recursive} to support struct pathspec Reimplement read_tree_recursive() using tree_entry_interesting()
2011-05-04Merge branch 'mg/rev-list-count-cherry'Libravatar Junio C Hamano1-2/+8
* mg/rev-list-count-cherry: rev-list --count: separate count for --cherry-mark
2011-05-04Merge branch 'vr/merge-base-doc'Libravatar Junio C Hamano1-1/+2
* vr/merge-base-doc: Restructure documentation for git-merge-base. Documentation: update to git-merge-base --octopus
2011-05-02Merge branch 'jk/notes-ui-updates'Libravatar Junio C Hamano1-10/+0
* jk/notes-ui-updates: contrib/completion: --notes, --no-notes log/pretty-options: Document --[no-]notes and deprecate old notes options revision.c: make --no-notes reset --notes list revision.c: support --notes command-line option notes: refactor display notes default handling notes: refactor display notes extra refs field revision.c: refactor notes ref expansion notes: make expand_notes_ref globally accessible
2011-05-02Merge branch 'ab/i18n-fixup'Libravatar Junio C Hamano4-20/+32
* ab/i18n-fixup: (24 commits) i18n: use test_i18n{cmp,grep} in t7600, t7607, t7611 and t7811 i18n: use test_i18n{grep,cmp} in t7508 i18n: use test_i18ngrep in t7506 i18n: use test_i18ngrep and test_i18ncmp in t7502 i18n: use test_i18ngrep in t7501 i18n: use test_i18ncmp in t7500 i18n: use test_i18ngrep in t7201 i18n: use test_i18ncmp and test_i18ngrep in t7102 and t7110 i18n: use test_i18ncmp and test_i18ngrep in t5541, t6040, t6120, t7004, t7012 and t7060 i18n: use test_i18ncmp and test_i18ngrep in t3700, t4001 and t4014 i18n: use test_i18ncmp and test_i18ngrep in t3203, t3501 and t3507 i18n: use test_i18ngrep in t2020, t2204, t3030, and t3200 i18n: use test_i18ngrep in lib-httpd and t2019 i18n: do not overuse C_LOCALE_OUTPUT (grep) i18n: use test_i18ncmp in t1200 and t2200 i18n: .git file is not a human readable message (t5601) i18n: do not overuse C_LOCALE_OUTPUT i18n: mark init-db messages for translation i18n: mark checkout plural warning for translation i18n: mark checkout --detach messages for translation ...
2011-05-02Merge branch 'jh/notes-add-ui'Libravatar Junio C Hamano1-3/+17
* jh/notes-add-ui: Make "git notes add" more user-friendly when there are existing notes Conflicts: builtin/notes.c
2011-04-29blame: tolerate bogus e-mail addresses a bit betterLibravatar Josh Stone1-1/+1
The names and e-mails are sanitized by fmt_ident() when creating commits, so that they do not contain "<" nor ">", and the "committer" and "author" lines in the commit object will always be in the form: ("author" | "committer") name SP "<" email ">" SP timestamp SP zone When parsing the email part out, the current code looks for SP starting from the end of the email part, but the author could obfuscate the address as "author at example dot com". We should instead look for SP followed by "<", to match the logic of the side that formats these lines. Signed-off-by: Josh Stone <jistone@redhat.com> Reviewed-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-04-28Merge branch 'jc/rename-degrade-cc-to-c'Libravatar Junio C Hamano3-4/+21
* jc/rename-degrade-cc-to-c: diffcore-rename: fall back to -C when -C -C busts the rename limit diffcore-rename: record filepair for rename src diffcore-rename: refactor "too many candidates" logic builtin/diff.c: remove duplicated call to diff_result_code()
2011-04-27Merge branch 'cn/format-patch-quiet'Libravatar Junio C Hamano1-6/+10
* cn/format-patch-quiet: format-patch: document --quiet option format-patch: don't pass on the --quiet flag
2011-04-27Merge branch 'jc/merge-dash-previous'Libravatar Junio C Hamano1-3/+6
* jc/merge-dash-previous: merge: allow "-" as a short-hand for "previous branch"
2011-04-27Merge branch 'rj/sparse'Libravatar Junio C Hamano3-6/+2
* rj/sparse: sparse: Fix some "symbol not declared" warnings sparse: Fix errors due to missing target-specific variables sparse: Fix an "symbol 'merge_file' not decared" warning sparse: Fix an "symbol 'format_subject' not declared" warning sparse: Fix some "Using plain integer as NULL pointer" warnings sparse: Fix an "symbol 'cmd_index_pack' not declared" warning Makefile: Use cgcc rather than sparse in the check target
2011-04-27Merge branch 'nk/blame-abbrev'Libravatar Junio C Hamano1-1/+8
* nk/blame-abbrev: blame: add --abbrev command line option and make it honor core.abbrev
2011-04-27Merge branch 'dm/color-palette'Libravatar Junio C Hamano1-13/+3
* dm/color-palette: Share color list between graph and show-branch
2011-04-27Merge branch 'jc/pack-objects-bigfile'Libravatar Junio C Hamano1-2/+6
* jc/pack-objects-bigfile: Teach core.bigfilethreashold to pack-objects
2011-04-27Merge branch 'mg/reflog-with-options'Libravatar Junio C Hamano1-13/+17
* mg/reflog-with-options: reflog: fix overriding of command line options t/t1411: test reflog with formats builtin/log.c: separate default and setup of cmd_log_init()
2011-04-26rev-list --count: separate count for --cherry-markLibravatar Michael J Gruber1-2/+8
When --count is used with --cherry-mark, omit the patch equivalent commits from the count for left and right commits and print the count of equivalent commits separately. Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-04-15Documentation: update to git-merge-base --octopusLibravatar Vincent van Ravesteijn1-1/+2
Unlike plain merge-base, merge-base --octopus only requires at least one commit argument; update the synopsis to reflect that. Add a sentence to the discussion that when --octopus is used, we do expect '2' (the common ansestor across all) as the result. Signed-off-by: Vincent van Ravesteijn <vfr@lyx.org> Reviewed-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-04-13revert: Hide '-r' option in default usageLibravatar Ramkumar Ramachandra1-1/+2
The '-r' command-line option is a no-op provided only for backward compatiblity since abd6970 (cherry-pick: make -r the default, 2006-10-05), and somehow ended up surviving across reimplementation in C at 9509af6 (Make git-revert & git-cherry-pick a builtin, 2007-03-01) and another rewrite of the command line parser at f810379 (Make builtin-revert.c use parse_options, 2007-10-07). We should have stopped advertising the option long time ago. Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-04-12format-patch: don't pass on the --quiet flagLibravatar Carlos Martín Nieto1-6/+10
The --quiet flag is not meant to be passed on to the diff, as the user always wants the patches to be produced so catch it and pass it to reopen_stdout which decides whether to print the filename or not. Noticed by Paul Gortmaker Signed-off-by: Carlos Martín Nieto <cmn@elego.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-04-12i18n: mark init-db messages for translationLibravatar Ævar Arnfjörð Bjarmason1-5/+5
Mark the init-db messages that were added in v1.7.5-rc1~16^2 (init, clone: support --separate-git-dir for .git file) by Nguyễn Thái Ngọc Duy for translation. This requires splitting up the tests that the patch added so that certain parts of them can be skipped unless the C_LOCALE_OUTPUT prerequisite is satisfied. Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-04-12i18n: mark checkout plural warning for translationLibravatar Ævar Arnfjörð Bjarmason1-3/+15
Mark the "Warning: you are leaving %d commit(s) behind" message added in v1.7.5-rc0~74^2 (commit: give final warning when reattaching HEAD to leave commits behind) by Junio C Hamano for translation. This message requires the use of ngettext() features, and is the first message to use the Q_() wrapper around ngettext(). Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-04-12i18n: mark checkout --detach messages for translationLibravatar Ævar Arnfjörð Bjarmason1-3/+3
Mark messages added in v1.7.5-rc0~117^2~2 (checkout: introduce --detach synonym for "git checkout foo^{commit}") by Junio C Hamano for translation. Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-04-12i18n: mark clone nonexistent repository message for translationLibravatar Ævar Arnfjörð Bjarmason1-1/+1
Mark the "repository '%s' does not exist" message added in v1.7.4.2~21^2 (clone: die when trying to clone missing local path) by Jeff King for translation. Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-04-12i18n: mark merge CHERRY_PICK_HEAD messages for translationLibravatar Ævar Arnfjörð Bjarmason1-3/+3
Mark CHERRY_PICK_HEAD related messages in builtin/merge.c that were added in v1.7.5-rc0~88^2~2 (Introduce CHERRY_PICK_HEAD) by Jay Soffian for translation. Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-04-12i18n: mark merge "upstream" messages for translationLibravatar Ævar Arnfjörð Bjarmason1-4/+4
Mark the merge messages that were added in v1.7.5-rc1~17^2 (merge: merge with the default upstream branch without argument) by Junio C Hamano for translation. Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-04-12i18n: mark merge "Could not read from" message for translationLibravatar Ævar Arnfjörð Bjarmason1-1/+1
Mark the "Could not read from '%s'" message that was added to builtin/merge.c in v1.7.4.2~25^2 (merge: honor prepare-commit-msg hook) by Jay Soffian for translation. Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-04-11sparse: Fix an "symbol 'merge_file' not decared" warningLibravatar Ramsay Jones1-2/+1
In order to fix the warning, we add a new "merge-file.h" header containing the extern declaration of the merge_file() function, and include the header in the source files that require the declaration. Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-04-11sparse: Fix an "symbol 'format_subject' not declared" warningLibravatar Ramsay Jones1-3/+0
In order to fix the warning, we add an extern declaration for this function to the "commit.h" header file, along with all other non- static functions defined in pretty.c. Also, we remove the function declaration from builtin/shortlog.c, since it is no longer needed. Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-04-11sparse: Fix an "symbol 'cmd_index_pack' not declared" warningLibravatar Ramsay Jones1-1/+1
Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-04-07merge: allow "-" as a short-hand for "previous branch"Libravatar Junio C Hamano1-3/+6
Just like "git checkout -" is a short-hand for "git checkout @{-1}" to conveniently switch back to the previous branch, "git merge -" is a short-hand for "git merge @{-1}" to conveniently merge the previous branch. It will allow me to say: $ git checkout -b au/topic $ git am -s ./+au-topic.mbox $ git checkout pu $ git merge - which is an extremely typical and repetitive operation during my git day. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-04-06Merge branch 'jk/maint-remote-mirror-safer'Libravatar Junio C Hamano1-13/+49
* jk/maint-remote-mirror-safer: remote: deprecate --mirror remote: separate the concept of push and fetch mirrors remote: disallow some nonsensical option combinations
2011-04-05Teach core.bigfilethreashold to pack-objectsLibravatar Junio C Hamano1-2/+6
The pack-objects command should take notice of the object file and refrain from attempting to delta large ones, to be consistent with the fast-import command. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-04-05blame: add --abbrev command line option and make it honor core.abbrevLibravatar Namhyung Kim1-1/+8
If user sets config.abbrev option, use it as if --abbrev was given. This is the default value and user can override different abbrev length by specifying the --abbrev=N command line option. Signed-off-by: Namhyung Kim <namhyung@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-04-05pathspec: rename per-item field has_wildcard to use_wildcardLibravatar Junio C Hamano2-2/+3
As the point of the last change is to allow use of strings as literals no matter what characters are in them, "has_wildcard" does not match what we use this field for anymore. It is used to decide if the wildcard matching should be used, so rename it to match the usage better. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-04-04Share color list between graph and show-branchLibravatar Dan McGee1-13/+3
This also adds the new colors to show-branch that were added a while back for graph output. Signed-off-by: Dan McGee <dpmcgee@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-04-04Merge branch 'jl/submodule-fetch-on-demand'Libravatar Junio C Hamano1-12/+36
* jl/submodule-fetch-on-demand: fetch/pull: Describe --recurse-submodule restrictions in the BUGS section submodule update: Don't fetch when the submodule commit is already present fetch/pull: Don't recurse into a submodule when commits are already present Submodules: Add 'on-demand' value for the 'fetchRecurseSubmodule' option config: teach the fetch.recurseSubmodules option the 'on-demand' value fetch/pull: Add the 'on-demand' value to the --recurse-submodules option fetch/pull: recurse into submodules when necessary Conflicts: builtin/fetch.c submodule.c
2011-04-03Merge branch 'jc/index-update-if-able' into maintLibravatar Junio C Hamano2-13/+3
* jc/index-update-if-able: update $GIT_INDEX_FILE when there are racily clean entries diff/status: refactor opportunistic index update
2011-04-03Merge branch 'lt/default-abbrev' into maintLibravatar Junio C Hamano1-1/+5
* lt/default-abbrev: Rename core.abbrevlength back to core.abbrev Make the default abbrev length configurable
2011-04-03Merge branch 'mm/maint-log-n-with-diff-filtering' into maintLibravatar Junio C Hamano1-1/+7
* mm/maint-log-n-with-diff-filtering: log: fix --max-count when used together with -S or -G
2011-04-03Merge branch 'lp/config-vername-check' into maintLibravatar Junio C Hamano1-7/+20
* lp/config-vername-check: Disallow empty section and variable names Sanity-check config variable names
2011-04-03sparse: Fix errors and silence warningsLibravatar Stephen Boyd3-5/+5
* load_file() returns a void pointer but is using 0 for the return value * builtin/receive-pack.c forgot to include builtin.h * packet_trace_prefix can be marked static * ll_merge takes a pointer for its last argument, not an int * crc32 expects a pointer as the second argument but Z_NULL is defined to be 0 (see 38f4d13 sparse fix: Using plain integer as NULL pointer, 2006-11-18 for more info) Signed-off-by: Stephen Boyd <bebarino@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-04-01Merge branch 'nd/init-gitdir'Libravatar Junio C Hamano2-4/+72
* nd/init-gitdir: init, clone: support --separate-git-dir for .git file git-init.txt: move description section up Conflicts: builtin/clone.c
2011-04-01Merge branch 'jc/merge-sans-branch'Libravatar Junio C Hamano1-2/+40
* jc/merge-sans-branch: merge: merge with the default upstream branch without argument merge: match the help text with the documentation Conflicts: builtin/merge.c
2011-04-01Merge branch 'jr/grep-en-config'Libravatar Junio C Hamano1-0/+13
* jr/grep-en-config: grep: allow -E and -n to be turned on by default via configuration
2011-04-01Merge branch 'ab/i18n-st'Libravatar Junio C Hamano24-661/+694
* ab/i18n-st: (69 commits) i18n: git-shortlog basic messages i18n: git-revert split up "could not revert/apply" message i18n: git-revert literal "me" messages i18n: git-revert "Your local changes" message i18n: git-revert basic messages i18n: git-notes GIT_NOTES_REWRITE_MODE error message i18n: git-notes basic commands i18n: git-gc "Auto packing the repository" message i18n: git-gc basic messages i18n: git-describe basic messages i18n: git-clean clean.requireForce messages i18n: git-clean basic messages i18n: git-bundle basic messages i18n: git-archive basic messages i18n: git-status "renamed: " message i18n: git-status "Initial commit" message i18n: git-status "Changes to be committed" message i18n: git-status shortstatus messages i18n: git-status "nothing to commit" messages i18n: git-status basic messages ... Conflicts: builtin/branch.c builtin/checkout.c builtin/clone.c builtin/commit.c builtin/grep.c builtin/merge.c builtin/push.c builtin/revert.c t/t3507-cherry-pick-conflict.sh t/t7607-merge-overwrite.sh
2011-04-01Merge branch 'jk/pull-into-empty'Libravatar Junio C Hamano1-1/+1
* jk/pull-into-empty: pull: do not clobber untracked files on initial pull merge: merge unborn index before setting ref
2011-04-01Merge branch 'jc/maint-apply-report-offset' into maintLibravatar Junio C Hamano1-2/+14
* jc/maint-apply-report-offset: apply -v: show offset count when patch did not apply exactly
2011-04-01Merge branch 'jc/maint-apply-no-double-patch' into maintLibravatar Junio C Hamano1-1/+6
* jc/maint-apply-no-double-patch: apply: do not patch lines that were already patched