summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2010-11-04mingw: import poll-emulation from gnulibErik Faye-Lund
copy lib/poll.c and lib/poll.in.h verbatim from commit 0a05120 in git://git.savannah.gnu.org/gnulib.git to compat/win32/sys/poll.[ch] To upgrade this code in the future, branch out from this commit, copy new versions of the files above on top, and merge back the result. Signed-off-by: Erik Faye-Lund <kusmabite@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-11-04daemon: get remote host address from root-processErik Faye-Lund
Get remote host in the process that accept() and pass it through the REMOTE_ADDR environment variable to the handler-process. Introduce the REMOTE_PORT environmen variable for the port. Use these variables for reporting instead of doing getpeername(0, ...), which doesn't work on Windows. Signed-off-by: Erik Faye-Lund <kusmabite@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-11-04Improve the mingw getaddrinfo stub to handle more use casesMartin Storsjö
Allow the node parameter to be null, which is used for getting the default bind address. Also allow the hints parameter to be null, to improve standard conformance of the stub implementation a little. Signed-off-by: Martin Storsjo <martin@martin.st> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-11-04daemon: use full buffered mode for stderrErik Faye-Lund
Windows doesn't support line buffered mode for file streams, so let's just use full buffered mode with a big buffer ("4096 should be enough for everyone") and add explicit flushing. Signed-off-by: Erik Faye-Lund <kusmabite@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-11-04daemon: use run-command api for async servingErik Faye-Lund
fork() is only available on POSIX, so to support git-daemon on Windows we have to use something else. Instead we invent the flag --serve, which is a stripped down version of --inetd-mode. We use start_command() to call git-daemon with this flag appended to serve clients. Signed-off-by: Erik Faye-Lund <kusmabite@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-11-04mingw: add kill emulationErik Faye-Lund
This is a quite limited kill-emulation; it can only handle SIGTERM on positive pids. However, it's enough for git-daemon. Signed-off-by: Erik Faye-Lund <kusmabite@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-11-04mingw: support waitpid with pid > 0 and WNOHANGErik Faye-Lund
Signed-off-by: Erik Faye-Lund <kusmabite@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-11-04mingw: use real pidErik Faye-Lund
The Windows port have so far been using process handles in place of PID. However, this is not work consistent with what getpid returns. PIDs are system-global identifiers, but process handles are local to a process. Using PIDs instead of process handles allows, for instance, a user to kill a hung process with the Task Manager, something that would have been impossible with process handles. Change the code to use the real PID, and use OpenProcess to get a process-handle. Store the PID and the process handle in a linked list protected by a critical section, so we can safely close the process handle later. Linked list code written by Pat Thoyts. Signed-off-by: Erik Faye-Lund <kusmabite@gmail.com> Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-11-04inet_ntop: fix a couple of old-style declsErik Faye-Lund
Signed-off-by: Erik Faye-Lund <kusmabite@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-11-04compat: add inet_pton and inet_ntop prototypesMike Pape
Windows doesn't have inet_pton and inet_ntop, so add prototypes in git-compat-util.h for them. At the same time include git-compat-util.h in the sources for these functions, so they use the network-wrappers from there on Windows. Signed-off-by: Mike Pape <dotzenlabs@gmail.com> Signed-off-by: Erik Faye-Lund <kusmabite@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-11-04mingw: implement syslogMike Pape
Syslog does not usually exist on Windows, so implement our own using Window's ReportEvent mechanism. Strings containing "%1" gets expanded into them selves by ReportEvent, resulting in an unreadable string. "%2" and above is not a problem. Unfortunately, on Windows an IPv6 address can contain "%1", so expand "%1" to "% 1" before reporting. "%%1" is also a problem for ReportEvent, but that string cannot occur in an IPv6 address. Signed-off-by: Mike Pape <dotzenlabs@gmail.com> Signed-off-by: Erik Faye-Lund <kusmabite@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-11-04mingw: add network-wrappers for daemonMike Pape
git-daemon requires some socket-functionality that is not yet supported in the Windows-port. This patch adds said functionality, and makes sure WSAStartup gets called by socket(), since it is the first network-call in git-daemon. Signed-off-by: Mike Pape <dotzenlabs@gmail.com> Signed-off-by: Erik Faye-Lund <kusmabite@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-10-28completion: fix zsh check under bash with 'set -u'Mark Lodato
Commit 06f44c3 (completion: make compatible with zsh) broke bash compatibility with 'set -u': a warning was generated when checking $ZSH_VERSION. The solution is to supply a default value, using ${ZSH_VERSION-}. Thanks to SZEDER Gábor for the fix. Signed-off-by: Mark Lodato <lodatom@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-10-27Merge branch 'ab/send-email-perl'Junio C Hamano
* ab/send-email-perl: send-email: extract_valid_address use qr// regexes send-email: is_rfc2047_quoted use qr// regexes send-email: use Perl idioms in while loop send-email: make_message_id use "require" instead of "use" send-email: send_message die on $!, not $? send-email: use (?:) instead of () if no match variables are needed send-email: sanitize_address use qq["foo"], not "\"foo\"" send-email: sanitize_address use $foo, not "$foo" send-email: use \E***\Q instead of \*\*\* send-email: cleanup_compose_files doesn't need a prototype send-email: unique_email_list doesn't need a prototype send-email: file_declares_8bit_cte doesn't need a prototype send-email: get_patch_subject doesn't need a prototype send-email: use lexical filehandles during sending send-email: use lexical filehandles for $compose send-email: use lexical filehandle for opendir Conflicts: git-send-email.perl
2010-10-27Merge branch 'sb/send-email-use-to-from-input'Junio C Hamano
* sb/send-email-use-to-from-input: send-email: Don't leak To: headers between patches send-email: Use To: headers in patch files Conflicts: git-send-email.perl
2010-10-27Merge branch 'ab/require-perl-5.8'Junio 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-10-27Merge branch 'kb/merge-recursive-rename-threshold'Junio C Hamano
* kb/merge-recursive-rename-threshold: diff: add synonyms for -M, -C, -B merge-recursive: option to specify rename threshold Conflicts: Documentation/diff-options.txt Documentation/merge-strategies.txt
2010-10-27Merge branch 'jp/send-email-to-cmd'Junio C Hamano
* jp/send-email-to-cmd: git-send-email.perl: Add --to-cmd Conflicts: git-send-email.perl
2010-10-27Merge branch 'as/daemon-multi-listen'Junio C Hamano
* as/daemon-multi-listen: daemon: allow more than one host address given via --listen daemon: add helper function named_sock_setup
2010-10-27Merge branch 'dm/mergetool-vimdiff'Junio C Hamano
* dm/mergetool-vimdiff: mergetool-lib: make the three-way diff the default for vim/gvim mergetool-lib: add a three-way diff view for vim/gvim mergetool-lib: combine vimdiff and gvimdiff run blocks
2010-10-27Merge branch 'kf/post-receive-sample-hook'Junio C Hamano
* kf/post-receive-sample-hook: post-receive-email: ensure sent messages are not empty
2010-10-27Merge branch 'jf/merge-ignore-ws'Junio C Hamano
* jf/merge-ignore-ws: merge-recursive: options to ignore whitespace changes merge-recursive --patience ll-merge: replace flag argument with options struct merge-recursive: expose merge options for builtin merge
2010-10-27Merge branch 'ml/completion-zsh'Junio C Hamano
* ml/completion-zsh: completion: make compatible with zsh
2010-10-27Merge branch 'po/sendemail'Junio C Hamano
* po/sendemail: New send-email option smtpserveroption. Remove @smtp_host_parts variable as not used. Minor indentation fix.
2010-10-27Merge branch 'en/tree-walk-optim'Junio C Hamano
* en/tree-walk-optim: diff_tree(): Skip skip_uninteresting() when all remaining paths interesting tree_entry_interesting(): Make return value more specific tree-walk: Correct bitrotted comment about tree_entry() Document pre-condition for tree_entry_interesting
2010-10-26Merge branch 'maint'Junio C Hamano
* maint: Fix copy-pasted comments related to tree diff handling.
2010-10-25Fix copy-pasted comments related to tree diff handling.Yann Dirson
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-10-22Sync with 1.7.3.2Junio C Hamano
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-10-22Git 1.7.3.2v1.7.3.2Junio C Hamano
2010-10-21Merge branch 'sn/doc-opt-notation' into maintJunio C Hamano
* sn/doc-opt-notation: Fix {update,checkout}-index usage strings Put a space between `<' and argument in pack-objects usage string Remove stray quotes in --pretty and --format documentation Use parentheses and `...' where appropriate Fix odd markup in --diff-filter documentation Use angles for placeholders consistently
2010-10-21Merge branch 'mg/fix-build-remote-helpers' into maintJunio C Hamano
* mg/fix-build-remote-helpers: remote-helpers: build in platform independent directory
2010-10-19{cvs,svn}import: use the new 'git read-tree --empty'Thomas Rast
Since fb1bb96 (read-tree: deprecate syntax without tree-ish args, 2010-09-10) not passing --empty caused a spurious warning that was shown to the user. Signed-off-by: Thomas Rast <trast@student.ethz.ch> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-10-19Merge branch 'maint'Junio C Hamano
* maint: t/t9001-send-email.sh: fix stderr redirection in 'Invalid In-Reply-To' Clarify and extend the "git diff" format documentation git-show-ref.txt: clarify the pattern matching documentation: git-config minor cleanups Update test script annotate-tests.sh to handle missing/extra authors
2010-10-19t/t9001-send-email.sh: fix stderr redirection in 'Invalid In-Reply-To'Antonio Ospite
Signed-off-by: Antonio Ospite <ospite@studenti.unina.it> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-10-19Clarify and extend the "git diff" format documentationAndreas Gruenbacher
Move the similarity and dissimilarity index header description closer to where those extended headers are described. Describe and/or clarify the format used for file modes, pathnames, and the index header. Document that all "old" files refer to the state before applying the *entire* output, and all "new" files refer to the state thereafter. Signed-off-by: Andreas Gruenbacher <agruen@suse.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-10-19git-show-ref.txt: clarify the pattern matchingMichael J Gruber
git-show-ref really does not do what one would expect under the name pattern matching, so describe it. Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-10-19documentation: git-config minor cleanupsCliff Frey
Change push.default's description to add hyphens between values and descriptions to make the manpage easier to read. The html version is readable either way. Change status.showUntrackedFiles to make item descriptions be sentences and to use the same asciidoc format as push.default. The only visual change is the additions of "." Signed-off-by: Cliff Frey <cliff@meraki.com> Acked-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-10-19Update test script annotate-tests.sh to handle missing/extra authorsKevin Ballard
The current script used by annotate-tests.sh (used by t8001 and t8002) fails to emit a warning if any of the expected authors never show up in the output or if authors that show up in the output were never specified as expected. Update the script to fail in both of these scenarios. Helped-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Kevin Ballard <kevin@sb.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-10-14Merge branch 'maint'Junio C Hamano
* maint: Better advice on using topic branches for kernel development Documentation: update implicit "--no-index" behavior in "git diff" Documentation: expand 'git diff' SEE ALSO section Documentation: diff can compare blobs Documentation: gitrevisions is in section 7 shell portability: no "export VAR=VAL" CodingGuidelines: reword parameter expansion section Documentation: update-index: -z applies also to --index-info Documentation: No argument of ALLOC_GROW should have side-effects
2010-10-14Better advice on using topic branches for kernel developmentLuck, Tony
Linus Torvalds wrote: > The real problem is that maintainers often pick random - and not at > all stable - points for their development to begin with. They just > pick some random "this is where Linus -git tree is today", and do > their development on top of that. THAT is the problem - they are > unaware that there's some nasty bug in that version. Maybe they do this because they read it in the Git user-manual. Fix the manual to give them better guidance. Signed-off-by: Tony Luck <tony.luck@intel.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-10-14Documentation: update implicit "--no-index" behavior in "git diff"Jonathan Nieder
Originally "--no-index" mode triggered for untracked files within the tracked tree, but with v1.5.6-rc1~41 (Merge branch 'jc/diff-no-no-index, 2008-05-26) the command was fixed to only implicitly trigger when paths outside the tracked tree are mentioned. Reported-by: Yann Dirson <dirson@bertin.fr> Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-10-14Documentation: expand 'git diff' SEE ALSO sectionJonathan Nieder
Point in many directions in the hope of helping the reader find what is needed more quickly. This commit also removes the summary attached to the SEE ALSO entry for difftool, to avoid making the SEE ALSO list too verbose. If the reader wants a summary of the commands referred to, she can always look to the top of the named pages or to the table of contents on the main git(1) page. Suggested-by: Goswin von Brederlow <goswin-v-b@web.de> Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-10-14Documentation: diff can compare blobsJonathan Nieder
Meanwhile, there is no plumbing command to compare two blobs. Strange. Reported-by: Yann Dirson <dirson@bertin.fr> Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-10-14Documentation: gitrevisions is in section 7Jonathan Nieder
Fix references to gitrevisions(1) in the manual pages and HTML documentation. In practice, this will not matter much unless someone tries to use a hard copy of the git reference manual. Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-10-13fast-import: Allow filemodify to set the rootDavid Barr
v1.7.3-rc0~75^2 (Teach fast-import to import subtrees named by tree id, 2010-06-30) has a shortcoming - it doesn't allow the root to be set. Extend this behaviour by allowing the root to be referenced as the empty path, "". For a command (like filter-branch --subdirectory-filter) that wants to commit a lot of trees that already exist in the object db, writing undeltified objects as loose files only to repack them later can involve a significant amount of overhead. (23% slow-down observed on Linux 2.6.35, worse on Mac OS X 10.6) Fortunately we have fast-import (which is one of the only git commands that will write to a pack directly) but there is not an advertised way to tell fast-import to commit a given tree without unpacking it. This patch changes that, by allowing M 040000 <tree id> "" as a filemodify line in a commit to reset to a particular tree without any need to parse it. For example, M 040000 4b825dc642cb6eb9a060e54bf8d69288fbee4904 "" is a synonym for the deleteall command and the fast-import equivalent of git read-tree 4b825dc642cb6eb9a060e54bf8d69288fbee4904 Signed-off-by: David Barr <david.barr@cordelta.com> Commit-message-by: Jonathan Nieder <jrnieder@gmail.com> Acked-by: Sverre Rabbelier <srabbelier@gmail.com> Tested-by: Ramkumar Ramachandra <artagnon@gmail.com> Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-10-13shell portability: no "export VAR=VAL"Junio C Hamano
It is more portable to say "VAR=VAL && export VAR" instead. Noticed by Ævar. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-10-13CodingGuidelines: reword parameter expansion sectionJunio C Hamano
Group entries related to parameter substitutions together and avoid using the word "regexp" to refer to the ${parameter/pattern/string} substitution (banned), as the pattern there is a shell glob and not a regular expression. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-10-13Documentation: update-index: -z applies also to --index-infoBert Wesarg
Signed-off-by: Bert Wesarg <bert.wesarg@googlemail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-10-13gitweb: Improve behavior for actionless path_info gitweb URLsJakub Narebski
Eli Barzilay noticed that http://server/gitweb/project/<commit-sha1> link goes to 'shortlog' view, while 'commit' view would be more useful, but that 'shortlog' action is more apropriate for http://server/gitweb/project/<commit-sha1>..<other-commit-sha1> links. Therefore for the case when we don't have either action, or filename, or parent hash [base] in path_info-based URL, i.e. for http://server/gitweb/project/<object-id> link, instead of using 'shortlog' view we allow dispatch() subroutine to detect type of object and use appropriate action (in most case it would be either 'commit' action, or 'tag', or 'tree' for top directory). Requested-by: Eli Barzilay <eli@barzilay.org> Signed-off-by: Jakub Narebski <jnareb@gmail.com> Tested-by: Eli Barzilay <eli@barzilay.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-10-13gitweb: Fix bug in evaluate_path_infoJakub Narebski
There was bug in parsing "project/:/file" and "project/:/" path_info URLs, with implicit HEAD as 'hash_base'. For such URLs the refname is empty, and before this fix regexp for parsing path_info fragment assumed that it is always non-empty. Refname cannot contain ':', as per 'git check-ref-format'. Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>