summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2009-05-31diff: generate pretty filenames in prep_temp_blob()Libravatar David Aguilar4-1/+38
Naturally, prep_temp_blob() did not care about filenames. As a result, GIT_EXTERNAL_DIFF and textconv generated filenames such as ".diff_XXXXXX". This modifies prep_temp_blob() to generate user-friendly filenames when creating temporary files. Diffing "name.ext" now generates "XXXXXX_name.ext". Signed-off-by: David Aguilar <davvid@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-05-31compat: add a basename() compatibility functionLibravatar David Aguilar5-0/+37
Some systems such as Windows lack libgen.h so provide a basename() implementation for cross-platform use. This introduces the NO_LIBGEN_H construct to the Makefile and autoconf scripts. Signed-off-by: David Aguilar <davvid@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-05-31compat: add a mkstemps() compatibility functionLibravatar David Aguilar5-0/+102
mkstemps() is a BSD extension so provide an implementation for cross-platform use. Signed-off-by: David Aguilar <davvid@gmail.com> Tested-by: Johannes Sixt <j6t@kdbg.org> (Windows) Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-05-25Update draft release notes to 1.6.4Libravatar Junio C Hamano1-1/+35
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-05-25Merge branch 'maint'Libravatar Junio C Hamano6-9/+68
* maint: Prepare for 1.6.3.2 fix cat-file usage message and documentation fetch: report ref storage DF errors more accurately lock_ref: inform callers of unavailable ref merge-options.txt: Clarify merge --squash Conflicts: RelNotes
2009-05-25Prepare for 1.6.3.2Libravatar Junio C Hamano2-1/+52
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-05-25Merge branch 'js/maint-no-ln-across-libexec-and-bin' into maintLibravatar Junio C Hamano1-0/+4
* js/maint-no-ln-across-libexec-and-bin: Add NO_CROSS_DIRECTORY_HARDLINKS support to the Makefile Conflicts: Makefile
2009-05-25Merge branch 'lt/maint-diff-reduce-lstat' into maintLibravatar Junio C Hamano2-3/+3
* lt/maint-diff-reduce-lstat: Teach 'git checkout' to preload the index contents Avoid unnecessary 'lstat()' calls in 'get_stat_data()'
2009-05-25Merge branch 'jm/format-patch-no-auto-n-when-k-is-given' into maintLibravatar Junio C Hamano2-1/+20
* jm/format-patch-no-auto-n-when-k-is-given: format-patch let -k override a config-specified format.numbered
2009-05-25Merge branch 'do/maint-merge-recursive-fix' into maintLibravatar Junio C Hamano2-5/+101
* do/maint-merge-recursive-fix: merge-recursive: never leave index unmerged while recursing
2009-05-25Merge branch 'jk/maint-1.6.0-trace-argv' into maintLibravatar Junio C Hamano1-4/+4
* jk/maint-1.6.0-trace-argv: fix GIT_TRACE segfault with shell-quoted aliases Conflicts: alias.c
2009-05-25Merge branch 'np/push-delta' into maintLibravatar Junio C Hamano3-8/+23
* np/push-delta: allow OFS_DELTA objects during a push
2009-05-25Merge branch 'ar/merge-one-file-diag' into maintLibravatar Junio C Hamano0-0/+0
* ar/merge-one-file-diag: Clarify kind of conflict in merge-one-file helper
2009-05-25Merge branch 'ar/unlink-err' into maintLibravatar Junio C Hamano26-50/+68
* ar/unlink-err: print unlink(2) errno in copy_or_link_directory replace direct calls to unlink(2) with unlink_or_warn Introduce an unlink(2) wrapper which gives warning if unlink failed
2009-05-25Merge branch 'jk/maint-add-empty' into maintLibravatar Junio C Hamano1-1/+1
* jk/maint-add-empty: add: don't complain when adding empty project root
2009-05-25fix cat-file usage message and documentationLibravatar Jeff King2-4/+4
cat-file with an object on the command line requires an option to tell it what to output (type, size, pretty-print, etc). However, the square brackets in the usage imply that those options are not required. This patch switches them to parentheses to indicate "required but grouped-OR" (curly braces might also work, but this follows the convention used already by "git stash"). While we're at it, let's change the <sha1> specifier in the usage to <object>. That's what the documentation uses, and it does actually use the regular object lookup. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-05-25fetch: report ref storage DF errors more accuratelyLibravatar Jeff King1-3/+8
When we fail to store a fetched ref, we recommend that the user try running "git prune" to remove up any old refs that have been deleted by the remote, which would clear up any DF conflicts. However, ref storage might fail for other reasons (e.g., permissions problems) in which case the advice is useless and misleading. This patch detects when there is an actual DF situation and only issues the advice when one is found. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-05-25lock_ref: inform callers of unavailable refLibravatar Jeff King1-1/+3
One of the ways that locking might fail is that there is a DF conflict between two refs (e.g., you want to lock "foo/bar" but "foo" already exists). In this case, we return an error, but there is no way for the caller to know the specific problem. This patch sets errno to ENOTDIR, which is the most sensible code. It's what we would see if the refs were stored purely in the filesystem (but these days we must check the namespace manually due to packed refs). Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-05-25convert bare readlink to strbuf_readlinkLibravatar Jeff King1-7/+4
This particular readlink call never NUL-terminated its result, making it a potential source of bugs (though there is no bug now, as it currently always respects the length field). Let's just switch it to strbuf_readlink which is shorter and less error-prone. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-05-25merge-options.txt: Clarify merge --squashLibravatar Michael J Gruber1-1/+2
With the --squash option, merge sets up the index just like for a real merge, but without the merge info (stages). Say so. Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-05-24Merge branch 'maint'Libravatar Junio C Hamano1-1/+2
* maint: http-push.c::remove_locks(): fix use after free
2009-05-24Merge branch 'maint-1.6.2' into maintLibravatar Junio C Hamano1-1/+2
* maint-1.6.2: http-push.c::remove_locks(): fix use after free
2009-05-24Merge branch 'maint-1.6.1' into maint-1.6.2Libravatar Junio C Hamano1-1/+2
* maint-1.6.1: http-push.c::remove_locks(): fix use after free
2009-05-24Merge branch 'maint-1.6.0' into maint-1.6.1Libravatar Junio C Hamano1-1/+2
* maint-1.6.0: http-push.c::remove_locks(): fix use after free
2009-05-24http-push.c::remove_locks(): fix use after freeLibravatar Alex Riesen1-1/+2
Noticed and reported by Serhat Şevki Dinçer. Signed-off-by: Alex Riesen <raa.lkml@gmail.com> Acked-by: Clemens Buchacher <drizzd@aon.at> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-05-24t/t3400-rebase.sh: add more tests to help migrating git-rebase.sh to CLibravatar Nguyễn Thái Ngọc Duy1-0/+31
These new tests make sure I don't miss any check being performed before rebase is proceeded (which is well tested by other tests) Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-05-23post-receive-email: hooks.showrev: show how to include both web link and patchLibravatar Jim Meyering1-0/+4
Add a comment showing how to include a web link (i.e. gitweb/cgit) and a patch in the email that is sent for each pushed commit. The quoting was tricky enough that it's worth documenting. To add two blank lines (i.e. put \n\n in the printf), you would need to say \\\\n\\\\n, and in the end, the pair of "echo" statements seemed better. This is used in glibc.git repository: http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=summary push-triggered messages have been sent to this list since May 21: http://sourceware.org/ml/glibc-cvs/2009-q2/ Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-05-23MinGW: Fix compiler warning in merge-recursiveLibravatar Johannes Schindelin1-2/+3
GCC 4.4.0 on Windows does not like the format %zu. It is quite unlikely, though, that we need more merge bases than a %d can display, so replace the %zu by a %d. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Steffen Prohaska <prohaska@zib.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-05-23MinGW: Add a simple getpass()Libravatar Johannes Schindelin2-0/+17
We need getpass() to activate curl on MinGW. Although the default Makefile currently has 'NO_CURL = YesPlease', msysgit releases do provide curl support, so getpass() is used. [spr: - edited commit message. - squashed commit that provides getpass() declaration.] Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Steffen Prohaska <prohaska@zib.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-05-23MinGW: use POSIX signature of waitpid()Libravatar Johannes Schindelin1-1/+1
Git's source code expects waitpid() to return a signed int status. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Steffen Prohaska <prohaska@zib.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-05-23MinGW: the path separator to split GITPERLLIB is ';' on Win32Libravatar Johannes Schindelin1-1/+3
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Steffen Prohaska <prohaska@zib.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-05-23MinGW: Scan for \r in addition to \n when reading shbang linesLibravatar Peter Harris1-2/+2
\r is common on Windows, so we should handle it gracefully. Signed-off-by: Steffen Prohaska <prohaska@zib.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-05-23Merge branch 'jn/gitweb-cleanup'Libravatar Junio C Hamano1-42/+42
* jn/gitweb-cleanup: gitweb: Remove unused $hash_base parameter from normalize_link_target gitweb: Simplify snapshot format detection logic in evaluate_path_info gitweb: Use capturing parentheses only when you intend to capture gitweb: Replace wrongly added tabs with spaces gitweb: Use block form of map/grep in a few cases more gitweb: Always use three argument form of open gitweb: Always use three argument form of open gitweb: Do not use bareword filehandles
2009-05-23Merge branch 'mg/track'Libravatar Junio C Hamano2-2/+16
* mg/track: Fix behavior with non-commit upstream references Test tracking of non-commit upstreams
2009-05-23Merge branch 'fc/decorate-tag'Libravatar Junio C Hamano7-11/+11
* fc/decorate-tag: Prettify log decorations even more Change prettify_ref to prettify_refname
2009-05-23Merge branch 'tp/send-email-from-config'Libravatar Junio C Hamano2-3/+7
* tp/send-email-from-config: send-email: Add config option for sender address
2009-05-23Merge branch 'js/maint-no-ln-across-libexec-and-bin'Libravatar Junio C Hamano1-0/+4
* js/maint-no-ln-across-libexec-and-bin: Add NO_CROSS_DIRECTORY_HARDLINKS support to the Makefile Conflicts: Makefile
2009-05-23Merge branch 'da/mergetool-lib'Libravatar Junio C Hamano1-3/+3
* da/mergetool-lib: mergetool--lib: specialize diff options for emerge and ecmerge
2009-05-23Merge branch 'cc/bisect' (early part)Libravatar Junio C Hamano9-271/+494
* 'cc/bisect' (early part): bisect: make "git bisect" use new "--next-all" bisect-helper function bisect: add "check_good_are_ancestors_of_bad" function bisect: implement the "check_merge_bases" function bisect: automatically sort sha1_array if needed when looking it up bisect: make skipped array functions more generic bisect: remove too much function nesting bisect: use new "struct argv_array" to prepare argv for "setup_revisions" bisect: store good revisions in a "sha1_array" bisect: implement "rev_argv_push" to fill an argv with revs bisect: use "sha1_array" to store skipped revisions am: simplify "sq" function by using "git rev-parse --sq-quote" bisect: use "git rev-parse --sq-quote" instead of a custom "sq" function rev-parse: add --sq-quote to shell quote arguments rev-list: remove stringed output flag from "show_bisect_vars" bisect--helper: remove "--next-vars" option as it is now useless bisect: use "git bisect--helper --next-exit" in "git-bisect.sh" bisect--helper: add "--next-exit" to output bisect results bisect: move common bisect functionality to "bisect_common" rev-list: refactor printing bisect vars rev-list: make "estimate_bisect_steps" non static
2009-05-23Merge branch 'lt/maint-diff-reduce-lstat'Libravatar Junio C Hamano2-3/+3
* lt/maint-diff-reduce-lstat: Teach 'git checkout' to preload the index contents Avoid unnecessary 'lstat()' calls in 'get_stat_data()'
2009-05-23Merge branch 'jm/format-patch-no-auto-n-when-k-is-given'Libravatar Junio C Hamano2-1/+20
* jm/format-patch-no-auto-n-when-k-is-given: format-patch let -k override a config-specified format.numbered
2009-05-23Merge branch 'do/maint-merge-recursive-fix'Libravatar Junio C Hamano2-5/+101
* do/maint-merge-recursive-fix: merge-recursive: never leave index unmerged while recursing
2009-05-23Merge branch 'rr/forbid-bs-in-ref'Libravatar Junio C Hamano2-1/+4
* rr/forbid-bs-in-ref: Disallow '\' in ref names
2009-05-23Merge branch 'hv/sample-update'Libravatar Junio C Hamano1-0/+10
* hv/sample-update: Extend sample update hook, disable modifying of existing tags
2009-05-23Merge branch 'jk/maint-1.6.0-trace-argv'Libravatar Junio C Hamano1-4/+4
* jk/maint-1.6.0-trace-argv: fix GIT_TRACE segfault with shell-quoted aliases Conflicts: alias.c
2009-05-23Merge branch 'jk/no-no-no-empty-directory'Libravatar Junio C Hamano1-1/+1
* jk/no-no-no-empty-directory: parseopt: add OPT_NEGBIT
2009-05-23Merge branch 'rs/grep-parseopt'Libravatar Junio C Hamano7-252/+350
* rs/grep-parseopt: grep: make callback functions static grep: use parseopt grep: remove global variable builtin_grep parseopt: add PARSE_OPT_NODASH parseopt: add OPT_NUMBER_CALLBACK parseopt: add OPT_NEGBIT
2009-05-23Merge branch 'fl/git-pm'Libravatar Junio C Hamano3-9/+22
* fl/git-pm: Git.pm: Always set Repository to absolute path if autodetecting Git.pm: Set GIT_WORK_TREE if we set GIT_DIR
2009-05-23Merge branch 'mt/submodule-reference'Libravatar Junio C Hamano3-6/+127
* mt/submodule-reference: Add --reference option to git submodule.
2009-05-22gitweb: Sanitize title attribute in format_subject_htmlLibravatar Jakub Narebski1-1/+2
Replace control characters with question mark '?' (like in chop_and_esc_str). A little background: some web browsers turn on strict (and unforgiving) XML validating mode for XHTML documents served using application/xhtml+xml content type. This means among others that control characters are forbidden to appear in gitweb output. CGI.pm does by default slight escaping (using simple_escape subroutine from CGI::Util) of all _attribute_ values (depending on the value of autoEscape, by default on). This escaping, at least in CGI.pm version 3.10 (most current version at CPAN is 3.43), is minimal: only '"', '&', '<' and '>' are escaped using named HTML entity references (&quot;, &amp;, &lt; and &gt; respectively). But simple_escape does not do escaping of control characters such as ^X which are invalid in XHTML (in strict mode). If by some accident commit message do contain some control character in first 50 characters (more or less) of first line of commit message, and this line is longer than 50 characters (so gitweb shortens it for display), then gitweb would put this control character in title attribute (and CGI.pm would not remove them). The tag _contents_ is safe because it is escaped using esc_html() explicitly, and it replaces control characters by their printable representation. While at it: chop_and_escape_str doesn't need capturing group. Noticed-by: Paul Gortmaker <paul.gortmaker@windriver.com> Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>