summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2010-12-10Makefile: transport-helper uses thread-utils.hJonathan Nieder
transport-helper.o gained a dependency on thread-utils.h in 7851b1e (remote-fd/ext: finishing touches after code review, 2010-11-17). Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-12-10Add --force to git-send-email documentationAlejandro R. Sedeño
Signed-off-by: Alejandro R. Sedeño <asedeno@mit.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-12-10Merge git://git.bogomips.org/git-svnJunio C Hamano
* git://git.bogomips.org/git-svn: t9143: do not fail when unhandled.log.gz is not created git-svn: allow the mergeinfo property to be set
2010-12-09Documentation/git.txt: update list of maintenance releasesJunio C Hamano
Recently we have made 1.7.3.3, 1.7.2.4, 1.7.1.3 and 1.7.0.8. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-12-09t9143: do not fail when unhandled.log.gz is not createdTorsten Bögershausen
Do not depend on internal implementation details of svn, which right now uses perl to create a .gz file. So this test case will even work in the future, when svn changes its implementation. Signed-off-by: Torsten Bögershausen <tboegi@web.de> Acked-by: Eric Wong <normalperson@yhbt.net>
2010-12-09git-svn: allow the mergeinfo property to be setSteven Walter
As a first step towards preserving merges across dcommit, we need a mechanism to update the svn:mergeinfo property. [ew: fixed bashism and style issues in test case] Signed-off-by: Steven Walter <stevenrwalter@gmail.com> Acked-by: Eric Wong <normalperson@yhbt.net>
2010-12-09Merge branch 'maint'Junio C Hamano
* maint: contrib/hooks/post-receive-email: fix return values from prep_for_email
2010-12-09Merge branch 'jn/ignore-doc' into maintJunio C Hamano
* jn/ignore-doc: Documentation: point to related commands from gitignore Documentation: split gitignore page into sections
2010-12-09Merge branch 'jn/cherry-pick-refresh-index' into maintJunio C Hamano
* jn/cherry-pick-refresh-index: cherry-pick/revert: transparently refresh index
2010-12-09Merge branch 'jl/add-p-reverse-message' into maintJunio C Hamano
* jl/add-p-reverse-message: Correct help blurb in checkout -p and friends
2010-12-09Merge branch 'np/diff-in-corrupt-repository' into maintJunio C Hamano
* np/diff-in-corrupt-repository: diff: don't presume empty file when corresponding object is missing
2010-12-09Merge branch 'fc/apply-p2-get-header-name' into maintJunio C Hamano
* fc/apply-p2-get-header-name: test: git-apply -p2 rename/chmod only Fix git-apply with -p greater than 1
2010-12-09Merge branch 'np/pack-broken-boundary' into maintJunio C Hamano
* np/pack-broken-boundary: make pack-objects a bit more resilient to repo corruption
2010-12-09Merge branch 'ak/apply-non-git-epoch' into maintJunio C Hamano
* ak/apply-non-git-epoch: apply: handle patches with funny filename and colon in timezone apply: Recognize epoch timestamps with : in the timezone
2010-12-09Merge branch 'cm/diff-check-at-eol' into maintJunio C Hamano
* cm/diff-check-at-eol: diff --check: correct line numbers of new blank lines at EOF
2010-12-09Merge branch 'tc/smart-http-post-redirect' into maintJunio C Hamano
* tc/smart-http-post-redirect: smart-http: Don't change POST to GET when following redirect
2010-12-09Merge branch 'ab/require-perl-5.8' into maintJunio C Hamano
* ab/require-perl-5.8: perl: use "use warnings" instead of -w perl: bump the required Perl version to 5.8 from 5.6.[21]
2010-12-09contrib/hooks/post-receive-email: fix return values from prep_for_emailAlan Raison
The function was returning 0 for failure and 1 for success which was breaking the logic in the main loop. It now also returns in all cases, rather than exiting. Signed-off-by: Alan Raison <alan@theraisons.me.uk> Acked-by: Kevin P. Fleming <kpfleming@digium.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-12-08Do not link with -lcrypto under NO_OPENSSLJunio C Hamano
With 401857c (imap-send: link against libcrypto for HMAC and others, 2010-11-24) we started linking imap-send unconditionally with -lcrypto by mistake; disable this when we are building under NO_OPENSSL. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-12-08Merge branch 'nd/maint-fix-add-typo-detection' (early part)Junio C Hamano
* 'nd/maint-fix-add-typo-detection' (early part): add: do not rely on dtype being NULL behavior
2010-12-08Merge branch 'jn/gitweb-time-hires-comes-with-5.8'Junio C Hamano
* jn/gitweb-time-hires-comes-with-5.8: gitweb: Time::HiRes is in core for Perl 5.8
2010-12-08Merge branch 'il/remote-fd-ext'Junio C Hamano
* il/remote-fd-ext: remote-fd/ext: finishing touches after code review git-remote-ext git-remote-fd Add bidirectional_transfer_loop() Conflicts: compat/mingw.h
2010-12-08Merge branch 'jk/pager-per-command'Junio C Hamano
* jk/pager-per-command: allow command-specific pagers in pager.<cmd>
2010-12-08Merge branch 'jk/maint-decorate-01-bool'Junio C Hamano
* jk/maint-decorate-01-bool: log.decorate: accept 0/1 bool values
2010-12-08Merge branch 'gc/http-with-non-ascii-username-url'Junio C Hamano
* gc/http-with-non-ascii-username-url: Fix username and password extraction from HTTP URLs t5550: test HTTP authentication and userinfo decoding Conflicts: t/lib-httpd/apache.conf
2010-12-08Merge branch 'ks/maint-getenv-fix'Junio C Hamano
* ks/maint-getenv-fix: setup: make sure git_dir path is in a permanent buffer, getenv(3) case
2010-12-08Merge branch 'gb/gitweb-remote-heads'Junio C Hamano
* gb/gitweb-remote-heads: git instaweb: enable remote_heads gitweb: group remote heads by remote gitweb: provide a routine to display (sub)sections gitweb: refactor repository URL printing gitweb: remotes view for a single remote gitweb: allow action specialization in page header gitweb: nagivation menu for tags, heads and remotes gitweb: separate heads and remotes lists gitweb: git_get_heads_list accepts an optional list of refs gitweb: introduce remote_heads feature gitweb: use fullname as hash_base in heads link
2010-12-08Merge branch 'mg/maint-tag-rfc1991'Junio C Hamano
* mg/maint-tag-rfc1991: tag: recognize rfc1991 signatures tag: factor out sig detection for tag display tag: factor out sig detection for body edits verify-tag: factor out signature detection t/t7004-tag: test handling of rfc1991 signatures
2010-12-08Merge branch 'jh/notes-merge'Junio C Hamano
* jh/notes-merge: (23 commits) Provide 'git merge --abort' as a synonym to 'git reset --merge' cmd_merge(): Parse options before checking MERGE_HEAD Provide 'git notes get-ref' to easily retrieve current notes ref git notes merge: Add testcases for merging notes trees at different fanouts git notes merge: Add another auto-resolving strategy: "cat_sort_uniq" git notes merge: --commit should fail if underlying notes ref has moved git notes merge: List conflicting notes in notes merge commit message git notes merge: Manual conflict resolution, part 2/2 git notes merge: Manual conflict resolution, part 1/2 Documentation: Preliminary docs on 'git notes merge' git notes merge: Add automatic conflict resolvers (ours, theirs, union) git notes merge: Handle real, non-conflicting notes merges builtin/notes.c: Refactor creation of notes commits. git notes merge: Initial implementation handling trivial merges only builtin/notes.c: Split notes ref DWIMmery into a separate function notes.c: Use two newlines (instead of one) when concatenating notes (trivial) t3303: Indent with tabs instead of spaces for consistency notes.h/c: Propagate combine_notes_fn return value to add_note() and beyond notes.h/c: Allow combine_notes functions to remove notes notes.c: Reorder functions in preparation for next commit ... Conflicts: builtin.h
2010-12-08Merge branch 'jk/diff-CBM'Junio C Hamano
* jk/diff-CBM: diff: report bogus input to -C/-M/-B
2010-12-08Merge branch 'maint'Junio C Hamano
* maint: git-rm.txt: Fix quoting
2010-12-07update-index: migrate to parse-options APIJonathan Nieder
--refresh and --really-refresh accept flags (like -q) and modify an error indicator. It might make sense to make the error indicator global, but just pass the flags and a pointer to the error indicator in a struct instead. --cacheinfo wants 3 arguments. Use the OPTION_LOWLEVEL_CALLBACK extension to grab them and PARSE_OPT_NOARG to disallow the "sticked" --cacheinfo=foo form. (The resulting message $ git update-index --cacheinfo=foo error: option `cacheinfo' takes no value is unfortunately incorrect.) --assume-unchanged and --no-assume-unchanged probably should use the OPT_UYN feature; but use a callback for now so the existing MARK_FLAG and UNMARK_FLAG values can be used. --stdin and --index-info are still constrained to be the last argument (implemented using the OPTION_LOWLEVEL_CALLBACK extension). --unresolve and --again consume all arguments that come after them (also using OPTION_LOWLEVEL_CALLBACK). The order of options matters. Each path on the command line is affected only by the options that come before it. A custom argument-parsing loop with parse_options_step() brings that about. In exchange for all the fuss, we get the usual perks: support for un-sticked options, better usage error messages, more useful -h output, and argument parsing code that should be easier to tweak in the future. Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-12-07setup: save prefix (original cwd relative to toplevel) in startup_infoNguyễn Thái Ngọc Duy
Save the path from the original cwd to the cwd at the end of the setup procedure in the startup_info struct introduced in e37c1329 (2010-08-05). The value cannot vary from thread to thread anyway, since the cwd is global. So now in your builtin command, instead of passing prefix around, when you want to convert a user-supplied path to a cwd-relative path, you can use startup_info->prefix directly. Caveat: As with the return value from setup_git_directory_gently(), startup_info->prefix would be NULL when the original cwd is not a subdir of the toplevel. Longer term, this would allow the prefix to be reused when several noncooperating functions require access to the same repository (for example, when accessing configuration before running a builtin). Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-12-07parse-options: make resuming easier after PARSE_OPT_STOP_AT_NON_OPTIONJonathan Nieder
Introduce a PARSE_OPT_NON_OPTION state, so parse_option_step() callers can easily distinguish between non-options and other reasons for option parsing termination (like "--"). Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-12-07parse-options: allow git commands to invent new option typesJonathan Nieder
parse-options provides a variety of option behaviors, including OPTION_CALLBACK, which should take care of just about any sane behavior. All supported behaviors obey the following constraint: A --foo option can only accept (and base its behavior on) one argument, which would be the following command-line argument in the "unsticked" form. Alas, some existing git commands have options that do not obey that constraint. For example, update-index --cacheinfo takes three arguments, and update-index --resolve takes all later parameters as arguments. Introduces an OPTION_LOWLEVEL_CALLBACK backdoor to parse-options so such option types can be supported without tempting inventors of other commands through mention in the public API. Commands can set the callback field to a function accepting three arguments: the option parsing context, the option itself, and a flag indicating whether the the option was negated. When the option is encountered, that function is called to take over from get_value(). The return value should be zero for success, -1 for usage errors. Thanks to Stephen Boyd for API guidance. Improved-by: Stephen Boyd <bebarino@gmail.com> Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-12-07parse-options: never suppress arghelp if LITERAL_ARGHELP is setJonathan Nieder
The PARSE_OPT_LITERAL_ARGHELP flag allows a program to override the standard "<argument> for mandatory, [argument] for optional" markup in its help message. Extend it to override the usual "no text for disallowed", too (for the PARSE_OPT_NOARG | PARSE_OPT_LITERAL_ARGHELP case, which was previously meaningless), to be more intuitive. The motivation is to allow update-index to correctly advertise --cacheinfo <mode> <object> <path> add the specified entry to the index while abusing PARSE_OPT_NOARG to disallow the "sticked form" --cacheinfo=<mode> <object> <path> Noticed-by: Stephen Boyd <bebarino@gmail.com> Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-12-07parse-options: do not infer PARSE_OPT_NOARG from option typeStephen Boyd
Simplify the "takes no value" error path by relying on PARSE_OPT_NOARG being set correctly. That is: - if the PARSE_OPT_NOARG flag is set, reject --opt=value regardless of the option type; - if the PARSE_OPT_NOARG flag is unset, accept --opt=value regardless of the option type. This way, the accepted usage more closely matches the usage advertised with --help-all. No functional change intended, since the NOARG flag is only used with "boolean-only" option types in existing parse_options callers. Signed-off-by: Stephen Boyd <bebarino@gmail.com> Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-12-07parse-options: sanity check PARSE_OPT_NOARG flagJonathan Nieder
Some option types cannot use an argument --- boolean options that would set a bit or flag or increment a counter, for example. If configured in the flag word to accept an argument anyway, the result is an argument that is advertised in "program -h" output only to be rejected by parse-options::get_value. Luckily all current users of these option types use PARSE_OPT_NOARG and do not use PARSE_OPT_OPTARG. Add a check to ensure that that remains true. The check is run once for each invocation of parse_option_start(). Improved-by: Stephen Boyd <bebarino@gmail.com> Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-12-07parse-options: move NODASH sanity checks to parse_options_checkJonathan Nieder
A dashless switch (like '(' passed to 'git grep') cannot be negated, cannot be attached to an argument, and cannot have a long form. Currently parse-options runs the related sanity checks when the dashless option is used; better to always check them at the start of option parsing, so mistakes can be caught more quickly. The error message at the new call site is less specific about the nature of the error, for simplicity. On the other hand, it prints which switch was problematic. Before: fatal: BUG: dashless options can't be long After: error: BUG: switch '(' uses feature not supported for dashless options Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-12-07parse-options: clearer reporting of API misuseJonathan Nieder
The PARSE_OPT_LASTARG_DEFAULT flag is meant for options like --contains that (1) traditionally had a mandatory argument and (2) have some better behavior to use when appearing in the final position. It makes no sense to combine this with OPTARG, so ever since v1.6.4-rc0~71 (parse-options: add parse_options_check to validate option specs, 2009-07-09) this mistake is flagged with error: `--option` uses incompatible flags LASTARG_DEFAULT and OPTARG and an exit status representing an error in commandline usage. Unfortunately that which might confuse scripters calling such an erroneous program into thinking the _script_ contains an error. Clarify that it is an internal error by dying with a message beginning "error: BUG: ..." and status 128. While at it, clean up parse_options_check to prepare for more checks. Long term, it would be nicer to make such checks happen at compile time. Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-12-07git-rm.txt: Fix quotingMichael J Gruber
Literal " produces typographically incorrect quotations, but "works" in most circumstances. In the subheadings of git-rm.txt, it "works" for the html backend but not for the docbook conversion to nroff: double "" and spurious double spaces appear in the output. Replace "incorrect" quotations by ``correct'' ones, and fix other "quotations" which are really `code fragments`. This should make git-rm.txt "-clean. Reported-by: Jeff King <peff@peff.net> Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net> Helped-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-12-07Makefile: dependencies for vcs-svn testsJonathan Nieder
The vcs-svn tests (test-treap.o et al) depend on the vcs-svn headers for declarations and inline functions. Declare the dependency. While at it, declare a dependency of the vcs-svn objects (vcs-svn/string_pool.o et al) on $(LIB_H) to reflect use within the vcs-svn library of git-compat-util.h and cache.h. Without this change, tweaks to inline functions in those headers do not provoke rebuilds of the corresponding tests[*], making such changes unnecessarily difficult to test. Before: $ touch vcs-svn/*.h && make test-treap $ After: $ touch vcs-svn/*.h && make test-treap CC test-treap.o LINK test-treap $ [*] unless COMPUTE_HEADER_DEPENDENCIES is enabled Detected with "make CHECK_HEADER_DEPENDENCIES=1". Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-12-07parse-remote: handle detached HEADSanti Béjar
get_remote_merge_branch with zero or one arguments returns the upstream branch. But a detached HEAD does no have an upstream branch, as it is not tracking anything. Handle this case testing the exit code of "git symbolic-ref -q HEAD". Reported-by: Sverre Rabbelier <srabbelier@gmail.com> Signed-off-by: Santi Béjar <santi@agolina.net> Tested-by: Sverre Rabbelier <srabbelier@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-12-07parse-options: Don't call parse_options_check() so muchStephen Boyd
parse_options_check() is being called for each invocation of parse_options_step which can be quite a bit for some commands. The commit introducing this function cb9d398 (parse-options: add parse_options_check to validate option specs., 2009-06-09) had the correct motivation and explicitly states that parse_options_check() should be called from parse_options_start(). However, the implementation differs from the motivation. Fix it. Signed-off-by: Stephen Boyd <bebarino@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-12-05help: always suggest common-cmds if prefix of cmdErik Faye-Lund
If someone runs "git st", the command "git status" is not suggested because it's not one of the closest levenshtein-neighbour. Reserve the distance of 0 for common commands where the entered command is a prefixe, as these are often more likely to be what the user meant. This way, "git status" is the first suggestion, while a list of possible typos are still suggested as well. Signed-off-by: Erik Faye-Lund <kusmabite@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-12-04Merge branch 'jn/ignore-doc'Junio C Hamano
* jn/ignore-doc: Documentation: point to related commands from gitignore Documentation: split gitignore page into sections
2010-12-04Merge branch 'kb/maint-status-cquote'Junio C Hamano
* kb/maint-status-cquote: status: Quote paths with spaces in short format
2010-12-04Merge branch 'jn/thinner-wrapper'Junio C Hamano
* jn/thinner-wrapper: Remove pack file handling dependency from wrapper.o pack-objects: mark file-local variable static wrapper: give zlib wrappers their own translation unit strbuf: move strbuf_branchname to sha1_name.c path helpers: move git_mkstemp* to wrapper.c wrapper: move odb_* to environment.c wrapper: move xmmap() to sha1_file.c
2010-12-04Merge branch 'pn/commit-autosquash'Junio C Hamano
* pn/commit-autosquash: add tests of commit --squash commit: --squash option for use with rebase --autosquash add tests of commit --fixup commit: --fixup option for use with rebase --autosquash pretty.c: teach format_commit_message() to reencode the output commit: helper methods to reduce redundant blocks of code Conflicts: Documentation/git-commit.txt t/t3415-rebase-autosquash.sh
2010-12-04Merge branch 'sn/diff-doc'Junio C Hamano
* sn/diff-doc: docs: clarify git diff modes of operation diff,difftool: Don't use the {0,2} notation in usage strings CodingGuidelines: Add a section on writing documentation