aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAge
* Tests for core subproject supportAlex Riesen2007-04-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The following tests available: - create subprojects: create a directory in the superproject, initialize a git repo in it, and try adding it in super project. Make a commit in superproject - check if fsck ignores the subprojects: it just should give no errors - check if commit in a subproject detected: make a commit in subproject, git-diff-files in superproject should detect it - check if a changed subproject HEAD can be committed: try "git-commit -a" in superproject. It should commit changed HEAD of a subproject - check if diff-index works for subproject elements: compare the index (changed by previuos tests) with the initial commit (which created two subprojects). Should show a change for the recently changed subproject - check if diff-tree works for subproject elements: do the same, just use git-diff-tree. This test is somewhat redundant, I just added it for completeness (diff, diff-files, and diff-index are already used) - check if git diff works for subproject elements: try to limit the diff for the name of a subproject in superproject: git diff HEAD^ HEAD -- subproject - check if clone works: try a clone of superproject and compare "git ls-files -s" output in superproject and cloned repo - removing and adding subproject: rename test. Currently implemented as "git-update-index --force-remove", "mv" and "git-add". - checkout in superproject: try to checkout the initial commit Signed-off-by: Alex Riesen <raa.lkml@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
* Expose subprojects as special files to "git diff" machineryLinus Torvalds2007-04-15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The same way we generate diffs on symlinks as the the diff of text of the symlink, we can generate subproject diffs (when not recursing into them!) as the diff of the text that describes the subproject. Of course, since what descibes a subproject is just the SHA1, that's what we'll use. Add some pretty-printing to make it a bit more obvious what is going on, and we're done. So with this, we can get both raw diffs and "textual" diffs of subproject changes: - git diff --raw: :160000 160000 2de597b5ad348b7db04bd10cdd38cd81cbc93ab5 0000000... M sub-A - git diff: diff --git a/sub-A b/sub-A index 2de597b..e8f11a4 160000 --- a/sub-A +++ b/sub-A @@ -1 +1 @@ -Subproject commit 2de597b5ad348b7db04bd10cdd38cd81cbc93ab5 +Subproject commit e8f11a45c5c6b9e2fec6d136d3fb5aff75393d42 NOTE! We'll also want to have the ability to recurse into the subproject and actually diff it recursively, but that will involve a new command line option (I'd suggest "--subproject" and "-S", but the latter is in use by pickaxe), and some very different code. But regardless of ay future recursive behaviour, we need the non-recursive version too (and it should be the default, at least in the absense of config options, so that large superprojects don't default to something extremely expensive). Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
* Fix some "git ls-files -o" fallout from gitlinksLinus Torvalds2007-04-14
| | | | | | | | | | | | | | | | | | | | | | | | | Since "git ls-files" doesn't really pass down any details on what it really wants done to the directory walking code, the directory walking code doesn't really know whether the caller wants to know about gitlink directories, or whether it wants to just know about ignored files. So the directory walking code will return those gitlink directories unless the caller has explicitly told it not to ("dir->show_other_directories" tells the directory walker to only show "other" directories). This kind of confuses "git ls-files -o", because - it didn't really expect to see entries listed that were already in the index, unless they were unmerged, and would die on that unexpected setup, rather than just "continue". - it didn't know how to match directory entries with the final "/" This trivial change updates the "show_other_files()" function to handle both of these issues gracefully. There really was no reason to die, when the obviously correct thing for the function was to just ignore files it already knew about (that's what "other" means here!). Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
* Replace a pair of patches with updated ones for subproject support.Junio C Hamano2007-04-14
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This series of three patches is a *replacement* for the patch series of two patches (plus one-liner fixup) I sent yesterday. It fixes the issue I noted with "git status" incorrectly claiming that a non-checked out subproject wasn't clean - that was just a total thinko in the code (we were checking the filesystem mode against S_IFDIRLNK, which obviously cannot work, since S_IFDIRLINK is a git-internal state, not a filesystem state). It then re-sends the two patches on top of that, with the fix for checking out superprojects (we should *not* mess up any existing subproject directories, certainly not remove them - if we already have a directory in the place where we now want a subproject, we should leave it well alone!) The first one really is a fix, and it makes the commit commentary about a remaining bug in the patch I sent out yesterday go away.
| * Teach "git-read-tree -u" to check out submodules as a directoryLinus Torvalds2007-04-12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This actually allows us to check out a supermodule after cloning, although the submodules will obviously not be checked out, and will just be an empty subdirectory. [ Side note: this also shows that we currently don't correctly handle such subprojects that aren't checked out correctly yet. They should always show up as not being modified, but failing to resolve the gitlink HEAD does not properly trigger the "not modified" logic in all places it needs to.. So more work to be done, but that's a separate issue, unrelated to the action of checking out the superproject. ] The bulk of this patch is simply because we need to check the type of the index entry *before* we try to read the object it points to, and that meant that the code needed some re-organization. So I moved some of the code in common to both symlinks and files to be a trivial helper function. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
| * Teach git list-objects logic not to follow gitlinksLinus Torvalds2007-04-12
| | | | | | | | | | | | | | | | This allows us to pack superprojects and thus clone them (but not yet check them out on the receiving side - that's the next patch) Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
* | Teach "git-read-tree -u" to check out submodules as a directoryLinus Torvalds2007-04-14
| | | | | | | | | | | | | | | | | | | | | | | | This actually allows us to check out a supermodule after cloning, although the submodules themselves will obviously not be checked out, and will just be empty directories. Checking out the submodules will be up to higher levels - we may not even want to! Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
* | Teach git list-objects logic to not follow gitlinksLinus Torvalds2007-04-14
| | | | | | | | | | | | | | | | This allows us to pack superprojects and thus clone them (but not yet check them out on the receiving side.. That's the next patch) Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
* | Fix gitlink index entry filesystem matchingLinus Torvalds2007-04-14
|/ | | | | | | | | | | | | | | | | The code to match up index entries with the filesystem was stupidly broken. We shouldn't compare the filesystem stat() information with S_IFDIRLNK, since that's purely a git-internal value, and not what the filesystem uses (on the filesystem, it's just a regular directory). Also, don't bother to make the stat() time comparisons etc for DIRLNK entries in ce_match_stat_basic(), since we do an exact match for these things, and the hints in the stat data simply doesn't matter. This fixes "git status" with submodules that haven't been checked out in the supermodule. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
* Don't show gitlink directories when we want "other" filesLinus Torvalds2007-04-12
| | | | | | | | | | | | When "show_other_directories" is set, that implies that we are looking for untracked files, which obviously means that we should ignore directories that are marked as gitlinks in the index. This fixes "git status" in a superproject, that would otherwise always report that subprojects were "Untracked files:" Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
* Teach git-update-index about gitlinksLinus Torvalds2007-04-12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | I finally got around to looking at Alex' patch to teach update-index about gitlinks too, so that "git commit -a" along with any other explicit update-index scripts can work. I don't think there was anything wrong with Alex' patch, but the code he patched I felt was just so ugly that the added cases just pushed it over the edge. Especially as I don't think that patch necessarily did the right thing for a gitlink entry that already existed in the index, but that wasn't actually a real git repository in the working tree (just an empty subdirectory or a non-git snapshot because it hadn't wanted to track that particular subproject). So I ended up deciding to clean up the git-update-index handling the same way I tackled the directory traversal used by git-add earlier: by splitting the different cases up into multiple smaller functions, and just making the code easier to read (and adding more comments about the different cases). So this replaces the old "process_file()" with a new "process_path()" function that then just calls out to different helper functions depending on what kind of path it is. Processing a nondirectory ends up being just one of the simpler cases. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
* Teach directory traversal about subprojectsLinus Torvalds2007-04-11
| | | | | | | | | | | | | | | | | | | | | | | This is the promised cleaned-up version of teaching directory traversal (ie the "read_directory()" logic) about subprojects. That makes "git add" understand to add/update subprojects. It now knows to look at the index file to see if a directory is marked as a subproject, and use that as information as whether it should be recursed into or not. It also generally cleans up the handling of directory entries when traversing the working tree, by splitting up the decision-making process into small functions of their own, and adding a fair number of comments. Finally, it teaches "add_file_to_cache()" that directory names can have slashes at the end, since the directory traversal adds them to make the difference between a file and a directory clear (it always did that, but my previous too-ugly-to-apply subproject patch had a totally different path for subproject directories and avoided the slash for that case). Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
* Fix thinko in subproject entry sortingLinus Torvalds2007-04-11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes a total thinko in my original series: subprojects do *not* sort like directories, because the index is sorted purely by full pathname, and since a subproject shows up in the index as a normal NUL-terminated string, it never has the issues with sorting with the '/' at the end. So if you have a subproject "proj" and a file "proj.c", the subproject sorts alphabetically before the file in the index (and must thus also sort that way in a tree object, since trees sort as the index). In contrast, it you have two files "proj/file" and "proj.c", the "proj.c" will sort alphabetically before "proj/file" in the index. The index itself, of course, does not actually contain an entry "proj/", but in the *tree* that gets written out, the tree entry "proj" will sort after the file entry "proj.c", which is the only real magic sorting rule. In other words: the magic sorting rule only affects tree entries, and *only* affects tree entries that point to other trees (ie are of the type S_IFDIR). Anyway, that thinko just means that we should remove the special case to make S_ISDIRLNK entries sort like S_ISDIR entries. They don't. They sort like normal files. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
* Teach core object handling functions about gitlinksLinus Torvalds2007-04-10
| | | | | | | | | | | | | | | This teaches the really fundamental core SHA1 object handling routines about gitlinks. We can compare trees with gitlinks in them (although we can not actually generate patches for them yet - just raw git diffs), and they show up as commits in "git ls-tree". We also know to compare gitlinks as if they were directories (ie the normal "sort as trees" rules apply). [jc: amended a cut&paste error] Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
* Teach "fsck" not to follow subproject linksLinus Torvalds2007-04-10
| | | | | | | | | | | | | Since the subprojects don't necessarily even exist in the current tree, much less in the current git repository (they are totally independent repositories), we do not want to try to follow the chain from one git repository to another through a gitlink. This involves teaching fsck to ignore references to gitlink objects from a tree and from the current index. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
* Add "S_IFDIRLNK" file mode infrastructure for git linksLinus Torvalds2007-04-10
| | | | | | | | | | | | This just adds the basic helper functions to recognize and work with git tree entries that are links to other git repositories ("subprojects"). They still aren't actually connected up to any of the code-paths, but now all the infrastructure is in place. The next commit will start actually adding actual subproject support. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
* Add 'resolve_gitlink_ref()' helper functionLinus Torvalds2007-04-10
| | | | | | | | | | | | | | This new function resolves a ref in *another* git repository. It's named for its intended use: to look up the git link to a subproject. It's not actually wired up to anything yet, but we're getting closer to having fundamental plumbing support for "links" from one git directory to another, which is the basis of subproject support. [jc: amended a FILE* leak] Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
* Avoid overflowing name buffer in deep directory structuresLinus Torvalds2007-04-09
| | | | | | | | | This just makes sure that when we do a read_directory(), we check that the filename fits in the buffer we allocated (with a bit of slop) Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
* diff-lib: use ce_mode_from_stat() rather than messing with modes manuallyLinus Torvalds2007-04-09
| | | | | | | | | | | | | | The diff helpers used to do the magic mode canonicalization and all the other special mode handling by hand ("trust executable bit" and "has symlink support" handling). That's bogus. Use "ce_mode_from_stat()" that does this all for us. This is also going to be required when we add support for links to other git repositories. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
* git-archive: make tar the default formatRené Scharfe2007-04-09
| | | | | | | | As noted by Junio, --format=tar should be assumed if no format was specified. Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx> Signed-off-by: Junio C Hamano <junkio@cox.net>
* Merge branch 'jc/push'Junio C Hamano2007-04-08
|\ | | | | | | | | | | * jc/push: git-push to multiple locations does not stop at the first failure git-push reports the URL after failing.
| * git-push to multiple locations does not stop at the first failureJunio C Hamano2007-04-07
| | | | | | | | | | | | | | | | | | | | When pushing into multiple repositories with git push, via multiple URL in .git/remotes/$shorthand or multiple url variables in [remote "$shorthand"] section, we used to stop upon the first failure. Continue the operation and report the failure at the end. Signed-off-by: Junio C Hamano <junkio@cox.net>
| * git-push reports the URL after failing.Junio C Hamano2007-04-07
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This came up on #git when somebody was getting 'unable to create ./objects/tmp_oXXXX' but sweared he had write permission to that directory. It turned out that the repository URL was changed and he was accessing a repository he does not have a write permission anymore. I am not sure how much this would have helped somebody who believed he was accessing location when the permission of that location was changed while he was looking the other way, though. But giving more information on the error path would be better, and the next change would be helped with this as well. Signed-off-by: Junio C Hamano <junkio@cox.net>
* | Merge branch 'jc/merge-subtree'Junio C Hamano2007-04-08
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * jc/merge-subtree: A new merge stragety 'subtree'. It is safe to merge this early as this is a feature that user explicitly needs to ask for and would not trigger otherwise. A known issue with the current implementation is that the subtree matching heuristics is very stupid. It could run ls-tree twice and try to count intersection. Giving it wider audience would help it to get improved by motivated volunteers. Signed-off-by: Junio C Hamano <junkio@cox.net>
| * | A new merge stragety 'subtree'.Junio C Hamano2007-04-07
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This merge strategy largely piggy-backs on git-merge-recursive. When merging trees A and B, if B corresponds to a subtree of A, B is first adjusted to match the tree structure of A, instead of reading the trees at the same level. This adjustment is also done to the common ancestor tree. If you are pulling updates from git-gui repository into git.git repository, the root level of the former corresponds to git-gui/ subdirectory of the latter. The tree object of git-gui's toplevel is wrapped in a fake tree object, whose sole entry has name 'git-gui' and records object name of the true tree, before being used by the 3-way merge code. If you are merging the other way, only the git-gui/ subtree of git.git is extracted and merged into git-gui's toplevel. The detection of corresponding subtree is done by comparing the pathnames and types in the toplevel of the tree. Heuristics galore! That's the git way ;-). Signed-off-by: Junio C Hamano <junkio@cox.net>
* | Merge branch 'js/fetch-progress'Junio C Hamano2007-04-08
|\ \ | | | | | | | | | | | | * js/fetch-progress: git-fetch: add --quiet
| * | git-fetch: add --quietJunio C Hamano2007-03-09
| | | | | | | | | | | | | | | | | | | | | Pass it to underlying fetch-pack, and also have it affect if -v is passed to http-fetch and rsync. Signed-off-by: Junio C Hamano <junkio@cox.net>
* | | Merge branch 'maint'Junio C Hamano2007-04-08
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | * maint: Add Documentation/cmd-list.made to .gitignore git-svn: fix log command to avoid infinite loop on long commit messages git-svn: dcommit/rebase confused by patches with git-svn-id: lines git-svn: bail out on incorrect command-line options
| * | | Add Documentation/cmd-list.made to .gitignoreJunio C Hamano2007-04-08
| | | | | | | | | | | | | | | | | | | | | | | | Noticed by Randal L. Schwartz. Signed-off-by: Junio C Hamano <junkio@cox.net>
| * | | git-svn: fix log command to avoid infinite loop on long commit messagesEric Wong2007-04-08
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This bug has been around since the the conversion to use the Git.pm library back in October or November. Eventually I'd like "git rev-list/log" to have the option to not truncate overly long messages. Signed-off-by: Eric Wong <normalperson@yhbt.net> Signed-off-by: Junio C Hamano <junkio@cox.net>
| * | | git-svn: dcommit/rebase confused by patches with git-svn-id: linesEric Wong2007-04-08
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When patches are merged from another git-svn managed branch, they will have the git-svn-id: metadata line in them (generated by git-format-patch). When doing rebase or dcommit via git-svn, this would cause git-svn to find the wrong upstream branch. We now verify that the commit is consistent with the value in the .rev_db file. Signed-off-by: Eric Wong <normalperson@yhbt.net> Signed-off-by: Junio C Hamano <junkio@cox.net>
| * | | git-svn: bail out on incorrect command-line optionsEric Wong2007-04-08
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | "git svn log" is the only command that needs the pass-through option in Getopt::Long; otherwise we will bail out and let the user know something is wrong. Also, avoid printing out unaccepted mixed-case options (that are reserved for the command-line) such as --useSvmProps in the usage() function. Signed-off-by: Eric Wong <normalperson@yhbt.net> Signed-off-by: Junio C Hamano <junkio@cox.net>
* | | | Start 1.5.2 cycle by prepareing RelNotes for it.Junio C Hamano2007-04-07
| | | | | | | | | | | | | | | | Signed-off-by: Junio C Hamano <junkio@cox.net>
* | | | Merge branch 'jc/read-tree-df' (early part)Junio C Hamano2007-04-07
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 'jc/read-tree-df' (early part): Fix switching to a branch with D/F when current branch has file D. Fix twoway_merge that passed d/f conflict marker to merged_entry(). Fix read-tree --prefix=dir/. unpack-trees: get rid of *indpos parameter. unpack_trees.c: pass unpack_trees_options structure to keep_entry() as well. add_cache_entry(): removal of file foo does not conflict with foo/bar
| * | | | Fix switching to a branch with D/F when current branch has file D.Junio C Hamano2007-04-04
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This loosens the over-eager verify_absent() check that gets upset to find directory D in the current working tree when switching to a branch that has a file there. The check needs to make sure that we do not lose precious working tree files as a result of removing directory D and replacing it with the file from the other branch, which is a tad expensive but this is a less common case. Signed-off-by: Junio C Hamano <junkio@cox.net>
| * | | | Fix twoway_merge that passed d/f conflict marker to merged_entry().Junio C Hamano2007-04-04
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When switching from one tree to another, we should not send a marker that says "this file does not exist in the new tree -- I am a placeholder to tell you that, and not a real blob" down to merged_entry() as the result of the merge.
| * | | | Fix read-tree --prefix=dir/.Junio C Hamano2007-04-04
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The existing code is not wrong per-se, but it started scanning the index from a location that does not match the tree being read, and wasted cycles. Signed-off-by: Junio C Hamano <junkio@cox.net>
| * | | | unpack-trees: get rid of *indpos parameter.Junio C Hamano2007-04-04
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This variable keeps track of which entry in the original index the traversal is looking at, and belongs to the unpack_trees_options structure along with other traversal status information. Signed-off-by: Junio C Hamano <junkio@cox.net>
| * | | | unpack_trees.c: pass unpack_trees_options structure to keep_entry() as well.Junio C Hamano2007-04-04
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Other decision functions, deleted_entry() and merged_entry() take one as their parameter, and this function should. I'll be introducing a separate index to build the result in, and am planning to pass it as the part of the structure. Signed-off-by: Junio C Hamano <junkio@cox.net>
| * | | | add_cache_entry(): removal of file foo does not conflict with foo/barJunio C Hamano2007-04-04
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Similarly, removal of file foo/bar does not conflict with a file foo. Signed-off-by: Junio C Hamano <junkio@cox.net>
* | | | | Merge branch 'maint'Junio C Hamano2007-04-07
|\ \ \ \ \ | | |/ / / | |/| | / | |_|_|/ |/| | | | | | | * maint: Prepare for 1.5.1.1 cvsserver: small corrections to asciidoc documentation
| * | | Prepare for 1.5.1.1Junio C Hamano2007-04-07
| | | | | | | | | | | | | | | | Signed-off-by: Junio C Hamano <junkio@cox.net>
| * | | cvsserver: small corrections to asciidoc documentationFrank Lichtenheld2007-04-07
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix a typo: s/Not/Note/ Some formating fixes: Use ` ` syntax for all filenames and ' ' syntax for all commandline switches. Signed-off-by: Frank Lichtenheld <frank@lichtenheld.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
* | | | Merge branch 'jc/index-output'Junio C Hamano2007-04-07
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * jc/index-output: git-read-tree --index-output=<file> _GIT_INDEX_OUTPUT: allow plumbing to output to an alternative index file. Conflicts: builtin-apply.c
| * | | | git-read-tree --index-output=<file>Junio C Hamano2007-04-03
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This corrects the interface mistake of the previous one, and gives a command line parameter to the only plumbing command that currently needs it: "git-read-tree". We can add the calls to set_alternate_index_output() to other plumbing commands that update the index if/when needed. Signed-off-by: Junio C Hamano <junkio@cox.net>
| * | | | _GIT_INDEX_OUTPUT: allow plumbing to output to an alternative index file.Junio C Hamano2007-04-03
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When defined, this allows plumbing commands that update the index (add, apply, checkout-index, merge-recursive, mv, read-tree, rm, update-index, and write-tree) to write their resulting index to an alternative index file while holding a lock to the original index file. With this, git-commit that jumps the index does not have to make an extra copy of the index file, and more importantly, it can do the update while holding the lock on the index. However, I think the interface to let an environment variable specify the output is a mistake, as shown in the documentation. If a curious user has the environment variable set to something other than the file GIT_INDEX_FILE points at, almost everything will break. This should instead be a command line parameter to tell these plumbing commands to write the result in the named file, to prevent stupid mistakes. Signed-off-by: Junio C Hamano <junkio@cox.net>
* | | | | Merge branch 'fp/make-j'Junio C Hamano2007-04-07
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | * fp/make-j: Makefile: Add '+' to QUIET_SUBDIR0 to fix parallel make.
| * | | | | Makefile: Add '+' to QUIET_SUBDIR0 to fix parallel make.Fernando J. Pereda2007-04-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Fernando J. Pereda <ferdy@gentoo.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
* | | | | | Merge branch 'cc/bisect'Junio C Hamano2007-04-07
|\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * cc/bisect: git-bisect: allow bisecting with only one bad commit. t6030: add a bit more tests to git-bisect git-bisect: modernization Documentation: bisect: "start" accepts one bad and many good commits Bisect: teach "bisect start" to optionally use one bad and many good revs.
| * | | | | | git-bisect: allow bisecting with only one bad commit.Junio C Hamano2007-04-06
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This allows you to say: git bisect start git bisect bad $bad git bisect next to start bisection without knowing a good commit. This would have you try a commit that is half-way since the beginning of the history, which is rather wasteful if you already know a good commit, but if you don't (or your history is short enough that you do not care), there is no reason not to allow this. Signed-off-by: Junio C Hamano <junkio@cox.net>