aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAge
* Add a test for merging changed and rename-changed branchesAlex Riesen2007-04-25
| | | | | | | Also leave a warning for future merge-recursive explorers. Signed-off-by: Alex Riesen <raa.lkml@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
* Avoid excessive rewrites in merge-recursiveAlex Riesen2007-04-25
| | | | | | | | | If a file is changed in one branch, and renamed and changed to the same content in another branch than we can skip the rewrite of this file in the working directory, as the content does not change. Signed-off-by: Alex Riesen <raa.lkml@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
* Merge branch 'maint'Junio C Hamano2007-04-25
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * maint: Start preparing for 1.5.1.3 Sanitize @to recipients. git-svn: Ignore usernames in URLs in find_by_url Document --dry-run and envelope-sender for git-send-email. Allow users to optionally specify their envelope sender. Ensure clean addresses are always used with Net::SMTP Validate @recipients before using it for sendmail and Net::SMTP. Perform correct quoting of recipient names. Change the scope of the $cc variable as it is not needed outside of send_message. Debugging cleanup improvements Prefix Dry- to the message status to denote dry-runs. Document --dry-run parameter to send-email. git-svn: Don't rely on $_ after making a function call Fix handle leak in write_tree Actually handle some-low memory conditions Conflicts: RelNotes git-send-email.perl
| * Start preparing for 1.5.1.3Junio C Hamano2007-04-25
| | | | | | | | Signed-off-by: Junio C Hamano <junkio@cox.net>
| * Sanitize @to recipients.Robin H. Johnson2007-04-25
| | | | | | | | | | | | | | We need to sanitize @to as well to ensure that names are properly quoted. Signed-off-by: Robin H. Johnson <robbat2@gentoo.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
| * git-svn: Ignore usernames in URLs in find_by_urlAdam Roben2007-04-25
| | | | | | | | | | | | | | | | | | Usernames don't matter for the purposes of find_by_url, so always remove them before doing any comparisons. Signed-off-by: Adam Roben <aroben@apple.com> Acked-by: Eric Wong <normalperson@yhbt.net> Signed-off-by: Junio C Hamano <junkio@cox.net>
| * Document --dry-run and envelope-sender for git-send-email.Robin H. Johnson2007-04-25
| | | | | | | | | | | | | | Catch the documentation up with the rest of this patchset. Signed-off-by: Robin H. Johnson <robbat2@gentoo.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
| * Allow users to optionally specify their envelope sender.Robin H. Johnson2007-04-25
| | | | | | | | | | | | | | | | | | | | | | | | | | If your normal user is not the same user you are subscribed to a list with, then the default envelope sender used will cause your messages to bounce or silently vanish into the ether. This patch provides an optional parameter to set the envelope sender. To use it with the sendmail binary, you must have privileges to use the -f parameter! Signed-off-by: Robin H. Johnson <robbat2@gentoo.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
| * Ensure clean addresses are always used with Net::SMTPRobin H. Johnson2007-04-25
| | | | | | | | | | | | | | | | Always pass in clean addresses to Net::SMTP for the MAIL FROM, and use them on the SMTP non-quiet output as well. Signed-off-by: Robin H. Johnson <robbat2@gentoo.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
| * Validate @recipients before using it for sendmail and Net::SMTP.Robin H. Johnson2007-04-25
| | | | | | | | | | | | | | | | | | Ensure that @recipients is only raw addresses when it is handed to the sendmail binary OR Net::SMTP, otherwise BCC cases might get an extra <, or wierd stuff might be passed to the exec. Signed-off-by: Robin H. Johnson <robbat2@gentoo.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
| * Perform correct quoting of recipient names.Robin H. Johnson2007-04-25
| | | | | | | | | | | | | | | | | | Always perform quoting of the recipient names if they contain periods, previously only the author's address was treated this way. This stops sendmail binaries from exploding the name into bad addresses. Signed-off-by: Robin H. Johnson <robbat2@gentoo.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
| * Change the scope of the $cc variable as it is not needed outside of ↵Robin H. Johnson2007-04-25
| | | | | | | | | | | | | | | | | | send_message. $cc is only used inside the send_message scope, so lets clean it out of the global scope. Signed-off-by: Robin H. Johnson <robbat2@gentoo.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
| * Debugging cleanup improvementsRobin H. Johnson2007-04-25
| | | | | | | | | | | | | | | | | | The debug output is much more helpful if it has the parameters that were used. Pull the sendmail parameters into a seperate array for that, and also include similar data during the Net::SMTP case. Signed-off-by: Robin H. Johnson <robbat2@gentoo.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
| * Prefix Dry- to the message status to denote dry-runs.Robin H. Johnson2007-04-25
| | | | | | | | | | | | | | | | While doing testing, it's useful to see that a dry run was actually done, instead of a real one. Signed-off-by: Robin H. Johnson <robbat2@gentoo.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
| * Document --dry-run parameter to send-email.Robin H. Johnson2007-04-25
| | | | | | | | | | | | | | Looks like --dry-run was added to the code, but never to the --help output. Signed-off-by: Robin H. Johnson <robbat2@gentoo.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
| * git-svn: Don't rely on $_ after making a function callAdam Roben2007-04-25
| | | | | | | | | | | | | | | | | | | | Many functions and operators in perl set $_, so its value cannot be relied upon after calling arbitrary functions. The solution is simply to copy the value of $_ into a local variable that will not get overwritten. Signed-off-by: Adam Roben <aroben@apple.com> Acked-by: Eric Wong <normalperson@yhbt.net> Signed-off-by: Junio C Hamano <junkio@cox.net>
| * Fix handle leak in write_treeAlex Riesen2007-04-25
| | | | | | | | | | | | | | | | | | | | | | This is a quick and dirty fix for the broken "git cherry-pick -n" on some broken OS, which does not remove the directory entry after unlink succeeded(!) if the file is still open somewher. The entry is left but "protected": no open, no unlink, no stat. Very annoying. Signed-off-by: Alex Riesen <raa.lkml@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
| * Actually handle some-low memory conditionsShawn O. Pearce2007-04-25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tim Ansell discovered his Debian server didn't permit git-daemon to use as much memory as it needed to handle cloning a project with a 128 MiB packfile. Filtering the strace provided by Tim of the rev-list child showed this gem of a sequence: open("./objects/pack/pack-*.pack", O_RDONLY|O_LARGEFILE <unfinished ...> <... open resumed> ) = 5 OK, so the packfile is fd 5... mmap2(NULL, 33554432, PROT_READ, MAP_PRIVATE, 5, 0 <unfinished ...> <... mmap2 resumed> ) = 0xb5e2d000 and we mapped one 32 MiB window from it at position 0... mmap2(NULL, 31020635, PROT_READ, MAP_PRIVATE, 5, 0x6000 <unfinished ...> <... mmap2 resumed> ) = -1 ENOMEM (Cannot allocate memory) And we asked for another window further into the file. But got denied. In Tim's case this was due to a resource limit on the git-daemon process, and its children. Now where are we in the code? We're down inside use_pack(), after we have called unuse_one_window() enough times to make sure we stay within our allowed maximum window size. However since we didn't unmap the prior window at 0xb5e2d000 we aren't exceeding the current limit (which probably was just the defaults). But we're actually down inside xmmap()... So we release the window we do have (by calling release_pack_memory), assuming there is some memory pressure... munmap(0xb5e2d000, 33554432 <unfinished ...> <... munmap resumed> ) = 0 close(5 <unfinished ...> <... close resumed> ) = 0 And that was the last window in this packfile. So we closed it. Way to go us. Our xmmap did not expect release_pack_memory to close the fd its about to map... mmap2(NULL, 31020635, PROT_READ, MAP_PRIVATE, 5, 0x6000 <unfinished ...> <... mmap2 resumed> ) = -1 EBADF (Bad file descriptor) And so the Linux kernel happily tells us f' off. write(2, "fatal: ", 7 <unfinished ...> <... write resumed> ) = 7 write(2, "Out of memory? mmap failed: Bad "..., 47 <unfinished ...> <... write resumed> ) = 47 And we report the bad file descriptor error, and not the ENOMEM, and die, claiming we are out of memory. But actually that mmap should have succeeded, as we had enough memory for that window, seeing as how we released the prior one. Originally when I developed the sliding window mmap feature I had this exact same bug in fast-import, and I dealt with it by handing in the struct packed_git* we want to open the new window for, as the caller wasn't prepared to reopen the packfile if unuse_one_window closed it. The same is true here from xmmap, but the caller doesn't have the struct packed_git* handy. So I'm using the file descriptor instead to perform the same test. Signed-off-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
* | Add --date={local,relative,default}Junio C Hamano2007-04-25
| | | | | | | | | | | | | | | | | | | | | | This adds --date={local,relative,default} option to log family of commands, to allow displaying timestamps in user's local timezone, relative time, or the default format. Existing --relative-date option is a synonym of --date=relative; we could probably deprecate it in the long run. Signed-off-by: Junio C Hamano <junkio@cox.net>
* | init_buffer(): Kill buf pointerLuiz Fernando N. Capitulino2007-04-25
| | | | | | | | | | | | | | We don't need it, it's possible to assign the block of memory to bufp Signed-off-by: Luiz Fernando N. Capitulino <lcapitulino@mandriva.com.br> Signed-off-by: Junio C Hamano <junkio@cox.net>
* | core-tutorial: minor fixesLuiz Fernando N. Capitulino2007-04-25
| | | | | | | | | | | | | | | | - Do not break the line when it's not needed - s/Your/You Signed-off-by: Luiz Fernando N. Capitulino <lcapitulino@mandriva.com.br> Signed-off-by: Junio C Hamano <junkio@cox.net>
* | read_cache_from(): small simplificationLuiz Fernando N. Capitulino2007-04-25
| | | | | | | | | | | | | | | | This change 'opens' the code block which maps the index file into memory, making the code clearer and easier to read. Signed-off-by: Luiz Fernando N. Capitulino <lcapitulino@mandriva.com.br> Signed-off-by: Junio C Hamano <junkio@cox.net>
* | entry.c: Use const qualifier for 'struct checkout' parametersLuiz Fernando N. Capitulino2007-04-25
| | | | | | | | | | Signed-off-by: Luiz Fernando N. Capitulino <lcapitulino@mandriva.com.br> Signed-off-by: Junio C Hamano <junkio@cox.net>
* | remove_subtree(): Use strerror() when possibleLuiz Fernando N. Capitulino2007-04-25
| | | | | | | | | | Signed-off-by: Luiz Fernando N. Capitulino <lcapitulino@mandriva.com.br> Signed-off-by: Junio C Hamano <junkio@cox.net>
* | Merge branch 'jc/the-index'Junio C Hamano2007-04-24
|\ \ | | | | | | | | | | | | | | | * jc/the-index: Make read-cache.c "the_index" free. Move index-related variables into a structure.
| * | Make read-cache.c "the_index" free.Junio C Hamano2007-04-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This makes all low-level functions defined in read-cache.c to take an explicit index_state structure as their first parameter, to specify which index to work on. These functions traditionally operated on "the_index" and were named foo_cache(); the counterparts this patch introduces are called foo_index(). The traditional foo_cache() functions are made into macros that give "the_index" to their corresponding foo_index() functions. Signed-off-by: Junio C Hamano <junkio@cox.net>
| * | Move index-related variables into a structure.Junio C Hamano2007-04-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | This defines a index_state structure and moves index-related global variables into it. Currently there is one instance of it, the_index, and everybody accesses it, so there is no code change. Signed-off-by: Junio C Hamano <junkio@cox.net>
* | | Merge branch 'mk/diff'Junio C Hamano2007-04-24
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * mk/diff: Diff between two blobs should take mode changes into account now. use mode of the tree in git-diff, if <tree>:<file> syntax is used store mode in rev_list, if <tree>:<filename> syntax is used add add_object_array_with_mode add get_sha1_with_mode Add S_IFINVALID mode
| * | | Diff between two blobs should take mode changes into account now.Junio C Hamano2007-04-24
| | | | | | | | | | | | | | | | Signed-off-by: Junio C Hamano <junkio@cox.net>
| * | | use mode of the tree in git-diff, if <tree>:<file> syntax is usedMartin Koegler2007-04-24
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Martin Koegler <mkoegler@auto.tuwien.ac.at> Signed-off-by: Junio C Hamano <junkio@cox.net>
| * | | store mode in rev_list, if <tree>:<filename> syntax is usedMartin Koegler2007-04-24
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Martin Koegler <mkoegler@auto.tuwien.ac.at> Signed-off-by: Junio C Hamano <junkio@cox.net>
| * | | add add_object_array_with_modeMartin Koegler2007-04-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Each object in struct object_array is extended with the mode. If not specified, S_IFINVALID is used. An object with an mode value can be added with add_object_array_with_mode. Signed-off-by: Martin Koegler <mkoegler@auto.tuwien.ac.at> Signed-off-by: Junio C Hamano <junkio@cox.net>
| * | | add get_sha1_with_modeMartin Koegler2007-04-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | get_sha1_with_mode basically behaves as get_sha1. It has an additional parameter for storing the mode of the object. If the mode can not be determined, it stores S_IFINVALID. Signed-off-by: Martin Koegler <mkoegler@auto.tuwien.ac.at> Signed-off-by: Junio C Hamano <junkio@cox.net>
| * | | Add S_IFINVALID modeMartin Koegler2007-04-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | S_IFINVALID is used to signal, that no mode information is available. Signed-off-by: Martin Koegler <mkoegler@auto.tuwien.ac.at> Signed-off-by: Junio C Hamano <junkio@cox.net>
* | | | Merge branch 'maint'Junio C Hamano2007-04-24
|\ \ \ \ | | |_|/ | |/| | | | | | | | | | | | | | | | | | * maint: Remove usernames from all commit messages, not just when using svmprops applymbox & quiltimport: typofix. Create a sysconfdir variable, and use it for ETC_GITCONFIG
| * | | Remove usernames from all commit messages, not just when using svmpropsAdam Roben2007-04-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Sam Vilain <sam.vilain@catalyst.net.nz> Signed-off-by: Adam Roben <aroben@apple.com> Acked-by: Eric Wong <normalperson@yhbt.net> Signed-off-by: Junio C Hamano <junkio@cox.net>
| * | | applymbox & quiltimport: typofix.Junio C Hamano2007-04-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 6777c380 fixed only one of three typos introduced in an earlier patch 87ab7992. This fixes the other two. Signed-off-by: Junio C Hamano <junkio@cox.net>
| * | | Create a sysconfdir variable, and use it for ETC_GITCONFIGJosh Triplett2007-04-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ETC_GITCONFIG defaults to $(prefix)/etc/gitconfig, so if you just set prefix=/usr, you end up with a git that looks in /usr/etc/gitconfig, rather than /etc/gitconfig as specified by the FHS. Furthermore, setting ETC_GITCONFIG does not fix the paths to any future system-wide configuration files. Factor out the path to the system-wide configuration directory into a variable sysconfdir, normally set to $(prefix)/etc, but set to /etc when prefix=/usr . This fixes the prefix=/usr problem for ETC_GITCONFIG, and allows centralized configuration of any future system-wide configuration files without requiring further action from package maintainers or other people building and installing git. Signed-off-by: Josh Triplett <josh@freedesktop.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
* | | | Merge branch 'master' of git://repo.or.cz/git/fastimportJunio C Hamano2007-04-24
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 'master' of git://repo.or.cz/git/fastimport: fast-import: size_t vs ssize_t fix importing of subversion tars Don't repack existing objects in fast-import
| * | | | fast-import: size_t vs ssize_tSami Farin2007-04-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | size_t is unsigned, so (n < 0) is never true. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
| * | | | fix importing of subversion tarsUwe Kleine-König2007-04-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | add a / between the prefix and name fields of the tar archive if prefix is non-empty. Signed-off-by: Uwe Kleine-König <ukleinek@informatik.uni-freiburg.de> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
| * | | | Don't repack existing objects in fast-importShawn O. Pearce2007-04-20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some users of fast-import have been trying to use it to rewrite commits and trees, an activity where the all of the relevant blobs are already available from the existing packfiles. In such a case we don't want to repack a blob, even if the frontend application has supplied us the raw data rather than a mark or a SHA-1 name. I'm intentionally only checking the packfiles that existed when fast-import started and am always ignoring all loose object files. We ignore loose objects because fast-import tends to operate on a very large number of objects in a very short timespan, and it is usually creating new objects, not reusing existing ones. In such a situtation the majority of the objects will not be found in the existing packfiles, nor will they be loose object files. If the frontend application really wants us to look at loose object files, then they can just repack the repository before running fast-import. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
* | | | | gitattributes documentation: clarify overridingJunio C Hamano2007-04-24
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Junio C Hamano <junkio@cox.net>
* | | | | t/test-lib.sh: Protect ourselves from common misconfigurationJunio C Hamano2007-04-24
| |_|/ / |/| | | | | | | | | | | | | | | | | | | that exports CDPATH to the environment Signed-off-by: Junio C Hamano <junkio@cox.net>
* | | | Merge branch 'maint'Junio C Hamano2007-04-24
|\ \ \ \ | | |/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * maint: Documentation/git-reset.txt: suggest git commit --amend in example. Build RPM with ETC_GITCONFIG=/etc/gitconfig Ignore all man sections as they are generated files. Fix typo in git-am: s/Was is/Was it/ Reverse the order of -b and --track in the man page. dir.c(common_prefix): Fix two bugs Conflicts: git.spec.in
| * | | Documentation/git-reset.txt: suggest git commit --amend in example.Gerrit Pape2007-04-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | In example 'Undo a commit and redo', refer to 'git commit --amend', as this is the easier alternative. Signed-off-by: Junio C Hamano <junkio@cox.net>
| * | | Build RPM with ETC_GITCONFIG=/etc/gitconfigJunio C Hamano2007-04-23
| | | | | | | | | | | | | | | | Signed-off-by: Junio C Hamano <junkio@cox.net>
| * | | Ignore all man sections as they are generated files.Brian Gernhardt2007-04-23
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Brian Gernhardt <benji@silverinsanity.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
| * | | Fix typo in git-am: s/Was is/Was it/Josh Triplett2007-04-23
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Josh Triplett <josh@freedesktop.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
| * | | Reverse the order of -b and --track in the man page.Brian Gernhardt2007-04-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Using "-b --track newbranch oldbranch" gives the error: git checkout: updating paths is incompatible with switching branches/forcing However, "--track -b ..." works just fine. Signed-off-by: Brian Gernhardt <benji@silverinsanity.com> Signed-off-by: Junio C Hamano <junkio@cox.net>