summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2011-10-13Merge branch 'jc/apply-blank-at-eof-fix'Libravatar Junio C Hamano1-2/+9
* jc/apply-blank-at-eof-fix: apply --whitespace=error: correctly report new blank lines at end
2011-10-13Merge branch 'di/fast-import-empty-tag-note-fix'Libravatar Junio C Hamano2-0/+33
* di/fast-import-empty-tag-note-fix: fast-import: don't allow to note on empty branch fast-import: don't allow to tag empty branch
2011-10-13Merge branch 'nd/maint-autofix-tag-in-head'Libravatar Junio C Hamano7-65/+93
* nd/maint-autofix-tag-in-head: Accept tags in HEAD or MERGE_HEAD merge: remove global variable head[] merge: use return value of resolve_ref() to determine if HEAD is invalid merge: keep stash[] a local variable Conflicts: builtin/merge.c
2011-10-13Merge branch 'bw/grep-no-index-no-exclude'Libravatar Junio C Hamano2-4/+4
* bw/grep-no-index-no-exclude: grep --no-index: don't use git standard exclusions grep: do not use --index in the short usage output
2011-10-13Merge branch 'nd/maint-sparse-errors'Libravatar Junio C Hamano2-4/+32
* nd/maint-sparse-errors: Add explanation why we do not allow to sparse checkout to empty working tree sparse checkout: show error messages when worktree shaping fails
2011-10-12Update draft release notes to 1.7.8Libravatar Junio C Hamano1-1/+12
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-10-12Merge branch 'cb/do-not-pretend-to-hijack-long-help'Libravatar Junio C Hamano6-7/+6
* cb/do-not-pretend-to-hijack-long-help: use -h for synopsis and --help for manpage consistently
2011-10-12Merge branch 'sp/smart-http-failure'Libravatar Junio C Hamano1-1/+8
* sp/smart-http-failure: remote-curl: Fix warning after HTTP failure
2011-10-12Merge branch 'nd/document-err-packet'Libravatar Junio C Hamano1-0/+7
* nd/document-err-packet: pack-protocol: document "ERR" line
2011-10-12Merge branch 'jc/parse-options-boolean'Libravatar Junio C Hamano10-22/+53
* jc/parse-options-boolean: apply: use OPT_NOOP_NOARG revert: use OPT_NOOP_NOARG parseopt: add OPT_NOOP_NOARG archive.c: use OPT_BOOL() parse-options: deprecate OPT_BOOLEAN Conflicts: builtin/revert.c
2011-10-12Merge branch 'rs/test-ctype'Libravatar Junio C Hamano1-58/+22
* rs/test-ctype: test-ctype: add test for is_pathspec_magic test-ctype: macrofy
2011-10-12Merge branch 'rs/name-rev-usage'Libravatar Junio C Hamano1-1/+3
* rs/name-rev-usage: name-rev: split usage string
2011-10-12Merge branch 'cs/perl-config-path-send-email'Libravatar Junio C Hamano2-1/+41
* cs/perl-config-path-send-email: use new Git::config_path() for aliasesfile Add Git::config_path()
2011-10-12Merge branch 'zj/send-email-authen-sasl'Libravatar Junio C Hamano1-0/+6
* zj/send-email-authen-sasl: send-email: auth plain/login fix
2011-10-12t5403: convert leading spaces to tabsLibravatar Nguyễn Thái Ngọc Duy1-23/+23
The first and last tests use tabs. The rest uses spaces. Convert all to tabs. Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-10-10Update draft release notes to 1.7.8Libravatar Junio C Hamano1-6/+44
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-10-10Merge branch 'dm/tree-walk'Libravatar Junio C Hamano1-4/+4
* dm/tree-walk: tree-walk: micro-optimization in tree_entry_interesting tree-walk: drop unused parameter from match_dir_prefix
2011-10-10Merge branch 'ps/gitweb-js-with-lineno'Libravatar Junio C Hamano1-4/+4
* ps/gitweb-js-with-lineno: gitweb: Fix links to lines in blobs when javascript-actions are enabled
2011-10-10Merge branch 'mh/maint-notes-merge-pathbuf-fix'Libravatar Junio C Hamano1-1/+2
* mh/maint-notes-merge-pathbuf-fix: notes_merge_commit(): do not pass temporary buffer to other function
2011-10-10Merge branch 'nd/sparse-doc'Libravatar Junio C Hamano1-2/+2
* nd/sparse-doc: git-read-tree.txt: update sparse checkout examples
2011-10-10Merge branch 'jp/get-ref-dir-unsorted'Libravatar Junio C Hamano2-201/+154
* jp/get-ref-dir-unsorted: refs.c: free duplicate entries in the ref array instead of leaking them refs.c: abort ref search if ref array is empty refs.c: ensure struct whose member may be passed to realloc is initialized refs: Use binary search to lookup refs faster Don't sort ref_list too early Conflicts: refs.c
2011-10-10Merge branch 'mh/check-ref-format-3'Libravatar Junio C Hamano24-225/+426
* mh/check-ref-format-3: (23 commits) add_ref(): verify that the refname is formatted correctly resolve_ref(): expand documentation resolve_ref(): also treat a too-long SHA1 as invalid resolve_ref(): emit warnings for improperly-formatted references resolve_ref(): verify that the input refname has the right format remote: avoid passing NULL to read_ref() remote: use xstrdup() instead of strdup() resolve_ref(): do not follow incorrectly-formatted symbolic refs resolve_ref(): extract a function get_packed_ref() resolve_ref(): turn buffer into a proper string as soon as possible resolve_ref(): only follow a symlink that contains a valid, normalized refname resolve_ref(): use prefixcmp() resolve_ref(): explicitly fail if a symlink is not readable Change check_refname_format() to reject unnormalized refnames Inline function refname_format_print() Make collapse_slashes() allocate memory for its result Do not allow ".lock" at the end of any refname component Refactor check_refname_format() Change check_ref_format() to take a flags argument Change bad_ref_char() to return a boolean value ...
2011-10-10Merge branch 'mh/iterate-refs'Libravatar Junio C Hamano1-32/+74
* mh/iterate-refs: refs.c: make create_cached_refs() static Retain caches of submodule refs Store the submodule name in struct cached_refs Allocate cached_refs objects dynamically Change the signature of read_packed_refs() Access reference caches only through new function get_cached_refs() Extract a function clear_cached_refs()
2011-10-10Merge branch 'jm/mergetool-pathspec'Libravatar Junio C Hamano3-70/+71
* jm/mergetool-pathspec: mergetool: no longer need to save standard input mergetool: Use args as pathspec to unmerged files
2011-10-10Merge branch 'jc/maint-diffstat-numstat-context'Libravatar Junio C Hamano1-0/+2
* jc/maint-diffstat-numstat-context: diff: teach --stat/--numstat to honor -U$num
2011-10-10Merge branch 'mz/remote-rename'Libravatar Junio C Hamano2-7/+52
* mz/remote-rename: remote: only update remote-tracking branch if updating refspec remote rename: warn when refspec was not updated remote: "rename o foo" should not rename ref "origin/bar" remote: write correct fetch spec when renaming remote 'remote'
2011-10-10Merge branch 'cb/common-prefix-unification'Libravatar Junio C Hamano6-64/+40
* cb/common-prefix-unification: rename pathspec_prefix() to common_prefix() and move to dir.[ch] consolidate pathspec_prefix and common_prefix remove prefix argument from pathspec_prefix
2011-10-10Merge branch 'jn/maint-http-error-message'Libravatar Junio C Hamano1-2/+7
* jn/maint-http-error-message: http: avoid empty error messages for some curl errors http: remove extra newline in error message
2011-10-10Merge branch 'hv/submodule-update-none'Libravatar Junio C Hamano2-1/+69
* hv/submodule-update-none: add update 'none' flag to disable update of submodule by default submodule: move update configuration variable further up
2011-10-10Merge branch 'fg/submodule-git-file-git-dir'Libravatar Junio C Hamano10-67/+244
* fg/submodule-git-file-git-dir: Move git-dir for submodules rev-parse: add option --resolve-git-dir <path> Conflicts: cache.h git-submodule.sh
2011-10-10refs.c: free duplicate entries in the ref array instead of leaking themLibravatar Brandon Casey1-0/+1
Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-10-10refs.c: abort ref search if ref array is emptyLibravatar Brandon Casey1-0/+3
The bsearch() implementation on IRIX 6.5 segfaults if it is passed NULL for the base array argument even if number-of-elements is zero. So, let's work around it by detecting an empty array and aborting early. This is a useful optimization in its own right anyway, since we avoid a useless allocation and initialization of the ref_entry when the ref array is empty. Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-10-10refs.c: ensure struct whose member may be passed to realloc is initializedLibravatar Brandon Casey1-0/+1
The variable "refs" is allocated on the stack but is not initialized. It is passed to read_packed_refs(), and its struct members may eventually be passed to add_ref() and ALLOC_GROW(). Since the structure has not been initialized, its members may contain random non-zero values. So let's initialize it. The call sequence looks something like this: resolve_gitlink_packed_ref(...) { struct cached_refs refs; ... read_packed_refs(f, &refs); ... } read_packed_refs(FILE*, struct cached_refs *cached_refs) { ... add_ref(name, sha1, flag, &cached_refs->packed, &last); ... } add_ref(..., struct ref_array *refs, struct ref_entry **) { ... ALLOC_GROW(refs->refs, refs->nr + 1, refs->alloc); } Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-10-09Fix some "variable might be used uninitialized" warningsLibravatar Ramsay Jones2-2/+2
In particular, gcc complains as follows: CC tree-walk.o tree-walk.c: In function `traverse_trees': tree-walk.c:347: warning: 'e' might be used uninitialized in this \ function CC builtin/revert.o builtin/revert.c: In function `verify_opt_mutually_compatible': builtin/revert.c:113: warning: 'opt2' might be used uninitialized in \ this function Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-10-09Makefile: fix permissions of mergetools/ checked out with permissive umaskLibravatar Junio C Hamano1-2/+1
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-10-09Makefile: fix permissions of mergetools/ checked out with permissive umaskLibravatar Jonathan Nieder1-2/+1
Ever since mergetool--lib was split into multiple files in v1.7.7-rc0~3^2~1 (2011-08-18), the Makefile takes care to reset umask and use tar --no-owner when installing merge tool definitions to $(gitexecdir)/mergetools/. Unfortunately it does not take into account the possibility that the permission bits of the files being copied might already be wrong. Rather than fixing the "tar" incantation and making it even more complicated, let's just use the "install" utility. This only means losing the ability to install executables and subdirectories of mergetools/, which wasn't used. Noticed by installing from a copy of git checked out with umask 002. Compare v1.6.0.3~81^2 (Fix permission bits on sources checked out with an overtight umask, 2008-08-21). Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-10-05add_ref(): verify that the refname is formatted correctlyLibravatar Michael Haggerty2-5/+19
In add_ref(), verify that the refname is formatted correctly before adding it to the ref_list. Here we have to allow refname components that start with ".", since (for example) the remote protocol uses synthetic reference name ".have". So add a new REFNAME_DOT_COMPONENT flag that can be passed to check_refname_format() to allow leading dots. Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-10-05resolve_ref(): expand documentationLibravatar Michael Haggerty2-13/+33
Record information about resolve_ref(), hard-won via reverse engineering, in a comment for future spelunkers. Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-10-05resolve_ref(): also treat a too-long SHA1 as invalidLibravatar Michael Haggerty1-1/+2
If the SHA1 in a reference file is not terminated by a space or end-of-file, consider it malformed and emit a warning. Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-10-05resolve_ref(): emit warnings for improperly-formatted referencesLibravatar Michael Haggerty1-2/+4
While resolving references, if a reference is found that is in an unrecognized format, emit a warning (and then fail, as before). Wouldn't *you* want to know? Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-10-05resolve_ref(): verify that the input refname has the right formatLibravatar Michael Haggerty1-0/+3
Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-10-05remote: avoid passing NULL to read_ref()Libravatar Michael Haggerty1-2/+4
read_ref() can (and in test t5800, actually *does*) return NULL. Don't pass the NULL along to read_ref(). Coincidentally, this mistake didn't make resolve_ref() blow up, but upcoming changes to resolve_ref() will make it less forgiving. Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-10-05remote: use xstrdup() instead of strdup()Libravatar Michael Haggerty2-3/+3
Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-10-05resolve_ref(): do not follow incorrectly-formatted symbolic refsLibravatar Michael Haggerty1-0/+5
Emit a warning and fail if a symbolic reference refers to an incorrectly-formatted refname. Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-10-05resolve_ref(): extract a function get_packed_ref()Libravatar Michael Haggerty1-13/+34
Making it a function and giving it a name makes the code clearer. I also have a strong suspicion that the function will find other uses in the future. Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-10-05resolve_ref(): turn buffer into a proper string as soon as possibleLibravatar Michael Haggerty1-10/+10
Immediately strip off trailing spaces and null-terminate the string holding the contents of the reference file; this allows the use of string functions and avoids the need to keep separate track of the string's length. (get_sha1_hex() fails automatically if the string is too short.) Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-10-05resolve_ref(): only follow a symlink that contains a valid, normalized refnameLibravatar Michael Haggerty1-1/+2
Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-10-05resolve_ref(): use prefixcmp()Libravatar Michael Haggerty1-2/+2
Terminate the link content string one step earlier, allowing prefixcmp() to be used instead of the less clear memcmp(). Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-10-05resolve_ref(): explicitly fail if a symlink is not readableLibravatar Michael Haggerty1-0/+2
Previously the failure came later, after a few steps in which the length was treated like the actual length of a string. Even though the old code gave the same answers, it was somewhat misleading. Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-10-05Change check_refname_format() to reject unnormalized refnamesLibravatar Michael Haggerty5-28/+49
Since much of the infrastructure does not work correctly with unnormalized refnames, change check_refname_format() to reject them. Similarly, change "git check-ref-format" to reject unnormalized refnames by default. But add an option --normalize, which causes "git check-ref-format" to normalize the refname before checking its format, and print the normalized refname. This is exactly the behavior of the old --print option, which is retained but deprecated. Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>