summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2009-09-13preserve mtime of local cloneLibravatar Clemens Buchacher3-1/+23
A local clone without hardlinks copies all objects, including dangling ones, to the new repository. Since the mtimes are renewed, those dangling objects cannot be pruned by "git gc --prune", even if they would have been old enough for pruning in the original repository. Instead, preserve mtime during copy. "git gc --prune" will then work in the clone just like it did in the original. Signed-off-by: Clemens Buchacher <drizzd@aon.at> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-09-13don't dereference NULL upon fdopen failureLibravatar Jim Meyering5-8/+8
There were several unchecked use of fdopen(); replace them with xfdopen() that checks and dies. Signed-off-by: Jim Meyering <meyering@redhat.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-09-13use write_str_in_full helper to avoid literal string lengthsLibravatar Jim Meyering1-7/+3
This is the same fix to use write_str_in_full() helper to write a constant string out without counting the length of it ourselves. Signed-off-by: Jim Meyering <meyering@redhat.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-09-13Merge branch 'db/vcs-helper'Libravatar Junio C Hamano9-144/+406
* db/vcs-helper: Makefile: remove remnant of separate http/https/ftp helpers Use a clearer style to issue commands to remote helpers Make the "traditionally-supported" URLs a special case Makefile: install hardlinks for git-remote-<scheme> supported by libcurl if possible Makefile: do not link three copies of git-remote-* programs Makefile: git-http-fetch does not need expat http-fetch: Fix Makefile dependancies Add transport native helper executables to .gitignore git-http-fetch: not a builtin Use an external program to implement fetching with curl Add support for external programs for handling native fetches
2009-09-13use write_str_in_full helper to avoid literal string lengthsLibravatar Jim Meyering7-9/+14
In 2d14d65 (Use a clearer style to issue commands to remote helpers, 2009-09-03) I happened to notice two changes like this: - write_in_full(helper->in, "list\n", 5); + + strbuf_addstr(&buf, "list\n"); + write_in_full(helper->in, buf.buf, buf.len); + strbuf_reset(&buf); IMHO, it would be better to define a new function, static inline ssize_t write_str_in_full(int fd, const char *str) { return write_in_full(fd, str, strlen(str)); } and then use it like this: - strbuf_addstr(&buf, "list\n"); - write_in_full(helper->in, buf.buf, buf.len); - strbuf_reset(&buf); + write_str_in_full(helper->in, "list\n"); Thus not requiring the added allocation, and still avoiding the maintenance risk of literal string lengths. These days, compilers are good enough that strlen("literal") imposes no run-time cost. Transformed via this: perl -pi -e \ 's/write_in_full\((.*?), (".*?"), \d+\)/write_str_in_full($1, $2)/'\ $(git grep -l 'write_in_full.*"') Signed-off-by: Jim Meyering <meyering@redhat.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-09-13wrap git's main usage string.Libravatar Matthieu Moy1-1/+4
It's now similar wrapped the same way as in Documentation/git.txt, and fits in a 67 characters wide terminal. Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-09-13Merge branch 'maint'Libravatar Junio C Hamano8-39/+76
* maint: GIT 1.6.4.3 svn: properly escape arguments for authors-prog http.c: remove verification of remote packs grep: accept relative paths outside current working directory grep: fix exit status if external_grep() punts Conflicts: GIT-VERSION-GEN RelNotes
2009-09-13GIT 1.6.4.3Libravatar Junio C Hamano4-3/+33
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-09-13svn: properly escape arguments for authors-progLibravatar Mark Lodato2-0/+15
Previously, the call to authors-prog was not properly escaped, so any special characters in the Subversion username, such as spaces and semi-colons, would be interpreted by the shell rather than being passed in as the first argument. Now all unsafe characters are escaped using "git rev-parse --sq-quote" [ew: switched from "\Q..\E" to "rev-parse --sq-quote"] Signed-off-by: Mark Lodato <lodatom@gmail.com> Signed-off-by: Eric Wong <normalperson@yhbt.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-09-13Merge branch 'cb/maint-1.6.3-grep-relative-up' into maintLibravatar Junio C Hamano3-27/+30
* cb/maint-1.6.3-grep-relative-up: grep: accept relative paths outside current working directory grep: fix exit status if external_grep() punts Conflicts: t/t7002-grep.sh
2009-09-11Makefile: remove remnant of separate http/https/ftp helpersLibravatar Junio C Hamano2-4/+2
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-09-11rebase: use plumbing to show dirty stateLibravatar Jeff King1-1/+1
Commit 4cfbe06 introduced the use of "git diff" to show dirty state in a format more familiar to users. However, it should have used the plumbing "git diff-files" instead. Not only is it good practice in general to use plumbing in scripts, but in this case we really don't want the automatic pager to kick in for an error message. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-09-11pager: set LESS=FRSX also on WindowsLibravatar Johannes Sixt1-2/+4
Previously, this environment variable was set in the pager_preexec callback, which is conditionally-compiled only on Unix, because it is not, and cannot be, called on Windows. With this patch the env member of struct child_process is used to set the environment variable, which also works on Windows. Noticed by Alexey Borzenkov. Signed-off-by: Johannes Sixt <j6t@kdbg.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-09-11start_command: do not clobber cmd->env on Windows code pathLibravatar Johannes Sixt3-9/+17
Previously, it would not be possible to call start_command twice for the same struct child_process that has env set. The fix is achieved by moving the loop that modifies the environment block into a helper function. This also allows us to make two other helper functions static. Signed-off-by: Johannes Sixt <j6t@kdbg.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-09-11http.c: remove verification of remote packsLibravatar Tay Ray Chuan1-11/+0
Make http.c::fetch_pack_index() no longer check for the remote pack with a HEAD request before fetching the corresponding pack index file. Not only does sending a HEAD request before we do a GET incur a performance penalty, it does not offer any significant error- prevention advantages (pack fetching in the *_http_pack_request() methods is capable of handling any errors on its own). This addresses an issue raised elsewhere: http://code.google.com/p/msysgit/issues/detail?id=323 http://support.github.com/discussions/repos/957-cant-clone-over-http-or-git Signed-off-by: Tay Ray Chuan <rctay89@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-09-11add documentation for mailinfo.scissors and '--no-scissors'Libravatar Nicolas Sebrecht3-2/+10
Signed-off-by: Nicolas Sebrecht <nicolas.s.dev@gmx.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-09-11mailinfo: add '--scissors' to usage messageLibravatar Nicolas Sebrecht1-1/+1
Signed-off-by: Nicolas Sebrecht <nicolas.s.dev@gmx.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-09-10INSTALL: Describe dependency knobs from MakefileLibravatar Brian Gernhardt1-14/+24
We said that some of our dependencies were optional, but didn't say how to turn them off. Add information for that and mention where to save the options close to the top of the file. Also, standardize on both using quotes for the names of the dependencies and tabs for indentation of the list. Signed-off-by: Brian Gernhardt <brian@gernhardtsoftware.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-09-10INSTALL: Reorder dependencies, split shell and PerlLibravatar Brian Gernhardt1-5/+9
The most important and non-optional dependencies should go first, so put them there. While we're moving them, the descriptions for shell and perl were archaic, referring to "bare-bones Porcelainish scripts" that have become powerful and essential. Signed-off-by: Brian Gernhardt <brian@gernhardtsoftware.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-09-10git-p4: Avoid modules deprecated in Python 2.6.Libravatar Reilly Grant1-7/+5
The popen2, sha and sets modules are deprecated in Python 2.6 (sha in Python 2.5). Both popen2 and sha are not actually used in git-p4. Replace usage of sets.Set with the builtin set object. The built-in set object was added in Python 2.4 and is already used in other parts of this script, so this dependency is nothing new. Signed-off-by: Reilly Grant <reillyeon@qotw.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-09-10Makefile: Add NEEDS_CRYPTO_WITH_SSLLibravatar Brian Gernhardt1-1/+7
The Makefile comment for NEEDS_SSL_WITH_CRYPTO says to define it "if you need -lcrypto with -lssl (Darwin)." However, what it actually does is add -lssl when you use -lcrypto and not the other way around. However, libcrypto contains a majority of the ERR_* functions from OpenSSL (at least on OS X) so we need it both ways. So, add NEEDS_CRYPTO_WITH_SSL which adds -lcrypto to the OpenSSL link flags and clarify the difference between it and NEEDS_SSL_WITH_CRYPTO. Signed-off-by: Brian Gernhardt <brian@gernhardtsoftware.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-09-09git.el: Use git-add-file for unmerged files, remove git-resolve-fileLibravatar Martin Nordholts1-12/+1
Use `git-add-file' to mark unmerged files as resolved in the *git-status* buffer to be consistent with git's CLI instructions. Also remove `git-resolve-file' to make it clear that that "R" is a now a free keybinding. Signed-off-by: Martin Nordholts <martinn@src.gnome.org> Acked-by: Alexandre Julliard <julliard@winehq.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-09-08INSTALL: Update description of our SHA-1 codeLibravatar Brian Gernhardt1-2/+2
We haven't had Mozilla's code or an ARM optimized algorithm since 30ae47b. Reword the paragraph to give credit but not authorship to Mozilla. Signed-off-by: Brian Gernhardt <brian@gernhardtsoftware.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-09-07GIT 1.6.5-rc0Libravatar Junio C Hamano1-6/+27
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-09-07Merge branch 'maint'Libravatar Junio C Hamano2-15/+20
* maint: git-pull: do not mention --quiet and --verbose twice githooks.txt: put hooks into subsections
2009-09-07git-pull: do not mention --quiet and --verbose twiceLibravatar Emmanuel Trillaud1-0/+2
git-pull.txt includes fetch-options.txt and merge-options.txt, both of which document the --quiet and --verbose. Supress the ones from fetch-options.txt. Signed-off-by: Emmanuel Trillaud <etrillaud@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-09-07githooks.txt: put hooks into subsectionsLibravatar Bert Wesarg1-15/+18
All hooks are currently in its own section. Which may confuse users, because the section name serves as the hook file name and sections are all caps for man pages. Putting them into a new HOOKS section and each hook into a subsection keeps the case to lower case. Signed-off-by: Bert Wesarg <bert.wesarg@googlemail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-09-07Merge branch 'jc/mailinfo-scissors'Libravatar Junio C Hamano12-27/+395
* jc/mailinfo-scissors: mailinfo.scissors: new configuration am/mailinfo: Disable scissors processing by default Documentation: describe the scissors mark support of "git am" Teach mailinfo to ignore everything before -- >8 -- mark builtin-mailinfo.c: fix confusing internal API to mailinfo()
2009-09-07Merge branch 'jk/clone-b'Libravatar Junio C Hamano3-28/+122
* jk/clone-b: clone: add --branch option to select a different HEAD
2009-09-07Merge branch 'jc/upload-pack-hook'Libravatar Junio C Hamano4-2/+172
* jc/upload-pack-hook: upload-pack: feed "kind [clone|fetch]" to post-upload-pack hook upload-pack: add a trigger for post-upload-pack hook
2009-09-07Merge branch 'tr/reset-checkout-patch'Libravatar Junio C Hamano14-73/+674
* tr/reset-checkout-patch: stash: simplify defaulting to "save" and reject unknown options Make test case number unique tests: disable interactive hunk selection tests if perl is not available DWIM 'git stash save -p' for 'git stash -p' Implement 'git stash save --patch' Implement 'git checkout --patch' Implement 'git reset --patch' builtin-add: refactor the meat of interactive_add() Add a small patch-mode testing library git-apply--interactive: Refactor patch mode code Make 'git stash -k' a short form for 'git stash save --keep-index'
2009-09-07Merge branch 'np/maint-1.6.3-deepen'Libravatar Junio C Hamano2-2/+34
* np/maint-1.6.3-deepen: pack-objects: free preferred base memory after usage make shallow repository deepening more network efficient
2009-09-07grep: accept relative paths outside current working directoryLibravatar Clemens Buchacher3-27/+29
"git grep" would barf at relative paths pointing outside the current working directory (or subdirectories thereof). Use quote_path_relative(), which can handle such cases just fine. [jc: added tests.] Signed-off-by: Clemens Buchacher <drizzd@aon.at> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-09-07grep: fix exit status if external_grep() puntsLibravatar Clemens Buchacher1-0/+1
If external_grep() is called and punts, grep_cache() mistakenly reported a hit, even if there were none. The bug can be triggered by calling "git grep --no-color" from a subdirectory. Signed-off-by: Clemens Buchacher <drizzd@aon.at> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-09-06Merge branch 'maint'Libravatar Junio C Hamano1-3/+3
* maint: push: re-flow non-fast-forward message push: fix english in non-fast-forward message
2009-09-06push: re-flow non-fast-forward messageLibravatar Jeff King1-3/+3
The extreme raggedness of the right edge make this jarring to read. Let's re-flow the text to fill the lines in a more even way. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-09-06push: fix english in non-fast-forward messageLibravatar Jeff King1-1/+1
We must use an article when referring to the section because it is a non-proper noun, and it must be the definite article because we are referring to a specific section. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-09-05Do not scramble password read from .cvspassLibravatar Pascal Obry1-3/+3
Passwords stored in .cvspass are already scrambled, we do not want to scramble them twice. Only passwords read from the command line are scrambled. This fixes a regression introduced by b2139db (git-cvsimport: add support for cvs pserver password scrambling., 2009-08-14). Signed-off-by: Pascal Obry <pascal@obry.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-09-05pack-objects: free preferred base memory after usageLibravatar Nicolas Pitre1-0/+28
When adding objects for preferred delta base, the content from tree objects leading to given paths is kept in a cache. This has the potential to grow significantly, especially with large directories as the whole tree object content is loaded in memory, even if in practice the number of those objects is limited to the 256 cache entries plus the $window root tree objects. Still, that can't hurt freeing that up after object enumeration is done, and before more memory is needed for delta search. Signed-off-by: Nicolas Pitre <nico@cam.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-09-05make shallow repository deepening more network efficientLibravatar Nicolas Pitre1-2/+6
First of all, I can't find any reason why thin pack generation is explicitly disabled when dealing with a shallow repository. The possible delta base objects are collected from the edge commits which are always obtained through history walking with the same shallow refs as the client, Therefore the client is always going to have those base objects available. So let's remove that restriction. Then we can make shallow repository deepening much more efficient by using the remote's unshallowed commits as edge commits to get preferred base objects for thin pack generation. On git.git, this makes the data transfer for the deepening of a shallow repository from depth 1 to depth 2 around 134 KB instead of 3.68 MB. Signed-off-by: Nicolas Pitre <nico@cam.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-09-03Use a clearer style to issue commands to remote helpersLibravatar Daniel Barkalow1-7/+14
This style is overkill for some commands, but it's worthwhile to use the same style to issue all commands, and it's useful to avoid open-coding string lengths. Signed-off-by: Daniel Barkalow <barkalow@iabervon.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-09-03Make the "traditionally-supported" URLs a special caseLibravatar Daniel Barkalow4-22/+6
Instead of trying to make http://, https://, and ftp:// URLs indicative of some sort of pattern of transport helper usage, make them a special case which runs the "curl" helper, and leave the mechanism by which arbitrary helpers will be chosen entirely to future work. Signed-off-by: Daniel Barkalow <barkalow@iabervon.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-09-03Merge branch 'maint'Libravatar Junio C Hamano1-1/+1
* maint: git-clone: add missing comma in --reference documentation
2009-09-03Merge branch 'maint-1.6.3' into maintLibravatar Junio C Hamano4-24/+28
* maint-1.6.3: git-clone: add missing comma in --reference documentation git-cvsserver: no longer use deprecated 'git-subcommand' commands clone: disconnect transport after fetching
2009-09-03Merge branch 'maint-1.6.2' into maint-1.6.3Libravatar Junio C Hamano3-4/+8
* maint-1.6.2: git-clone: add missing comma in --reference documentation clone: disconnect transport after fetching
2009-09-03git-clone: add missing comma in --reference documentationLibravatar Miklos Vajna1-1/+1
Signed-off-by: Miklos Vajna <vmiklos@frugalware.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-09-02Merge branch 'maint'Libravatar Junio C Hamano3-23/+27
* maint: git-cvsserver: no longer use deprecated 'git-subcommand' commands clone: disconnect transport after fetching
2009-09-02Merge branch 'maint-1.6.3' into maintLibravatar Junio C Hamano3-23/+27
* maint-1.6.3: git-cvsserver: no longer use deprecated 'git-subcommand' commands clone: disconnect transport after fetching
2009-09-02push: teach --quiet to suppress "Everything up-to-date"Libravatar Jeff King1-1/+1
This should have been part of 481c7a6, whose goal was to make "git push -q" silent unless there is an error. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-09-02Merge branch 'maint-1.6.2' into maint-1.6.3Libravatar Junio C Hamano2-3/+7
* maint-1.6.2: clone: disconnect transport after fetching