summaryrefslogtreecommitdiff
path: root/t
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'jc/remote'Junio C Hamano2007-06-161-0/+164
|\ | | | | | | | | | | | | | | | | | | * jc/remote: git-push: Update description of refspecs and add examples remote.c: "git-push frotz" should update what matches at the source. remote.c: fix "git push" weak match disambiguation remote.c: minor clean-up of match_explicit() remote.c: refactor creation of new dst ref remote.c: refactor match_explicit_refs()
| * remote.c: "git-push frotz" should update what matches at the source.Junio C Hamano2007-06-091-0/+52
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Earlier, when the local repository has a branch "frotz" and the remote repository has a tag "frotz" (but not branch "frotz"), "git-push frotz" mistakenly updated the tag at the remote side. This was because the partial refname matching code was applied independently on both source and destination side. With this fix, when a colon-less refspec is given to git-push, we first match it with the refs in the source repository, and update the matching ref in the destination repository. Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * remote.c: fix "git push" weak match disambiguationJunio C Hamano2007-06-091-0/+112
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When "git push A:B" is given, and A (or B) is not a full refname that begins with refs/, we require an unambiguous match with an existing ref. For this purpose, a match with a local branch or a tag (i.e. refs/heads/A and refs/tags/A) is called a "strong match", and any other match is called a "weak match". A partial refname is unambiguous when there is only one strong match with any number of weak matches, or when there is only one weak match and no other match. However, as reported by Sparse with Ramsay Jones recently, count_refspec_match() function had a bug where a variable in an inner block masked a different variable of the same name, which caused the weak matches to be ignored. This fixes it, and adds tests for the fix. Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | Merge branch 'gp/branch'Junio C Hamano2007-06-161-0/+9
|\ \ | | | | | | | | | | | | * gp/branch: git-branch: cleanup config file when deleting branches
| * | git-branch: cleanup config file when deleting branchesGerrit Pape2007-06-091-0/+9
| |/ | | | | | | | | | | | | When deleting branches, remove the sections referring to these branches from the config file. Signed-off-by: Gerrit Pape <pape@smarden.org>
* | Merge branch 'fl/cvsserver'Junio C Hamano2007-06-161-0/+45
|\ \ | | | | | | | | | | | | | | | | | | * fl/cvsserver: cvsserver: Actually implement --export-all cvsserver: Let --base-path and pserver get along just fine cvsserver: Add some useful commandline options
| * | cvsserver: Actually implement --export-allFrank Lichtenheld2007-06-151-0/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Embarrassing bug number two in my options patch. Also enforce that --export-all is only ever used together with an explicit whitelist. Otherwise people might export every git repository on the whole system without realising. Signed-off-by: Frank Lichtenheld <frank@lichtenheld.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | cvsserver: Let --base-path and pserver get along just fineFrank Lichtenheld2007-06-151-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Embarassing bug number one in my options patch. Since the code for --base-path support rewrote the cvsroot value after comparing it with a possible existing value (i.e. from pserver authentication) the check always failed. Signed-off-by: Frank Lichtenheld <frank@lichtenheld.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | cvsserver: Add some useful commandline optionsFrank Lichtenheld2007-06-081-0/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make git-cvsserver understand some options inspired by git-daemon, namely --base-path, --export-all, --strict-paths. Also allow the caller to specify a whitelist of allowed directories, again similar to git-daemon. While already adding option parsing also support the common --help and --version options. Rationale: While the gitcvs.enabled configuration option already offers means to limit git-cvsserver access to a repository, there are some use cases where other methods of access control prove to be more useful. E.g. if setting up a pserver for a collection of public repositories one might want limit the exported repositories to exactly the directory this collection is located whithout having to worry about other repositories that might lie around with the configuration variable set (never trust your users ;) Signed-off-by: Frank Lichtenheld <frank@lichtenheld.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | Merge branch 'lh/submodule'Junio C Hamano2007-06-161-5/+17
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lh/submodule: gitmodules(5): remove leading period from synopsis Add gitmodules(5) git-submodule: give submodules proper names Rename sections from "module" to "submodule" in .gitmodules git-submodule: remember to checkout after clone t7400: barf if git-submodule removes or replaces a file
| * | | git-submodule: give submodules proper namesLars Hjemli2007-06-121-4/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This changes the way git-submodule uses .gitmodules: Subsections no longer specify the submodule path, they now specify the submodule name. The submodule path is found under the new key "submodule.<name>.path", which is a required key. With this change a submodule can be moved between different 'checkout paths' without upsetting git-submodule. Signed-off-by: Lars Hjemli <hjemli@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | Rename sections from "module" to "submodule" in .gitmodulesLars Hjemli2007-06-121-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Rename [module] to [submodule], so that it would be more forward compatible with the proposed extension by harmonizing the section names used in .gitmodules and .git/config. Signed-off-by: Lars Hjemli <hjemli@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | t7400: barf if git-submodule removes or replaces a fileLars Hjemli2007-06-121-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The test for an unmolested file wouldn't fail properly if the file had been removed or replaced by something other than a regular file. This fixes it. Signed-off-by: Lars Hjemli <hjemli@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | git-svn: test for creating new directories over svn://Eric Wong2007-06-131-0/+40
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As reported by Matthieu Moy, this is causing svnserve to terminate connections, because it segfaults. This test is disabled by default and can be enabled by setting SVNSERVE_PORT to an unbound (for 127.0.0.1) TCP port in the environment (in addition to SVN_TESTS=1). I'm not comfortable with having a test start a daemon by default and take up a port that could potentially stay running if the test failed. Signed-off-by: Eric Wong <normalperson@yhbt.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | Merge branch 'lh/submodule'Junio C Hamano2007-06-121-12/+26
|\ \ \ | |_|/ |/| | | | | | | | | | | * lh/submodule: git-submodule: clone during update, not during init git-submodule: move cloning into a separate function
| * | git-submodule: clone during update, not during initLars Hjemli2007-06-061-12/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This teaches 'git-submodule init' to register submodule paths and urls in .git/config instead of actually cloning them. The cloning is now handled as part of 'git-submodule update'. With this change it is possible to specify preferred/alternate urls for the submodules in .git/config before the submodules are cloned. Signed-off-by: Lars Hjemli <hjemli@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | t5000: silence unzip availability checkRené Scharfe2007-06-091-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | unzip -v on (at least) Ubuntu prints a screenful of version info to stdout. Get rid of it since we only want to know if unzip is installed or not. Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
* | | Merge branch 'js/merge'Junio C Hamano2007-06-091-0/+5
|\ \ \ | | | | | | | | | | | | | | | | * js/merge: git-merge-file: refuse to merge binary files
| * | | git-merge-file: refuse to merge binary filesJohannes Schindelin2007-06-041-0/+5
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | Merge branch 'ar/wildcardpush'Junio C Hamano2007-06-081-0/+82
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | * ar/wildcardpush: Test wildcard push/fetch Fix push with refspecs containing wildcards
| * | | | Test wildcard push/fetchJunio C Hamano2007-06-081-0/+82
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | Merge branch 'ar/clone'Junio C Hamano2007-06-081-0/+46
|\ \ \ \ \ | |_|_|_|/ |/| | | | | | | | | | | | | | * ar/clone: Fix clone to setup the origin if its name ends with .git
| * | | | Fix clone to setup the origin if its name ends with .gitAlex Riesen2007-06-061-0/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The problem is visible when cloning a local repo. The cloned repository will have the origin url setup incorrectly: the origin name will be copied verbatim in origin url of the cloned repository. Normally, the name is to be expanded into absolute path. Signed-off-by: Alex Riesen <raa.lkml@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | Merge branch 'maint'Junio C Hamano2007-06-081-0/+40
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | * maint: checkout: do not get confused with ambiguous tag/branch names
| * | | | | checkout: do not get confused with ambiguous tag/branch namesJunio C Hamano2007-06-081-0/+40
| |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Although it is not advisable, we have always allowed a branch and a tag to have the same basename (i.e. it is not illegal to have refs/heads/frotz and refs/tags/frotz at the same time). When talking about a specific commit, the interpretation of 'frotz' has always been "use tag and then check branch", although we warn when ambiguities exist. However "git checkout $name" is defined to (1) first see if it matches the branch name, and if so switch to that branch; (2) otherwise it is an instruction to detach HEAD to point at the commit named by $name. We did not follow this definition when $name appeared under both refs/heads/ and refs/tags/ -- we switched to the branch but read the tree from the tagged commit, which was utterly bogus. Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | cvsserver: Make req_Root more critical of its input dataFrank Lichtenheld2007-06-081-0/+34
| |/ / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The path submitted with the Root request has to be absolute (cvs does it this way and it may save us some sanity checks later) If multiple roots are specified (e.g. because we use pserver authentication which will already include the root), ensure that they say all the same. Probably neither is a security risk, and neither should ever be triggered by a sane client, but when validating input data, it's better to be save than sorry. Signed-off-by: Frank Lichtenheld <frank@lichtenheld.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | War on whitespaceJunio C Hamano2007-06-0730-50/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This uses "git-apply --whitespace=strip" to fix whitespace errors that have crept in to our source files over time. There are a few files that need to have trailing whitespaces (most notably, test vectors). The results still passes the test, and build result in Documentation/ area is unchanged. Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | t5000: skip ZIP tests if unzip was not foundJohannes Schindelin2007-06-061-0/+7
| |_|/ |/| | | | | | | | | | | Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | git-branch --track: fix tracking branch computation.Junio C Hamano2007-06-061-4/+12
| |/ |/| | | | | | | | | | | The original code did not take hierarchical branch names into account at all. Tested-by: Gerrit Pape <pape@smarden.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | merge-recursive: refuse to merge binary filesJohannes Schindelin2007-06-041-0/+14
| | | | | | | | | | Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | gitweb: Handle non UTF-8 text betterMartin Koegler2007-06-031-0/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | gitweb assumes that everything is in UTF-8. If a text contains invalid UTF-8 character sequences, the text must be in a different encoding. This commit introduces $fallback_encoding which would be used as input encoding if gitweb encounters text with is not valid UTF-8. Add basic test for this in t/t9500-gitweb-standalone-no-errors.sh Signed-off-by: Martin Koegler <mkoegler@auto.tuwien.ac.at> Signed-off-by: Jakub Narebski <jnareb@gmail.com> Tested-by: Alexandre Julliard <julliard@winehq.org> Tested-by: Ismail Dönmez <ismail@pardus.org.tr> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| |
| \
*-. \ Merge branches 'lh/submodules' and 'pb/am'Junio C Hamano2007-06-021-0/+143
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lh/submodules: Add basic test-script for git-submodule Add git-submodule command * pb/am: Remove git-applypatch git-applymbox: Remove command
| * | | Add basic test-script for git-submoduleLars Hjemli2007-06-021-0/+143
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This test tries to verify basic sanity of git-submodule, i.e. that it is able to clone and update a submodule repository, that its status output is sane, and that it barfs when the submodule path is occupied during init. Signed-off-by: Lars Hjemli <hjemli@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
* | | | Merge branch 'sp/pack'Junio C Hamano2007-06-021-0/+10
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * sp/pack: Style nit - don't put space after function names Ensure the pack index is opened before access Simplify index access condition in count-objects, pack-redundant Test for recent rev-parse $abbrev_sha1 regression rev-parse: Identify short sha1 sums correctly. Attempt to delay prepare_alt_odb during get_sha1 Micro-optimize prepare_alt_odb Lazily open pack index files on demand
| * | | | Test for recent rev-parse $abbrev_sha1 regressionShawn O. Pearce2007-05-291-0/+10
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | My recent patch "Lazily open pack index files on demand" caused a regression in the case of parsing abbreviated SHA-1 object names. Git was unable to translate the abbreviated name into the full name if the object was packed, as the pack .idx files were not opened before being accessed. This is a simple test to repack a repository then test for an abbreviated SHA-1 within the packfile. Signed-off-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
* | | | Merge branch 'maint'Junio C Hamano2007-06-021-5/+5
|\ \ \ \ | | |_|/ | |/| | | | | | | | | | | | | | | | | | * maint: Use =20 when rfc2047 encoding spaces. Create a new manpage for the gitignore format, and reference it elsewhere Documentation: robustify asciidoc GIT_VERSION replacement
| * | | Use =20 when rfc2047 encoding spaces.Kristian Høgsberg2007-06-021-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Encode ' ' using '=20' even though rfc2047 allows using '_' for readability. Unfortunately, many programs do not understand this and just leave the underscore in place. Using '=20' seems to work better. [jc: with adjustment to t3901] Signed-off-by: Kristian Høgsberg <hoegsberg@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
* | | | Merge branch 'maint'Junio C Hamano2007-05-291-0/+36
|\ \ \ \ | |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * maint: cvsserver: Fix some typos in asciidoc documentation cvsserver: Note that CVS_SERVER can also be specified as method variable cvsserver: Correct inetd.conf example in asciidoc documentation user-manual: fixed typo in example Add test case for $Id$ expanded in the repository git-svn: avoid md5 calculation entirely if SVN doesn't provide one Makefile: Remove git-fsck and git-verify-pack from PROGRAMS Fix stupid typo in lookup_tag() git-gui: Guess our share/git-gui/lib path at runtime if possible Correct key bindings to Control-<foo> git-gui: Tighten internal pattern match for lib/ directory
| * | | Add test case for $Id$ expanded in the repositoryAndy Parkins2007-05-281-0/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This test case would have caught the bug fixed by revision c23290d5. It puts various forms of $Id$ into a file in the repository, without allowing git to collapse them to uniformity. Then enables the $Id$ expansion on checkout, and checks that what is checked out has coped with the various forms. Signed-off-by: Andy Parkins <andyparkins@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
* | | | cvsserver: Handle 'cvs login'Frank Lichtenheld2007-05-291-0/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since this is a trivial variation of the general pserver authentication, there is really no reason not to support it. Signed-off-by: Frank Lichtenheld <frank@lichtenheld.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
* | | | t9400: Work around CVS' deficienciesFrank Lichtenheld2007-05-291-0/+2
| |/ / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If we are too fast with our changes, the file in the working copy might still have the same mtime as noted in the CVS/Entries. This will cause CVS to happily report to the server that the file is unmodified which can lead to data loss (and in our case test failure). CVS sucks! Work around that by sleeping for a second. Signed-off-by: Frank Lichtenheld <frank@lichtenheld.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
* | | Merge branch 'maint'Junio C Hamano2007-05-262-3/+67
|\ \ \ | |/ / | | / | |/ |/| | | | | | | | | | | | | | | | | * maint: Fix git-svn to handle svn not reporting the md5sum of a file, and test. Fix mishandling of $Id$ expanded in the repository copy in convert.c More echo "$user_message" fixes. Add tests for the last two fixes. git-commit: use printf '%s\n' instead of echo on user-supplied strings git-am: use printf instead of echo on user-supplied strings Documentation: Add definition of "evil merge" to GIT Glossary Replace the last 'dircache's by 'index' Documentation: Clean up links in GIT Glossary
| * Merge branch 'maint-1.5.1' into maintJunio C Hamano2007-05-262-3/+67
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * maint-1.5.1: Fix git-svn to handle svn not reporting the md5sum of a file, and test. More echo "$user_message" fixes. Add tests for the last two fixes. git-commit: use printf '%s\n' instead of echo on user-supplied strings git-am: use printf instead of echo on user-supplied strings Documentation: Add definition of "evil merge" to GIT Glossary Replace the last 'dircache's by 'index' Documentation: Clean up links in GIT Glossary
| | * Fix git-svn to handle svn not reporting the md5sum of a file, and test.James Y Knight2007-05-261-0/+45
| | | | | | | | | | | | | | | Acked-by: Eric Wong <normalperson@yhbt.net> Signed-off-by: Junio C Hamano <junkio@cox.net>
| | * Add tests for the last two fixes.Junio C Hamano2007-05-261-3/+22
| | | | | | | | | | | | | | | | | | | | | | | | This updates t4014 to check the two fixes for git-am and git-commit we observed with "echo" that does backslash interpolation by default without being asked with -e option. Signed-off-by: Junio C Hamano <junkio@cox.net>
* | | Merge branch 'maint'Junio C Hamano2007-05-231-0/+29
|\ \ \ | |/ / | | | | | | | | | | | | | | | | | | | | | * maint: Fix possible coredump with fast-import --import-marks Refactor fast-import branch creation from existing commit fast-import: Fix crash when referencing already existing objects fast-import: Fix uninitialized variable Documentation: fix git-config.xml generation
| * | Fix possible coredump with fast-import --import-marksShawn O. Pearce2007-05-241-0/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When e8438420bb7d368bec3647b90c557b9931582267 allowed us to reload the marks table on subsequent runs of fast-import we really broke things, as we set pack_id to MAX_PACK_ID for any objects we imported into the marks table. Creating a branch from that mark should fail as we attempt to read the object through a non-existant packed_git pointer. Instead we have to use the normal Git object system to locate the older commit, as we ourselves do not have a reference to the packed_git it resides in. This bug only occurred because t9300 was not complete enough. When we added the --import-marks feature we didn't actually test its implementation enough to verify the function worked as intended. I have corrected that, and included the changes as part of this fix. Prior versions of fast-import fail the new test(s); this commit allows them to pass. Credit for this bug find goes to Simon Hausmann <simon@lst.de> as he recently identified a similiar bug in the tree lazy-loading path. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
* | | t9400: Add some basic pserver testsFrank Lichtenheld2007-05-221-0/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | While we can easily test the cvs <-> git-cvsserver communication with :fork: and git-cvsserver server there are some pserver specifics we should test, too. Currently this are two tests of the pserver authentication. Signed-off-by: Frank Lichtenheld <frank@lichtenheld.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
* | | t9400: Add some more cvs update testsFrank Lichtenheld2007-05-221-0/+69
| | | | | | | | | | | | | | | | | | | | | | | | | | | Add some cvs update tests that include various merge situations. Also add a basic test for update -C since it fits so well in there. Signed-off-by: Frank Lichtenheld <frank@lichtenheld.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
* | | t9400: Add test cases for config file handlingFrank Lichtenheld2007-05-221-0/+69
| | | | | | | | | | | | | | | | | | | | | | | | Add a few test cases for the config file parsing done by git-cvsserver. Signed-off-by: Frank Lichtenheld <frank@lichtenheld.de> Signed-off-by: Junio C Hamano <junkio@cox.net>