aboutsummaryrefslogtreecommitdiffstats
path: root/git-checkout-script
AgeCommit message (Collapse)AuthorFilesLines
2005-07-22[PATCH] Audit rev-parse users.Junio C Hamano1-1/+1
This patch changes rev-parse users that pass a single argument that is supposed to be a rev parameter to use "--verify". Signed-off-by: Junio C Hamano <junkio@cox.net> Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-07-11Make "git checkout" create new branches on demandLinus Torvalds1-0/+23
In particular, if we check out something that isn't an old branch, it now requires a new branch-name to check the thing out into. So, for example: git checkout -b my-branch v2.6.12 will create the new branch "my-branch", and start it at v2.6.12, while git checkout master will just switch back to the master branch. Of course, if you want to create a new branch "my-branch" and _not_ check it out, you could have done so with just git-rev-parse v2.6.12^0 > .git/refs/heads/my-branch which I think I will codify as "git branch".
2005-07-11Make "git checkout" verify that the argument refers to a commitLinus Torvalds1-1/+1
We still need to create a new branch if it didn't refer to an existing branch, otherwise our HEAD will continue to point to something totally different than what we just checked out. I'll need to think about it. Maybe only do it with "-f" and force it to the "master" branch?
2005-07-08Add "git-sh-setup-script" for common git shell script setupLinus Torvalds1-1/+2
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.
2005-06-27git-checkout-script: use "--verify --revs-only" to parse revsLinus Torvalds1-1/+1
Sven Verdoolaege points out that I added the --verify option to git-rev-parse exactly for things like this, but didn't update the users.
2005-06-21Fix typo in git-checkout-script.Linus Torvalds1-1/+1
The confusion between "revs" vs "refs" caused us to not find the branch name, which in turn meant that we never switched the HEAD over to it.
2005-06-21Remove MERGE_HEAD in "git checkout/reset"Linus Torvalds1-1/+12
Both of these scripts will end up resetting the index to some specific head, and any unresolved merge will be forgotten.
2005-06-21git checkout: fix default head caseLinus Torvalds1-1/+1
The "${new=$old}" syntax only works for an undefined 'new', not for an empty one. I knew that. Really. I'm not stupid.
2005-06-21Make "git checkout" know about different branchesLinus Torvalds1-16/+23
Now "git checkout xyzzy" will check out branch "xyzzy" and switch the HEAD to it.
2005-06-21"git checkout": add "-u" flag to update HEAD conditionallyLinus Torvalds1-6/+9
And fix braino on testing "-f".
2005-06-21Add "git checkout" that does what the name suggestsLinus Torvalds1-0/+30
It is careful by default and refuses to overwrite old info, but if you want to force everything to be re-read, use the "-f" flag. Some day I'll make it take individual filenames too. Right now it's all-or-nothing.