summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Fix git-am --skipJan Harkes2005-12-161-0/+2
| | | | | | | | | | | | | | | | | | | git-am --skip does not unpack the next patch and ends up reapplying the old patch, believing that it is the new patch in the sequence. If the old patch applied successfully it will commit it with the supposedly skipped log message and ends up dropping the following patch. If the patch did not apply the user is left with the conflict he tried to skip and has to unpack the next patch in the sequence by hand to get git-am back on track. By clearing the resume variable whenever skips bumps the sequence counter we correctly unpack the next patch. I also added another resume= in the case a patch file is missing from the sequence to avoid the same problem when a file in the sequence was removed. Signed-off-by: Jan Harkes <jaharkes@cs.cmu.edu> Signed-off-by: Junio C Hamano <junkio@cox.net>
* Forbid pattern maching characters in refnames.Junio C Hamano2005-12-162-4/+8
| | | | | | by marking '?', '*', and '[' as bad_ref_char(). Signed-off-by: Junio C Hamano <junkio@cox.net>
* Examples of resetting.Junio C Hamano2005-12-164-0/+47
| | | | | | | | | | | Morten Welinder says examples of resetting is really about recovering from botched commit/pulls. I agree that pointers from commands that cause a reset to be needed in the first place would be very helpful. Also reset examples did not mention "pull/merge" cases. Signed-off-by: Junio C Hamano <junkio@cox.net>
* refs.c: off-by-one fix.Junio C Hamano2005-12-151-2/+5
| | | | Signed-off-by: Junio C Hamano <junkio@cox.net>
* We do not like "HEAD" as a new branch nameJohannes Schindelin2005-12-151-0/+5
| | | | | | | | | | | | | | This makes git-check-ref-format fail for "HEAD". Since the check is only executed when creating refs, the existing symbolic ref is safe. Otherwise these commands, most likely are pilot errors, would do pretty funky stuff: git checkout -b HEAD git pull . other:HEAD Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
* Sort globbed refname in show-branch.Junio C Hamano2005-12-151-0/+2
| | | | | | | | "git show-branch bugs/*" shows all branches whose name match the specified pattern, but in the order readdir() happened to returned. Sort them to make the output more predictable. Signed-off-by: Junio C Hamano <junkio@cox.net>
* small cleanup for diff-delta.cNicolas Pitre2005-12-151-22/+12
| | | | | | | | This patch removes unused remnants of the original xdiff source. No functional change. Possible tiny speed improvement. Signed-off-by: Nicolas Pitre <nico@cam.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
* git-whatchanged: Add usage stringFredrik Kuivinen2005-12-151-0/+5
| | | | | Signed-off-by: Fredrik Kuivinen <freku045@student.liu.se> Signed-off-by: Junio C Hamano <junkio@cox.net>
* git-log: Add usage stringFredrik Kuivinen2005-12-151-4/+4
| | | | | Signed-off-by: Fredrik Kuivinen <freku045@student.liu.se> Signed-off-by: Junio C Hamano <junkio@cox.net>
* git-diff: Usage string clean-upFredrik Kuivinen2005-12-151-8/+6
| | | | | Signed-off-by: Fredrik Kuivinen <freku045@student.liu.se> Signed-off-by: Junio C Hamano <junkio@cox.net>
* applymbox: typofixJunio C Hamano2005-12-151-1/+1
| | | | | | | | Sorry, I broke this command completely with the stupid typo. Noticed by Marco Costalba. Signed-off-by: Junio C Hamano <junkio@cox.net>
* get_sha1_basic(): corner case ambiguity fixJunio C Hamano2005-12-153-9/+75
| | | | | | | | | | | | | | When .git/refs/heads/frotz and .git/refs/tags/frotz existed, and the object name stored in .git/refs/heads/frotz were corrupt, we ended up picking tags/frotz without complaining. Worse yet, if the corrupt .git/refs/heads/frotz was more than 40 bytes and began with hexadecimal characters, it silently overwritten the initial part of the returned result. This commit adds a couple of tests to demonstrate these cases, with a fix. Signed-off-by: Junio C Hamano <junkio@cox.net>
* Documentation: tutorialJunio C Hamano2005-12-141-0/+6
| | | | | | | At the beginning of tutorial, refer the reader to everyday if she has not done so yet. Signed-off-by: Junio C Hamano <junkio@cox.net>
* svnimport: exit cleanly when we are up to dateMartin Langhoff2005-12-141-0/+7
| | | | | | | | | Now we detect that the SVN repo does not have new commits for us and exit cleanly, removing the lockfile. With this, svnimport supports being run on a cronjob to maintain a SVN2GIT gateway. Signed-off-by: Martin Langhoff <martin@catalyst.net.nz> Signed-off-by: Junio C Hamano <junkio@cox.net>
* clone-pack: make it usable for partial branch cloning.Junio C Hamano2005-12-142-3/+16
| | | | | | | | | | | | | | | | clone-pack had some logic to accept subset of remote refs from the command line and clone from there. However, it was never used in practice and its problems were not found out so far. This commit changes the command to output the object names of refs to the standard output instead of making a clone of the remote repository when explicit <head> parameters are given; the output format is the same as fetch-pack. The traditional behaviour of cloning the whole repository by giving no explicit <head> parameters stays the same. Signed-off-by: Junio C Hamano <junkio@cox.net>
* git rebase loses author name/email if given bad email addressAmos Waterland2005-12-141-0/+34
| | | | | | | | | | | If GIT_AUTHOR_EMAIL is of a certain form, `git rebase master' will blow away the author name and email when fast-forward merging commits. I have not tracked it down, but here is a testcase that demonstrates the behavior. Signed-off-by: Amos Waterland <apw@us.ibm.com> Acked-by: Michal Ostrowski <mostrows@watson.ibm.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
* Bugfixes for git-rebaseLukas Sandström2005-12-141-11/+18
| | | | | | | | | | | Fix bugs in git-rebase wrt rebasing another branch than the current HEAD, rebasing with a dirty working dir, and rebasing a proper decendant of the target branch. [jc: with a bit of hand-merging] Signed-off-by: Lukas Sandström <lukass@etek.chalmers.se> Signed-off-by: Junio C Hamano <junkio@cox.net>
* mailinfo and git-am: allow "John Doe <johndoe>"Junio C Hamano2005-12-142-1/+38
| | | | | | | | | | An isolated developer could have a local-only e-mail, which will be stripped out by mailinfo because it lacks '@'. Define a fallback parser to accomodate that. At the same time, reject authorless patch in git-am. Signed-off-by: Junio C Hamano <junkio@cox.net>
* define MAXPATHLEN for hosts that don't support itMartin Atukunda2005-12-141-0/+3
| | | | | | [jc: Martin says syllable (www.syllable.org) wants this.] Signed-off-by: Junio C Hamano <junkio@cox.net>
* Do not let errors pass by unnoticed when running `make check'.Junio C Hamano2005-12-141-1/+1
| | | | | | [jc: originally from Amos Waterland.] Signed-off-by: Junio C Hamano <junkio@cox.net>
* Merge branch 'hold/am'Junio C Hamano2005-12-143-42/+75
|\
| * git-am support for naked email messages (take 2)H. Peter Anvin2005-12-143-42/+75
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This allows git-am to accept single-message files as well as mboxes. Unlike the previous version, this one doesn't need to be explicitly told which one it is; rather, it looks to see if the first line is a From line and uses it to select mbox mode or not. I moved the logic to do all this into git-mailsplit, which got a new user interface as result, although the old interface is still available for backwards compatibility. [jc: applied with two obvious fixes.] Signed-off-by: H. Peter Anvin <hpa@zytor.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
* | rebase: do not get confused in fast-forward situation.Junio C Hamano2005-12-141-0/+3
| | | | | | | | | | | | | | | | When switching to another branch and rebasing it in a one-go, it failed to update the variable that holds the branch head, and did not detect fast-forward situation correctly. Signed-off-by: Junio C Hamano <junkio@cox.net>
* | Merge branch 'fk/usage'Junio C Hamano2005-12-1429-164/+142
|\ \
| * | applypatch: no need to do non-portable [[ ... ]]Junio C Hamano2005-12-141-1/+1
| | | | | | | | | | | | | | | | | | ... when old, proven, case would do. Signed-off-by: Junio C Hamano <junkio@cox.net>
| * | git-repack: Usage string clean-up, emit usage at incorrect invocationfreku045@student.liu.se2005-12-141-1/+2
| | | | | | | | | | | | | | | Signed-off-by: Fredrik Kuivinen <freku045@student.liu.se> Signed-off-by: Junio C Hamano <junkio@cox.net>
| * | git-rebase: Usage string clean-up, emit usage string at incorrect invocationfreku045@student.liu.se2005-12-141-2/+3
| | | | | | | | | | | | | | | Signed-off-by: Fredrik Kuivinen <freku045@student.liu.se> Signed-off-by: Junio C Hamano <junkio@cox.net>
| * | git-prune: Usage string clean-up, use the 'usage' functionfreku045@student.liu.se2005-12-141-1/+2
| | | | | | | | | | | | | | | Signed-off-by: Fredrik Kuivinen <freku045@student.liu.se> Signed-off-by: Junio C Hamano <junkio@cox.net>
| * | git-lost-found: Usage string clean-up, emit usage string at incorrect invocationfreku045@student.liu.se2005-12-141-1/+9
| | | | | | | | | | | | | | | Signed-off-by: Fredrik Kuivinen <freku045@student.liu.se> Signed-off-by: Junio C Hamano <junkio@cox.net>
| * | git-fetch: Usage string clean-up, emit usage string at unrecognized optionfreku045@student.liu.se2005-12-141-0/+5
| | | | | | | | | | | | | | | Signed-off-by: Fredrik Kuivinen <freku045@student.liu.se> Signed-off-by: Junio C Hamano <junkio@cox.net>
| * | git-cherry: Usage string clean-up, use the 'usage' functionfreku045@student.liu.se2005-12-141-8/+5
| | | | | | | | | | | | | | | Signed-off-by: Fredrik Kuivinen <freku045@student.liu.se> Signed-off-by: Junio C Hamano <junkio@cox.net>
| * | git-applypatch: Usage string clean-up, emit usage string at incorrect invocationfreku045@student.liu.se2005-12-141-0/+4
| | | | | | | | | | | | | | | Signed-off-by: Fredrik Kuivinen <freku045@student.liu.se> Signed-off-by: Junio C Hamano <junkio@cox.net>
| * | git-am: Usage string clean-upfreku045@student.liu.se2005-12-141-7/+3
| | | | | | | | | | | | | | | Signed-off-by: Fredrik Kuivinen <freku045@student.liu.se> Signed-off-by: Junio C Hamano <junkio@cox.net>
| * | git-revert: Usage string clean-upfreku045@student.liu.se2005-12-141-14/+5
| | | | | | | | | | | | | | | Signed-off-by: Fredrik Kuivinen <freku045@student.liu.se> Signed-off-by: Junio C Hamano <junkio@cox.net>
| * | git-verify-tag: Usage string clean-up, emit usage string at incorrect invocationfreku045@student.liu.se2005-12-141-5/+7
| | | | | | | | | | | | | | | Signed-off-by: Fredrik Kuivinen <freku045@student.liu.se> Signed-off-by: Junio C Hamano <junkio@cox.net>
| * | Trivial usage string clean-upfreku045@student.liu.se2005-12-1414-89/+39
| | | | | | | | | | | | | | | Signed-off-by: Fredrik Kuivinen <freku045@student.liu.se> Signed-off-by: Junio C Hamano <junkio@cox.net>
| * | t3200: branch --help does not die anymore.Junio C Hamano2005-12-141-2/+2
| | | | | | | | | | | | Signed-off-by: Junio C Hamano <junkio@cox.net>
| * | Usage message clean-up, take #2Fredrik Kuivinen2005-12-144-34/+56
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There were some problems with the usage message clean-up patch series. I hadn't realised that subdirectory aware scripts can't source git-sh-setup. I propose that we change this and let the scripts which are subdirectory aware set a variable, SUBDIRECTORY_OK, before they source git-sh-setup. The scripts will also set USAGE and possibly LONG_USAGE before they source git-sh-setup. If LONG_USAGE isn't set it defaults to USAGE. If we go this way it's easy to catch --help in git-sh-setup, print the (long) usage message to stdout and exit cleanly. git-sh-setup can define a 'usage' shell function which can be called by the scripts to print the short usage string to stderr and exit non-cleanly. It will also be easy to change $0 to basename $0 or something else, if would like to do that sometime in the future. What follows is a patch to convert a couple of the commands to this style. If it's ok with everyone to do it this way I will convert the rest of the scripts too. [jc: thrown in to proposed updates queue for comments.] Signed-off-by: Junio C Hamano <junkio@cox.net>
* | Documentation: topic branchesJunio C Hamano2005-12-141-3/+4
|/ | | | | | | | | | Recommend git over ssh direct to master.kernel.org, instead of going over rsync to public machines, since this is meant to be a procedure for kernel subsystem maintainers. Also fix an obvious typo. Signed-off-by: Junio C Hamano <junkio@cox.net>
* Everyday: a bit more examples.Junio C Hamano2005-12-141-29/+118
| | | | | | | | | | | | Talk about the following as well: * git fetch --tags * Use of "git push" as a one-man distributed development vehicle. * Show example of remotes file for pulling and pushing. * Annotate git-shell setup. * Using Carl's update hook in a CVS-style shared repository. Signed-off-by: Junio C Hamano <junkio@cox.net>
* checkout-index: fix checking out specific path.Junio C Hamano2005-12-131-1/+1
| | | | | | | 3bd348aeea24709cd9be4b9d741f79b6014cd7e3 commit broke checking out specific paths. Signed-off-by: Junio C Hamano <junkio@cox.net>
* Make git-send-pack exit with error when some refs couldn't be pushed outPetr Baudis2005-12-132-2/+14
| | | | | | | | | | | | In case some refs couldn't be pushed out due to an error (mostly the not-a-proper-subset error), make git-send-pack exit with non-zero status after the push is over (that is, it still tries to push out the rest of the refs). [jc: I adjusted a test for this change.] Signed-off-by: Petr Baudis <pasky@suse.cz> Signed-off-by: Junio C Hamano <junkio@cox.net>
* [PATCH] allow merging any committishJunio C Hamano2005-12-131-1/+4
| | | | | | | | | | Although "git-merge" is advertised as the end-user level command (instead of being a "git-pull" backend), it was not prepared to take tag objects that point at commits and barfed when fed one. Sanitize the input while we validate them, for which we already have a loop. Signed-off-by: Junio C Hamano <junkio@cox.net>
* git-clone: tell the user a bit more about clone-pack failure.Junio C Hamano2005-12-131-1/+4
| | | | | | | | | | | | | | | | | When clone-pack has trouble with the remote, it dies unfriendly "EOF" error message. We cannot tell the reason why it failed from the local end; it could be that the repository did not exist, or configured not to serve over git-daemon, or a network failure. At least, saying clone-pack failed makes it a bit more meaningful. I am not convinced yet that removing the newly created directory is the right thing to do, so this commit leaves the new directory behind. Reported by Sam Ravnborg. Signed-off-by: Junio C Hamano <junkio@cox.net>
* Documentation: not learning core git commands.Junio C Hamano2005-12-132-22/+49
| | | | | | | | | | | | | | | | | | | | | | The initial section of tutorial was too heavy on internal workings for the first-time readers, so rewrite the introductory section of git(7) to start with "not learning core git commands" section and refer them to README to grasp the basic concepts, then Everyday to give overview with task/role oriented examples for minimum set of commands, and finally the tutorial. Also add to existing note in the tutorial that many too technical descriptions can be skipped by a casual reader. I initially started to review the tutorial, with the objective of ripping out the detailed technical information altogether, but I found that the level of details in the initial couple of sections that talk about refs and the object database in a hands-on fashion was about rigth, and left all of them there. I feel that reading about fsck-index and repack is too abstract without being aware of these directories and files. Signed-off-by: Junio C Hamano <junkio@cox.net>
* Documentation: diff examples.Junio C Hamano2005-12-132-0/+71
| | | | Signed-off-by: Junio C Hamano <junkio@cox.net>
* Documentation: fix missing links to git(7)Junio C Hamano2005-12-123-1/+13
| | | | | | Also move pack protocol description to technical/. Signed-off-by: Junio C Hamano <junkio@cox.net>
* Documentation: more examples.Junio C Hamano2005-12-127-26/+209
| | | | Signed-off-by: Junio C Hamano <junkio@cox.net>
* Everyday: a bit more example.Junio C Hamano2005-12-121-17/+93
| | | | Signed-off-by: Junio C Hamano <junkio@cox.net>
* diffcore-break: do not break too small filepair.Junio C Hamano2005-12-121-2/+3
| | | | | | | | Somehow we checked only one side and not the other. By checking the filesize upfront, we can bypass generating delta unnecessarily. Signed-off-by: Junio C Hamano <junkio@cox.net>