summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* 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>
* GIT 1.5.2.1v1.5.2.1Junio C Hamano2007-06-023-2/+55
| | | | Signed-off-by: Junio C Hamano <junkio@cox.net>
* Use =20 when rfc2047 encoding spaces.Kristian Høgsberg2007-06-022-8/+12
| | | | | | | | | | | 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>
* Create a new manpage for the gitignore format, and reference it elsewhereJosh Triplett2007-06-028-101/+145
| | | | | | | | | | | | | | | | | | Only git-ls-files(1) describes the gitignore format in detail, and it does so with reference to git-ls-files options. Most users don't use the plumbing command git-ls-files directly, and shouldn't have to look in its manpage for information on the gitignore format. Create a new manpage gitignore(5) (Documentation/gitignore.txt), and factor out the gitignore documentation into that file, changing it to refer to .gitignore and $GIT_DIR/info/exclude as used by porcelain commands. Reference gitignore(5) from other relevant manpages and documentation. Remove now-redundant information on exclude patterns from git-ls-files(1), leaving only information on how git-ls-files options specify exclude patterns and what precedence they have. Signed-off-by: Josh Triplett <josh@freedesktop.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
* Documentation: robustify asciidoc GIT_VERSION replacementJeff King2007-06-022-5/+3
| | | | | | | | | | | | Instead of using sed on the resulting file, we now have a git_version asciidoc attribute. This means that we don't pipe the output of asciidoc, which means we can detect build failures. Problem reported by Scott Lamb, solution suggested by Jonas Fonseca. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <junkio@cox.net>
* Merge branch 'maint-1.5.1' into maintJunio C Hamano2007-05-314-15/+69
|\ | | | | | | | | | | | | | | * maint-1.5.1: git-config: Improve documentation of git-config file handling git-config: Various small fixes to asciidoc documentation decode_85(): fix missing return. fix signed range problems with hex conversions
| * git-config: Improve documentation of git-config file handlingFrank Lichtenheld2007-05-301-7/+59
| | | | | | | | | | | | | | | | | | The description which files git-config uses and how the various command line options and environment variables affect its behaviour was incomplete, outdated and confusing. Signed-off-by: Frank Lichtenheld <frank@lichtenheld.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
| * git-config: Various small fixes to asciidoc documentationFrank Lichtenheld2007-05-301-4/+6
| | | | | | | | | | | | | | | | | | | | | | Add '' around the only mentioned commandline option that didn't have it. Make reference to section EXAMPLE a link and rename it to EXAMPLES because it actually contains a lot of examples. Signed-off-by: Frank Lichtenheld <frank@lichtenheld.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
| * decode_85(): fix missing return.Jerald Fitzjerald2007-05-301-1/+1
| | | | | | | | | | | | | | | | | | When the function detected an invalid base85 sequence, it issued an error message but forgot to return error status at that point and kept going. Signed-off-by: Jerald Fitzjerald <jfj@freemail.gr> Signed-off-by: Junio C Hamano <junkio@cox.net>
| * fix signed range problems with hex conversionsLinus Torvalds2007-05-302-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make hexval_table[] "const". Also make sure that the accessor function hexval() does not access the table with out-of-range values by declaring its parameter "unsigned char", instead of "unsigned int". With this, gcc can just generate: movzbl (%rdi), %eax movsbl hexval_table(%rax),%edx movzbl 1(%rdi), %eax movsbl hexval_table(%rax),%eax sall $4, %edx orl %eax, %edx for the code to generate a byte from two hex characters. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
* | cvsserver: Fix some typos in asciidoc documentationFrank Lichtenheld2007-05-291-2/+2
| | | | | | | | | | Signed-off-by: Frank Lichtenheld <frank@lichtenheld.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
* | cvsserver: Note that CVS_SERVER can also be specified as method variableFrank Lichtenheld2007-05-291-1/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Reasonably new versions of the cvs CLI client allow one to specifiy CVS_SERVER as a method variable directly in CVSROOT. This is way more convinient than using an environment variable since it gets saved in CVS/Root. Since I only discovered this by accident I guess there might be others out there that learnt CVS on the 1.11 series (or even earlier) and profit from such a note about cvs improvements in the last couple years. Signed-off-by: Frank Lichtenheld <frank@lichtenheld.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
* | cvsserver: Correct inetd.conf example in asciidoc documentationFrank Lichtenheld2007-05-291-3/+5
| | | | | | | | | | | | | | | | | | | | While the given example worked, it made us look rather incompetent. Give the correct reason why one needs the more complex syntax and change the example to reflect that. Signed-off-by: Frank Lichtenheld <frank@lichtenheld.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
* | user-manual: fixed typo in exampleSteffen Prohaska2007-05-281-1/+1
| | | | | | | | | | Signed-off-by: Steffen Prohaska <prohaska@zib.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
* | 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>
* | Merge branch 'maint-1.5.1' into maintJunio C Hamano2007-05-282-7/+11
|\ \ | |/ | | | | | | | | * maint-1.5.1: git-svn: avoid md5 calculation entirely if SVN doesn't provide one Fix stupid typo in lookup_tag()
| * git-svn: avoid md5 calculation entirely if SVN doesn't provide oneEric Wong2007-05-281-6/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | There's no point in calculating an MD5 if we're not going to use it. We'll also avoid the possibility of there being a bug in the Perl MD5 library not being able to handle zero-sized files. This is a followup to 20b3d206acbbb042c7ad5f42d36ff8d036a538c5, which allows us to track repositories that do not provide MD5 checksums. Signed-off-by: Eric Wong <normalperson@yhbt.net> Signed-off-by: Junio C Hamano <junkio@cox.net>
| * Fix stupid typo in lookup_tag()Johan Herland2007-05-281-1/+1
| | | | | | | | | | Signed-off-by: Johan Herland <johan@herland.net> Signed-off-by: Junio C Hamano <junkio@cox.net>
* | Merge branch 'maint' of git://repo.or.cz/git-gui into maintJunio C Hamano2007-05-282-10/+19
|\ \ | | | | | | | | | | | | | | | | | | * 'maint' of git://repo.or.cz/git-gui: 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
| * | git-gui: Guess our share/git-gui/lib path at runtime if possiblegitgui-0.7.2Shawn O. Pearce2007-05-272-4/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Johannes Sixt asked me to try to avoid embedding the runtime location of git-gui's library directory in the executable script. Not embedding it helps the MinGW to be relocatable to another directory should a user wish to install the programs in a directory other than the location the packager wanted them to be installed into. Most of this is a hack. We try to determine if the path of our master git-gui script will be able to locate the lib by ../share/git-gui/lib. This should be true if $(gitexecdir) and $(libdir) have the same prefix. If they do then we defer the assignment of $(libdir) until runtime, and we get it from $argv0 rather than embedding it into the script itself. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
| * | Correct key bindings to Control-<foo>Shawn O. Pearce2007-05-241-6/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Alberto Bertogli reported on #git that git-gui was exiting with alt-q, while gitk on the same system was exiting with ctrl-q. That was not what I wanted. I really wanted M1B to be bound to the Control key on most non-Mac OS X platforms, but according to Sam Vilain M1 on most systems means alt. Since gitk always does control, I'm doing the same thing for all non-Mac OS X systems. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
| * | git-gui: Tighten internal pattern match for lib/ directoryShawn O. Pearce2007-05-221-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Our GITGUI_LIBDIR macro was testing only for @@ at the start of the path, assuming nobody would ever find that to be a reasonable prefix for a directory to install our library into. That is most likely a valid assumption, but its even more unlikely they would have the start be @@GITGUI_ and the end be @@. Note that we cannot use the full string here because that would get expanded by the sed replacement in our Makefile. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
* | | Makefile: Remove git-fsck and git-verify-pack from PROGRAMSNguyen Thai Ngoc Duy2007-05-281-2/+2
| | | | | | | | | | | | | | | | | | | | | Those are builtins. Remove them from PROGRAMS variable Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
* | | Merge branch 'maint-1.5.1' into maintJunio C Hamano2007-05-2610-47/+115
|\ \ \ | | |/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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-262-1/+46
| | | | | | | | | | | | | | | Acked-by: Eric Wong <normalperson@yhbt.net> Signed-off-by: Junio C Hamano <junkio@cox.net>
| * | More echo "$user_message" fixes.Jeff King2007-05-263-6/+6
| | | | | | | | | | | | | | | | | | | | | Here are fixes to more uses of 'echo "$msg"' where $msg could contain backslashed sequence. 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>
| * | git-commit: use printf '%s\n' instead of echo on user-supplied stringsJunio C Hamano2007-05-261-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | This fixes the same issue git-am had, which was fixed by Jeff King in the previous commit. Cleverly enough, this commit's log message is a good test case at the same time. Signed-off-by: Junio C Hamano <junkio@cox.net>
| * | git-am: use printf instead of echo on user-supplied stringsJeff King2007-05-251-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Under some implementations of echo (such as that provided by dash), backslash escapes are recognized without any other options. This means that echo-ing user-supplied strings may cause any backslash sequences in them to be converted. Using printf resolves the ambiguity. This bug can be seen when using git-am to apply a patch whose subject contains the character sequence "\n"; the characters are converted to a literal newline. Noticed by Szekeres Istvan. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <junkio@cox.net>
| * | Documentation: Add definition of "evil merge" to GIT GlossaryJakub Narebski2007-05-251-0/+4
| | | | | | | | | | | | | | | Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
| * | Replace the last 'dircache's by 'index'Jakub Narebski2007-05-252-2/+2
| | | | | | | | | | | | | | | Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
| * | Documentation: Clean up links in GIT GlossaryJakub Narebski2007-05-251-29/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Ensure that the same link is not repeated in single glossary entry, and that there is no self-link i.e. link to current entry. Add links to other definitions in git glossary. Remove inappropriate (nonsense) links, or change link to link to correct definition (to correct term). Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
* | | Fix mishandling of $Id$ expanded in the repository copy in convert.cAndy Parkins2007-05-261-2/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If the repository contained an expanded ident keyword (i.e. $Id:XXXX$), then the wrong bytes were discarded, and the Id keyword was not expanded. The fault was in convert.c:ident_to_worktree(). Previously, when a "$Id:" was found in the repository version, ident_to_worktree() would search for the next "$" after this, and discarded everything it found until then. That was done with the loop: do { ch = *cp++; if (ch == '$') break; rem--; } while (rem); The above loop left cp pointing one character _after_ the final "$" (because of ch = *cp++). This was different from the non-expanded case, were cp is left pointing at the "$", and was different from the comment which stated "discard up to but not including the closing $". This patch fixes that by making the loop: do { ch = *cp; if (ch == '$') break; cp++; rem--; } while (rem); That is, cp is tested _then_ incremented. This loop exits if it finds a "$" or if it runs out of bytes in the source. After this loop, if there was no closing "$" the expansion is skipped, and the outer loop is allowed to continue leaving this non-keyword as it was. However, when the "$" is found, size is corrected, before running the expansion: size -= (cp - src); This is wrong; size is going to be corrected anyway after the expansion, so there is no need to do it here. This patch removes that redundant correction. To help find this bug, I heavily commented the routine; those comments are included here as a bonus. Signed-off-by: Andy Parkins <andyparkins@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
* | | Merge branch 'master' of git://repo.or.cz/git/fastimport into maintJunio C Hamano2007-05-241-10/+71
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 'master' of git://repo.or.cz/git/fastimport: Update bash completion for git-config options Teach bash completion about recent log long options Teach bash completion about 'git remote update' Update bash completion header documentation Remove a duplicate --not option in bash completion Teach bash completion about git-shortlog Hide the plumbing diff-{files,index,tree} from bash completion Update bash completion to ignore some more plumbing commands
| * | | Update bash completion for git-config optionsShawn O. Pearce2007-05-241-2/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A few new configuration options grew out of the woodwork during the 1.5.2 series. Most of these are pretty easy to support a completion of, so we do so. I wanted to also add completion support for the <driver> part of merge.<driver>.name but to do that we have to look at all of the .gitattributes files and guess what the unique set of <driver> strings would be. Since this appears to be non-trivial I'm punting on it at this time. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
| * | | Teach bash completion about recent log long optionsShawn O. Pearce2007-05-241-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (Somewhat) recently git-log learned about --reverse (to show commits in the opposite order) and a looong time ago I think it learned about --raw (to show the raw diff, rather than a unified diff). These are both useful options, so we should make them easy for the user to complete. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
| * | | Teach bash completion about 'git remote update'Shawn O. Pearce2007-05-241-2/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Recently the git-remote command grew an update subcommand, which can be used to execute git-fetch across multiple repositories in a single step. These can be configured with the 'remotes.*' configuration options, so we can offer completion for any name that matches and appears to be useful to git-remote update. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
| * | | Update bash completion header documentationShawn O. Pearce2007-05-241-1/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1) Added a note about supporting the long options for most commands, as we have been doing so for quite some time. 2) Include a notice that these routines are covered by the GPL, as that may not be obvious, even though they are distributed as part of the core Git distribution. 3) Added a short section on how to send patches to the routines, and to whom they should get sent to. Currently that is me, as I am the active maintainer. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
| * | | Remove a duplicate --not option in bash completionShawn O. Pearce2007-05-241-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This was just me being silly; I put the --not option into the completion list twice. There's no duplicates shown in the shell as the shell removes them before showing them to the user. But we really don't need the duplicates in the source script either. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
| * | | Teach bash completion about git-shortlogShawn O. Pearce2007-05-241-0/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We've had completion for git-log for quite some time, but just today I noticed we don't have it for the new builtin shortlog that runs git-log internally. This is indeed a handy thing to have completion for, especially when your branch names are of the Very-Very-Long-and-Hard/To-Type/Variety/That-Some-Use. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
| * | | Hide the plumbing diff-{files,index,tree} from bash completionShawn O. Pearce2007-05-241-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The diff-* programs are meant to be plumbing for the diff frontend; most end users aren't invoking these commands directly. Consequently we should avoid showing them as possible completions. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
| * | | Update bash completion to ignore some more plumbing commandsJonas Fonseca2007-05-211-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | [sp: Modified Jonas' original patch to keep checkout-index as a a valid completion.] Signed-off-by: Jonas Fonseca <fonseca@diku.dk> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
* | | | Merge branch 'maint-1.5.1' into maintJunio C Hamano2007-05-242-0/+5
|\ \ \ \ | | |/ / | |/| | | | | | | | | | | | | | * maint-1.5.1: fix memory leak in parse_object when check_sha1_signature fails name-rev: tolerate clock skew in committer dates
| * | | fix memory leak in parse_object when check_sha1_signature failsCarlos Rica2007-05-241-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When check_sha1_signature fails, program is not terminated: it prints an error message and returns NULL, so the buffer returned by read_sha1_file should be freed before. Signed-off-by: Carlos Rica <jasampler@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
| * | | name-rev: tolerate clock skew in committer datesJunio C Hamano2007-05-241-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In git.git repository, "git-name-rev v1.3.0~158" cannot name the rev, while adjacent revs can be named. This was because it gives up traversal from the tips of existing refs as soon as it sees a commit that has older commit timestamp than what is being named. This is usually a good heuristics, but v1.3.0~158 has a slightly older commit timestamp than v1.3.0~157 (i.e. it's child), as these two were made in a separate repostiory (in fact, in a different continent). This adds a hardcoded slop value (1 day) to the cut-off heuristics to work this kind of problem around. The current algorithm essentially runs around from the available tips down to ancient commits and names every single rev available that are newer than cut-off date, so a single day slop would not add that much overhead in repositories with long enough history where the performance of name-rev matters. I think the algorithm could be made a bit smarter by deepening the graph on demand as a new commit is asked to be named (this would require rewriting of name_rev() function not to recurse itself but use a traversal list like revision.c traverser does), but that would be a separate issue. Acked-by: Johannes Schindelin <Johannes.Schindelin@gmx.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
* | | | Merge branch 'maint' of git://repo.or.cz/git/fastimport into maintJunio C Hamano2007-05-232-30/+66
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 'maint' of git://repo.or.cz/git/fastimport: 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
| * | | | Fix possible coredump with fast-import --import-marksShawn O. Pearce2007-05-242-5/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>