summaryrefslogtreecommitdiff
path: root/builtin
AgeCommit message (Collapse)Author
2011-05-04Merge branch 'mg/rev-list-count-cherry'Junio C Hamano
* mg/rev-list-count-cherry: rev-list --count: separate count for --cherry-mark
2011-05-04Merge branch 'vr/merge-base-doc'Junio C Hamano
* vr/merge-base-doc: Restructure documentation for git-merge-base. Documentation: update to git-merge-base --octopus
2011-05-04Merge branch 'jc/pack-objects-bigfile' into maintJunio C Hamano
* jc/pack-objects-bigfile: Teach core.bigfilethreashold to pack-objects
2011-05-04Merge branch 'mg/reflog-with-options' into maintJunio C Hamano
* 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-05-02Merge branch 'jk/notes-ui-updates'Junio C Hamano
* 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'Junio C Hamano
* 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'Junio C Hamano
* jh/notes-add-ui: Make "git notes add" more user-friendly when there are existing notes Conflicts: builtin/notes.c
2011-04-29"add -p": work-around an old laziness that does not coalesce hunksJunio C Hamano
Since 0beee4c (git-add--interactive: remove hunk coalescing, 2008-07-02), "git add--interactive" behaves lazily and passes overlapping hunks to the underlying "git apply" without coalescing. This was partially corrected by 7a26e65 (its partial revert, 2009-05-16), but overlapping hunks are still passed when the patch is edited. Teach "git apply" the --allow-overlap option that disables a safety feature that avoids misapplication of patches by not applying patches to overlapping hunks, and pass this option form "add -p" codepath. Do not even advertise the option, as this is merely a workaround, and the correct fix is to make "add -p" correctly coalesce adjacent patch hunks. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-04-29blame: tolerate bogus e-mail addresses a bit betterJosh Stone
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'Junio C Hamano
* 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'Junio C Hamano
* 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'Junio C Hamano
* jc/merge-dash-previous: merge: allow "-" as a short-hand for "previous branch"
2011-04-27Merge branch 'rj/sparse'Junio C Hamano
* 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'Junio C Hamano
* nk/blame-abbrev: blame: add --abbrev command line option and make it honor core.abbrev
2011-04-27Merge branch 'jc/pack-objects-bigfile'Junio C Hamano
* jc/pack-objects-bigfile: Teach core.bigfilethreashold to pack-objects
2011-04-27Merge branch 'dm/color-palette'Junio C Hamano
* dm/color-palette: Share color list between graph and show-branch
2011-04-27Merge branch 'mg/reflog-with-options'Junio C Hamano
* 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-markMichael J Gruber
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-24Fix "add -u" that sometimes fails to resolve unmerged pathsJunio C Hamano
"git add -u" updates the index with the updated contents from the working tree by internally running "diff-files" to grab the set of paths that are different from the index. Then it updates the index entries for the paths that are modified in the working tree, and deletes the index entries for the paths that are deleted in the working tree. It ignored the output from the diff-files that indicated that a path is unmerged. For these paths, it instead relied on the fact that an unmerged path is followed by the result of comparison between stage #2 (ours) and the working tree, and used that to update or delete such a path when it is used to record the resolution of a conflict. As the result, when a path did not have stage #2 (e.g. "we deleted while the other side added"), these unmerged stages were left behind, instead of recording what the user resolved in the working tree. Since we recently fixed "diff-files" to indicate if the corresponding path exists on the working tree for an unmerged path, we do not have to rely on the comparison with stage #2 anymore. We can instead tell the diff-files not to compare with higher stages, and use the unmerged output to update the index to reflect the state of the working tree. The changes to the test vector in t2200 illustrates the nature of the bug and the fix. The test expected stage #1 and #3 entries be left behind, but it was codifying the buggy behaviour. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-04-15Documentation: update to git-merge-base --octopusVincent van Ravesteijn
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-14log: convert to parse-optionsCarlos Martín Nieto
Use parse-options in cmd_log_init instead of manually iterating through them. This makes the code a bit cleaner but more importantly allows us to catch the "--quiet" option which causes some of the log-related commands to misbehave as it would otherwise get passed on to the diff. Signed-off-by: Carlos Martín Nieto <cmn@elego.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-04-13revert: Hide '-r' option in default usageRamkumar Ramachandra
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 flagCarlos Martín Nieto
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 translationÆvar Arnfjörð Bjarmason
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 translationÆvar Arnfjörð Bjarmason
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 translationÆvar Arnfjörð Bjarmason
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 translationÆvar Arnfjörð Bjarmason
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 translationÆvar Arnfjörð Bjarmason
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 translationÆvar Arnfjörð Bjarmason
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 translationÆvar Arnfjörð Bjarmason
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" warningRamsay Jones
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" warningRamsay Jones
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" warningRamsay Jones
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"Junio C Hamano
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'Junio C Hamano
* 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-06Teach core.bigfilethreashold to pack-objectsJunio C Hamano
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-06blame: add --abbrev command line option and make it honor core.abbrevNamhyung Kim
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_wildcardJunio C Hamano
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-05Share color list between graph and show-branchDan McGee
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'Junio C Hamano
* 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 maintJunio C Hamano
* 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 maintJunio C Hamano
* 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 maintJunio C Hamano
* 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 maintJunio C Hamano
* lp/config-vername-check: Disallow empty section and variable names Sanity-check config variable names
2011-04-03sparse: Fix errors and silence warningsStephen Boyd
* 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-02Merge branch 'nd/init-gitdir'Junio C Hamano
* 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-02Merge branch 'jc/merge-sans-branch'Junio C Hamano
* 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-02Merge branch 'jr/grep-en-config'Junio C Hamano
* jr/grep-en-config: grep: allow -E and -n to be turned on by default via configuration
2011-04-02Merge branch 'ab/i18n-st'Junio C Hamano
* 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-02Merge branch 'jk/pull-into-empty'Junio C Hamano
* jk/pull-into-empty: pull: do not clobber untracked files on initial pull merge: merge unborn index before setting ref