aboutsummaryrefslogtreecommitdiff
path: root/apply.c
Commit message (Collapse)AuthorAge
* git-apply: add "--check" option to check that the diff makes senseLinus Torvalds2005-05-26
| | | | | It currently only verifies the index against the working directory, it doesn't actually verify the diff fragments themselves yet.
* git-apply: when validating default names, check the final EOLN tooLinus Torvalds2005-05-26
| | | | | This means that filenames are totally unambiguous even if they have spaces or tabs in them.
* git-apply: pick up default filenames from "diff --git" header lineLinus Torvalds2005-05-26
| | | | | Pure mode changes, and deletes or creates of empty files won't have this information anywhere else.
* git-apply: make the diffstat output happen for "--stat" only.Linus Torvalds2005-05-26
| | | | | | Slowly this is takign the form of a program that we'd actually use. Now "git-apply --stat" basically ends up being a perfectly useful diffstat.
* git-apply: implement "diffstat" outputLinus Torvalds2005-05-26
| | | | | Hey, it's almost free by now, and it's a good way to see that we parse the patches correctly.
* git-apply: parse the whole list of patches into memory firstLinus Torvalds2005-05-26
| | | | | | | | | | Make it a clear two-phase thing: first a read-only parse of the patch itself (which is independent of any current index information), and then the second phase actually uses the patch. The second phase might not be a real apply, it could be just a diffstat, for example. Which is trivial to do once the patch is parsed.
* [PATCH] Squelch compiler warningJunio C Hamano2005-05-24
| | | | | | | Not important but I am a bit annoyed by gcc complaining about the control falling out of the function without returning value. Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* git-apply: more consistency checks on gitdiff filenamesLinus Torvalds2005-05-23
| | | | | | There's some duplication of filenames when doing filename operations (creates, deletes, renames and copies), and this makes us verify that the pathnames match when they should.
* git-apply: start using the index file information.Linus Torvalds2005-05-23
| | | | | Right now we only use it to figure out what the filename might be when that is ambiguous, but we'll get there..
* git-apply: if no input files specified, apply stdinLinus Torvalds2005-05-23
| | | | This makes it act more like a traditional UNIX thing (eg "cat").
* git-apply: unknown modes are zero, not -1Linus Torvalds2005-05-23
|
* git-apply: parse the diff headers (both traditional and new)Linus Torvalds2005-05-23
| | | | | | | | | .. and print out the information. This sets up all the pathname information, and whether it's a new file, deleted file, rename, copy or whatever. It's slowly getting to the point where it all comes together, and we can actually apply all the information that we've gathered.
* git-apply: improve error detection and messagesLinus Torvalds2005-05-23
| | | | | | In particular, give line numbers when detecting corrupt patches. This makes the tool a lot more friendly (indeed, much more so than regular "patch", I think).
* git-apply: bad patch fragments are fatalLinus Torvalds2005-05-23
| | | | | Don't just stop at them and look for the next header. Die, die, die!
* Start implementing "git-apply"Linus Torvalds2005-05-23
This applies git patches (and old-style unified diffs) in the index, rather than doing it in the working directory. That allows for a lot more flexibility, and means that if a patch fails, we aren't going to mess up the working directory. NOTE! This is just the first cut at it, and right now it only parses the incoming patch, it doesn't actually apply it yet.