summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* remote.c: "git-push frotz" should update what matches at the source.Junio C Hamano2007-06-092-6/+53
| | | | | | | | | | | | | | 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-092-1/+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>
* remote.c: minor clean-up of match_explicit()Junio C Hamano2007-06-091-11/+12
| | | | | | | | | | When checking what ref the source refspec matches, we have no business setting the default for the destination, so move that code lower. Also simplify the result from the code block that matches the source side by making it set matched_src only upon unambiguous match. Signed-off-by: Junio C Hamano <gitster@pobox.com>
* remote.c: refactor creation of new dst refJunio C Hamano2007-06-091-18/+17
| | | | | | | This refactors open-coded sequence to create a new "struct ref" and link it to the tail of dst list into a new function. Signed-off-by: Junio C Hamano <gitster@pobox.com>
* remote.c: refactor match_explicit_refs()Junio C Hamano2007-06-091-73/+86
| | | | | | | | This does not change functionality; just splits one block that is deeply nested and indented out of a huge loop into a separate function. Signed-off-by: Junio C Hamano <gitster@pobox.com>
* Merge branch 'maint'Junio C Hamano2007-06-093-3/+3
|\ | | | | | | | | * maint: Make command description imperative statement, not third-person present.
| * Make command description imperative statement, not third-person present.william pursell2007-06-093-3/+3
| | | | | | | | | | | | | | | | In several of the text messages, the tense of the verb is inconsistent. For example, "Add" vs "Creates". It is customary to use imperative for command description. Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | Remove unnecessary code and comments on non-existing 8kB tag object restrictionJohan Herland2007-06-091-7/+0
| | | | | | | | | | Signed-off-by: Johan Herland <johan@herland.net> 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 'aj/pack'Junio C Hamano2007-06-091-12/+35
|\ \ | | | | | | | | | | | | * aj/pack: pack-check: Sort entries by pack offset before unpacking them.
| * | pack-check: Sort entries by pack offset before unpacking them.Alexandre Julliard2007-06-061-12/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | Because of the way objects are sorted in a pack, unpacking them in disk order is much more efficient than random access. Tests on the Wine repository show a gain in pack validation time of about 35%. Signed-off-by: Alexandre Julliard <julliard@winehq.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | Merge branch 'js/merge'Junio C Hamano2007-06-092-1/+10
|\ \ \ | | | | | | | | | | | | | | | | * js/merge: git-merge-file: refuse to merge binary files
| * | | git-merge-file: refuse to merge binary filesJohannes Schindelin2007-06-042-1/+10
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | cmd_log_init: remove parsing of --encoding command line parameterJeff King2007-06-091-7/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This was moved to the setup_revisions parsing in 7cbcf4d5, so it was never being triggered. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | Merge branch 'ar/wildcardpush'Junio C Hamano2007-06-082-12/+109
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | * 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>
| * | | | Fix push with refspecs containing wildcardsAlex Riesen2007-06-081-12/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Otherwise git push 'remote-name' 'refs/heads/*:refs/remotes/other/*' will consider references in "refs/heads" of the remote repository "remote-name", instead of the ones in "refs/remotes/other", which the given refspec clearly means. Signed-off-by: Alex Riesen <raa.lkml@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | Merge branch 'ar/clone'Junio C Hamano2007-06-082-1/+47
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | * 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-062-1/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-082-1/+42
|\ \ \ \ \ \ | | |_|_|_|/ | |/| | | | | | | | | | | | | | | | * maint: checkout: do not get confused with ambiguous tag/branch names
| * | | | | checkout: do not get confused with ambiguous tag/branch namesJunio C Hamano2007-06-082-1/+42
| |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | | | Even more missing staticJunio C Hamano2007-06-089-32/+6
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | More missing staticJunio C Hamano2007-06-083-6/+4
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | More missing staticJunio C Hamano2007-06-082-11/+8
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | Missing statics.Pierre Habouzit2007-06-085-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Pierre Habouzit <madcoder@debian.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | Active_nr is unsigned, hence can't be < 0Pierre Habouzit2007-06-081-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Pierre Habouzit <madcoder@debian.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | cvsserver: Make req_Root more critical of its input dataFrank Lichtenheld2007-06-082-0/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | | | gitview: Define __slots__ for CommitMichael Ellerman2007-06-081-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Define __slots__ for the Commit class. This reserves space in each Commit object for only the defined variables. On my system this reduces heap usage when viewing a kernel repo by 12% ~= 55868 KB. Signed-off-by: Michael Ellerman <michael@ellerman.id.au> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | gitview: Use new-style classesMichael Ellerman2007-06-081-4/+4
| |/ / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This changes the Commit class to use new-style class, which has been available since Python 2.2 (Dec 2001). This is a necessary step in order to use __slots__[] declaration, so that we can reduce the memory footprint in the next patch. Signed-off-by: Michael Ellerman <michael@ellerman.id.au> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | War on whitespaceJunio C Hamano2007-06-07256-852/+645
| |_|/ |/| | | | | | | | | | | | | | | | | | | | | | | 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>
* | | Merge branch 'sv/objfixes'Junio C Hamano2007-06-065-8/+18
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | * sv/objfixes: Don't assume tree entries that are not dirs are blobs git-cvsimport: Make sure to use $git_dir always instead of .git sometimes fix documentation of unpack-objects -n Accept dates before 2000/01/01 when specified as seconds since the epoch
| * | | Don't assume tree entries that are not dirs are blobsSam Vilain2007-06-062-1/+9
| |/ / | | | | | | | | | | | | | | | | | | | | | When scanning the trees in track_tree_refs() there is a "lazy" test that assumes that entries are either directories or files. Don't do that. Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | git-cvsimport: Make sure to use $git_dir always instead of .git sometimesMichael Milligan2007-06-061-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | CVS import was failing on a couple repos I was trying to import. I was setting GIT_DIR=newproj.git and using the -i flag, but this bug was thwarting the effort... evil CVS. Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | fix documentation of unpack-objects -nSam Vilain2007-06-061-2/+2
| | | | | | | | | | | | | | | | | | | | | unpack-objects -n didn't print the object list as promised on the manual page, so alter the documentation to reflect the behaviour Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | Accept dates before 2000/01/01 when specified as seconds since the epochJohannes Sixt2007-06-061-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tests with git-filter-branch on a repository that was converted from CVS and that has commits reaching back to 1999 revealed that it is necessary to parse dates before 2000/01/01 when they are specified as seconds since 1970/01/01. There is now still a limit, 100000000, which is 1973/03/03 09:46:40 UTC, in order to allow that dates are represented as 8 digits. Signed-off-by: Johannes Sixt <johannes.sixt@telecom.at> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | Makefile: Remove git-merge-base from PROGRAMS.Johannes Sixt2007-06-061-1/+0
| | | | | | | | | | | | | | | | | | | | | git-merge-base is a builtin. Signed-off-by: Johannes Sixt <johannes.sixt@telecom.at> 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>
* | | Merge branch 'mm/tag'Junio C Hamano2007-06-062-11/+46
|\ \ \ | | | | | | | | | | | | | | | | * mm/tag: Teach git-tag about showing tag annotations.
| * | | Teach git-tag about showing tag annotations.Matthijs Melchior2007-06-022-11/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The <pattern> for -l is now a shell pattern, not a list of grep parameters. Option -l may be repeated with another <pattern>. The new -n [<num>] option specifies how many lines from the annotation are to be printed. Not specifieing -n or -n 0 will just produce the tag names Just -n or -n 1 will show the first line of the annotation on the tag line. Other valuse for -n will show that number of lines from the annotation. The exit code used to indicate if any tag was found. This is changed due to a different implementation. A good way to test a tag for existence is to use: git show-ref --quiet --verify refs/tags/$TAGNAME Signed-off-by: Matthijs Melchior <mmelchior@xs4all.nl> Signed-off-by: Junio C Hamano <junkio@cox.net>
* | | | git-branch --track: fix tracking branch computation.Junio C Hamano2007-06-062-30/+53
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | | Fix typo in git-mergetoolJosh Triplett2007-06-061-1/+1
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Josh Triplett <josh@freedesktop.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | Add the --numbered-files option to git-format-patch.Jon Loeliger2007-06-062-44/+67
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With this option, git-format-patch will generate simple numbered files as output instead of the default using with the first commit line appended. This simplifies the ability to generate an MH-style drafts folder with each message to be sent. Signed-off-by: Jon Loeliger <jdl@freescale.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | $EMAIL is a last resort fallback, as it's system-wide.Pierre Habouzit2007-06-061-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | $EMAIL is a system-wide setup that is used for many many many applications. If the git user chose a specific user.email setup, then _this_ should be honoured rather than $EMAIL. Signed-off-by: Pierre Habouzit <madcoder@debian.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | make clean should remove all the test programs tooMatthias Lederhofer2007-06-061-1/+2
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Matthias Lederhofer <matled@gmx.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | add git-filter-branch to .gitignoreMatthias Lederhofer2007-06-061-0/+1
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Matthias Lederhofer <matled@gmx.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | Merge branch 'gb/idx'Junio C Hamano2007-06-054-341/+245
|\ \ \ \ | |_|_|/ |/| | | | | | | | | | | * gb/idx: Unify write_index_file functions
| * | | Unify write_index_file functionsGeert Bosch2007-06-024-341/+245
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch unifies the write_index_file functions in builtin-pack-objects.c and index-pack.c. As the name "index" is overloaded in git, move in the direction of using "idx" and "pack idx" when refering to the pack index. There should be no change in functionality. Signed-off-by: Geert Bosch <bosch@gnat.com> Acked-by: Nicolas Pitre <nico@cam.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
* | | | merge-recursive: refuse to merge binary filesJohannes Schindelin2007-06-042-0/+20
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | Move buffer_is_binary() to xdiff-interface.hJohannes Schindelin2007-06-044-17/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We already have two instances where we want to determine if a buffer contains binary data as opposed to text. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | git-fsck: learn about --verboseJohannes Schindelin2007-06-042-2/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | | | With --verbose, it gets really chatty now. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>