summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2011-11-21Merge branch 'maint'Libravatar Junio C Hamano1-1/+1
* maint: documentation fix: git difftool uses diff tools, not merge tools.
2011-11-21Merge branch 'rr/misc-fixes'Libravatar Junio C Hamano1-1/+1
* rr/misc-fixes: convert.c: Fix return type of git_path_check_eol()
2011-11-21convert.c: Fix return type of git_path_check_eol()Libravatar Ramsay Jones1-1/+1
The git_path_check_eol() function converts a string value to the corresponding 'enum eol' value. However, the function is currently declared to return an 'enum crlf_action', which causes sparse to complain thus: SP convert.c convert.c:736:50: warning: mixing different enum types convert.c:736:50: int enum crlf_action versus convert.c:736:50: int enum eol In order to suppress the warning, we simply correct the return type in the function declaration. Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-11-21documentation fix: git difftool uses diff tools, not merge tools.Libravatar Thomas Hochstein1-1/+1
Let the documentation for -t list valid *diff* tools, not valid *merge* tools. Signed-off-by: Thomas Hochstein <thh@inter.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-11-20config.c: Fix a static buffer overwrite bug by avoiding mkpath()Libravatar Ramsay Jones1-2/+2
On cygwin, test number 21 of t3200-branch.sh (git branch -m q q2 without config should succeed) fails. The failure involves the functions from path.c which parcel out internal static buffers from the git_path() and mkpath() functions. In particular, the rename_ref() function calls safe_create_leading\ _directories() with a filename returned by git_path("logs/%s", ref). safe_create_leading_directories(), in turn, calls stat() on each element of the path it is given. On cygwin, this leads to a call to git_config() for each component of the path, since this test explicitly removes the config file. git_config() calls mkpath(), so on the fourth component of the path, the original buffer passed into the function is overwritten with the config filename. Note that this bug is specific to cygwin and it's schizophrenic stat() functions (see commits adbc0b6, 7faee6b and 7974843). The lack of a config file and a path with at least four elements is also important to trigger the bug. In order to fix the problem, we replace the call to mkpath() with a call to mksnpath() and provide our own buffer. Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-11-20t5501-*.sh: Fix url passed to clone in setup testLibravatar Ramsay Jones1-1/+1
In particular, the url passed to git-clone has an extra '/' given after the 'file://' schema prefix, thus: git clone --reference=original "file:///$(pwd)/original one Once the prefix is removed, the remainder of the url looks something like "//home/ramsay/git/t/...", which is then interpreted as an network path. This then results in a "Permission denied" error, like so: ramsay $ ls //home ls: cannot access //home: No such host or network path ramsay $ ls //home/ramsay ls: cannot access //home/ramsay: Permission denied ramsay $ In order to fix the problem, we simply remove the extraneous '/' character from the url. Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-11-18Hopefully final update of release notes before 1.7.8 finalLibravatar Junio C Hamano1-1/+1
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-11-18Merge branch 'rr/misc-fixes'Libravatar Junio C Hamano4-13/+5
* rr/misc-fixes: git-compat-util: don't assume value for undefined variable sha1_file: don't mix enum with int convert: don't mix enum with int http: remove unused function hex()
2011-11-18Makefile: add option to disable automatic dependency generationLibravatar Jonathan Nieder1-7/+24
Now that the COMPUTE_HEADER_DEPENDENCIES feature is turned on automatically for compilers that support it (see v1.7.8-rc0~142^2~1, 2011-08-18), there is no easy way to force it off. For example, setting COMPUTE_HEADER_DEPENDENCIES to the empty string in config.mak just tells the makefile to treat it as undefined and run a test command to see if the -MMD option is supported. So allow setting COMPUTE_HEADER_DEPENDENCIES=no to explicitly force the feature off. The new semantics: - "yes" means to explicitly enable the feature - "no" means to disable it - "auto" means to autodetect The default is still "auto". Any value other than these three will cause the build to error out with a descriptive message so typos and stale settings in config.mak don't result in mysterious behavior. Makefile:1278: *** please set COMPUTE_HEADER_DEPENDENCIES to yes, no, or auto (not "1"). Stop. So now when someone using a compiler without -MMD support reports trouble building git, you can reproduce it by running "make COMPUTE_HEADER_DEPENDENCIES=no". Suggested-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Improved-by: Junio C Hamano <gitster@pobox.com> Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Tested-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-11-18Sync with 1.7.7.4Libravatar Junio C Hamano5-49/+81
2011-11-18Git 1.7.7.4Libravatar Junio C Hamano3-2/+16
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-11-18Merge branch 'jc/maint-name-rev-all' into maintLibravatar Junio C Hamano1-1/+1
* jc/maint-name-rev-all: name-rev --all: do not even attempt to describe non-commit object
2011-11-18Merge branch 'ml/mailmap' into maintLibravatar Junio C Hamano1-3/+2
* ml/mailmap: mailmap: xcalloc mailmap_info Conflicts: mailmap.c
2011-11-18Merge branch 'jn/maint-notes-avoid-va-args' into maintLibravatar Junio C Hamano1-43/+61
* jn/maint-notes-avoid-va-args: notes merge: eliminate OUTPUT macro Conflicts: notes-merge.c
2011-11-18Makefile: add missing header file dependenciesLibravatar Jonathan Nieder1-2/+3
When the streaming filter API was introduced in v1.7.7-rc0~60^2~7 (2011-05-20), we forgot to add its header to LIB_H. Most translation units depend on streaming.h via cache.h. v1.7.5-rc0~48 (Fix sparse warnings, 2011-03-22) introduced undeclared dependencies by url.o on url.h and thread-utils.o on thread-utils.h. Noticed by make CHECK_HEADER_DEPENDENCIES=1. Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-11-17notes merge: eliminate OUTPUT macroLibravatar Jonathan Nieder1-43/+61
The macro is variadic, which breaks support for pre-C99 compilers, and it hides an "if", which can make code hard to understand on first reading if some arguments have side-effects. The OUTPUT macro seems to have been inspired by the "output" function from merge-recursive. But that function in merge-recursive exists to indent output based on the level of recursion and there is no similar justification for such a function in "notes merge". Noticed with 'make CC="gcc -std=c89 -pedantic"': notes-merge.c:24:22: warning: anonymous variadic macros were introduced in C99 [-Wvariadic-macros] Encouraged-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Acked-by: Johan Herland <johan@herland.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-11-17do not let git_path clobber errno when reporting errorsLibravatar Jonathan Nieder2-24/+34
Because git_path() calls vsnprintf(), code like fd = open(git_path("SQUASH_MSG"), O_WRONLY | O_CREAT, 0666); die_errno(_("Could not write to '%s'"), git_path("SQUASH_MSG")); can end up printing an error indicator from vsnprintf() instead of open() by mistake. Store the path we are trying to write to in a temporary variable and pass _that_ to die_errno(), so the messages written by git cherry-pick/revert and git merge can avoid this source of confusion. Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-11-17Git 1.7.8-rc3Libravatar Junio C Hamano2-5/+2
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-11-16refs: loosen over-strict "format" checkLibravatar Junio C Hamano2-10/+17
The add_extra_ref() interface is used to add an extra-ref that is _not_ our ref for the purpose of helping auto-following of tags and reducing object transfer from remote repository, and they are typically formatted as a tagname followed by ^{} to make sure no valid refs match that pattern. In other words, these entries are deliberately formatted not to pass check-refname-format test. A recent series however added a test unconditionally to the add_ref() function that is called from add_extra_ref(). The check may be sensible for other two callsites of the add_ref() interface, but definitely is a wrong thing to do in add_extra_ref(). Disable it. Signed-off-by: Junio C Hamano <gitster@pobox.com> Acked-by: Michael Haggerty <mhagger@alum.mit.edu>
2011-11-16mailmap: xcalloc mailmap_infoLibravatar Marc-André Lureau1-3/+2
This is to avoid reaching free of uninitialized members. With an invalid .mailmap (and perhaps in other cases), it can reach free(mi->name) with garbage for example. Signed-off-by: Marc-André Lureau <marcandre.lureau@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-11-15revert: prettify fatal messagesLibravatar Ramkumar Ramachandra1-5/+5
Some of the fatal messages printed by revert and cherry-pick look ugly like the following: fatal: Could not open .git/sequencer/todo.: No such file or directory The culprit here is that these callers of the die_errno() function did not take it into account that the message string they give to it is followed by ": <strerror>", hence the message typically should not end with the full-stop. Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-11-15git-compat-util: don't assume value for undefined variableLibravatar Ramkumar Ramachandra1-1/+1
Suggested-by: Thomas Rast <trast@student.ethz.ch> Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-11-15sha1_file: don't mix enum with intLibravatar Ramkumar Ramachandra1-1/+1
Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-11-15convert: don't mix enum with intLibravatar Ramkumar Ramachandra1-3/+3
Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-11-15http: remove unused function hex()Libravatar Ramkumar Ramachandra1-8/+0
Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-11-15name-rev --all: do not even attempt to describe non-commit objectLibravatar Junio C Hamano1-1/+1
This even dates back to the very beginning of "git name-rev"; it does not make much sense to dump all objects in the repository and label non-commits as "undefined". Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-11-15Revert "upload-archive: use start_command instead of fork"Libravatar Junio C Hamano4-31/+55
This reverts commit c09cd77ea2fe3580b33918a99fe138d239ac2aaf, expecting a better version to be rerolled soon.
2011-11-12Git 1.7.8-rc2Libravatar Junio C Hamano2-2/+2
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-11-11Merge branch 'ly/mktree-using-strbuf'Libravatar Junio C Hamano1-0/+1
* ly/mktree-using-strbuf: mktree: fix a memory leak in write_tree()
2011-11-10Merge "Move 'builtin-*' into a 'builtin/' subdirectory"Libravatar Junio C Hamano943-17539/+77997
2011-11-10Merge 'build-in git-mktree'Libravatar Junio C Hamano1366-45469/+172869
* commit '633e3556ccbc': (5835 commits) build-in git-mktree allow -t abbreviation for --track in git branch gitweb: Remove function prototypes (cleanup) Documentation: cloning to empty directory is allowed Clarify kind of conflict in merge-one-file helper git config: clarify --add and --get-color archive-tar.c: squelch a type mismatch warning Start 1.6.4 development Start 1.6.3.1 maintenance series. GIT 1.6.3 t4029: use sh instead of bash t4200: convert sed expression which operates on non-text file to perl t4200: remove two unnecessary lines t/annotate-tests.sh: avoid passing a non-newline terminated file to sed t4118: avoid sed invocation on file without terminating newline t4118: add missing '&&' t8005: use egrep when extended regular expressions are required git-clean doc: the command only affects paths under $(cwd) improve error message in config.c t4018-diff-funcname: add cpp xfuncname pattern to syntax test ...
2011-11-10mktree: fix a memory leak in write_tree()Libravatar Liu Yuan1-0/+1
We forget to call strbuf_release to release the buf memory. Signed-off-by: Liu Yuan <tailai.ly@taobao.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-11-09Merge branch 'sn/complete-bash-wo-process-subst'Libravatar Junio C Hamano1-1/+1
* sn/complete-bash-wo-process-subst: completion: don't leak variable from the prompt into environment
2011-11-09completion: don't leak variable from the prompt into environmentLibravatar SZEDER Gábor1-1/+1
Commit e5b8eebc (completion: fix issue with process substitution not working on Git for Windows, 2011-10-26) introduced a new variable in __git_ps1_show_upstream(), but didn't declare it as local to prevent it from leaking into the environment. We may want to rewrite it like the following, but that can wait until the next cycle. while read key value do ... done <<-EOF $(git config -z --get-regexp ...) EOF Signed-off-by: SZEDER Gábor <szeder@ira.uka.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-11-08Update draft release notes to 1.7.8Libravatar Junio C Hamano1-14/+5
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-11-08Merge branch 'jc/remote-setbranches-usage-fix'Libravatar Junio C Hamano1-1/+1
* jc/remote-setbranches-usage-fix: remote: fix set-branches usage
2011-11-08Merge branch 'fc/remote-seturl-usage-fix'Libravatar Junio C Hamano1-1/+1
* fc/remote-seturl-usage-fix: remote: fix remote set-url usage
2011-11-08Sync with 1.7.7.3Libravatar Junio C Hamano5-50/+67
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-11-08Git 1.7.7.3Libravatar Junio C Hamano3-2/+21
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-11-08Merge branch 'jc/maint-remove-renamed-ref' into maintLibravatar Junio C Hamano1-8/+0
* jc/maint-remove-renamed-ref: branch -m/-M: remove undocumented RENAMED-REF Conflicts: refs.c
2011-11-08Merge branch 'jm/maint-gitweb-filter-forks-fix' into maintLibravatar Junio C Hamano1-1/+1
* jm/maint-gitweb-filter-forks-fix: gitweb: fix regression when filtering out forks
2011-11-08Merge branch 'dm/pack-objects-update' into maintLibravatar Junio C Hamano1-19/+55
* dm/pack-objects-update: pack-objects: don't traverse objects unnecessarily pack-objects: rewrite add_descendants_to_write_order() iteratively pack-objects: use unsigned int for counter and offset values pack-objects: mark add_to_write_order() as inline
2011-11-08docs: Update install-doc-quickLibravatar Junio C Hamano3-50/+46
The preformatted documentation pages live in their own repositories these days. Adjust the installation procedure to the updated layout. Tested-by: Stefan Naewe <stefan.naewe@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-11-08docs: don't mention --quiet or --exit-code in git-log(1)Libravatar Jeff King1-0/+2
These are diff-options, but they don't actually make sense in the context of log. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-11-07Git 1.7.8-rc1Libravatar Junio C Hamano2-2/+6
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-11-07Merge branch 'ss/blame-textconv-fake-working-tree'Libravatar Junio C Hamano1-4/+3
* ss/blame-textconv-fake-working-tree: blame.c: Properly initialize strbuf after calling textconv_object(), again
2011-11-07blame.c: Properly initialize strbuf after calling textconv_object(), againLibravatar Sebastian Schuberth1-4/+3
2564aa4 started to initialize buf.alloc, but that should actually be one more byte than the string length due to the trailing \0. Also, do not modify buf.alloc out of the strbuf code. Use the existing strbuf_attach instead. Signed-off-by: Sebastian Schuberth <sschuberth@gmail.com> Reviewed-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-11-06Merge branch 'ab/i18n-test-fix'Libravatar Junio C Hamano2-3/+3
* ab/i18n-test-fix: t/t7508-status.sh: use test_i18ncmp t/t6030-bisect-porcelain.sh: use test_i18ngrep
2011-11-06Merge branch 'sn/http-auth-with-netrc-fix'Libravatar Junio C Hamano1-4/+3
* sn/http-auth-with-netrc-fix: http: don't always prompt for password
2011-11-06Merge branch 'pw/p4-appledouble-fix'Libravatar Junio C Hamano2-0/+44
* pw/p4-appledouble-fix: git-p4: ignore apple filetype