summaryrefslogtreecommitdiff
path: root/git-sh-setup-script
AgeCommit message (Collapse)Author
2005-08-29Redo "revert" using three-way merge machinery.Junio C Hamano
The reverse patch application using "git apply" sometimes is too rigid. Since the user would get used to resolving conflicting merges by hand during the normal merge experience, using the same machinery would be more helpful rather than just giving up. Cherry-picking and reverting are essentially the same operation. You pick one commit, and apply the difference that commit introduces to its own commit ancestry chain to the current tree. Revert applies the diff in reverse while cherry-pick applies it forward. They share the same logic, just different messages and merge direction. Rewrite "git rebase" using "git cherry-pick". Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-08-28[PATCH] Make .git directory validation code test HEADLinus Torvalds
Inspired by a report by Kalle Valo, this changes git-sh-setup-script and the "setup_git_directory()" function to test that $GIT_DIR/HEAD is a symlink, since a number of core git features depend on that these days. We used to allow a regular file there, but git-fsck-cache has been complaining about that for a while, and anything that uses branches depends on the HEAD file being a symlink, so let's just encode that as a fundamental requirement. Before, a non-symlink HEAD file would appear to work, but have subtle bugs like not having the HEAD show up as a valid reference (because it wasn't under "refs"). Now, we will complain loudly, and the user can fix it up trivially instead of getting strange behaviour. This also removes the tests for "$GIT_DIR" and "$GIT_OBJECT_DIRECTORY" being directories, since the other tests will implicitly test for that anyway (ie the tests for HEAD, refs and 00 would fail). Signed-off-by: Linus Torvalds <torvalds@osdl.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-08-06[PATCH] Make git-sh-setup-script do what it was supposed to doLinus Torvalds
Duh. A missing && meant that half the tests that git-sh-setup-script were _meant_ to do were actually totally ignored. In particular, the git sanity checking ended up only testing that the GIT_OBJECT_DIRECTORY was sane, not that GIT_DIR itself was.. Signed-off-by: Linus Torvalds <torvalds@osdl.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-07-08Add "git-push-script" to make a more regular interfaceLinus Torvalds
It only does local and ssh pushes, because it's really just a wrapper for git-send-pack. We might make it do an rsync mirror or something, of course.
2005-07-08Add "git-sh-setup-script" for common git shell script setupLinus Torvalds
It sets up the normal git environment variables and a few helper functions (currently just "die()"), and returns ok if it all looks like a git archive. So use it something like . git-sh-setup-script || die "Not a git archive" to make the rest of the git scripts more careful and readable.