- 06 6月, 2005 6 次提交
-
-
由 Linus Torvalds 提交于
A "--stat" or a "--check" will just be quiet, but if you try to apply something with no changes, that's an error.
-
由 Linus Torvalds 提交于
It's not "rename from" and "rename to", it's "rename old" and "rename new". Which is illogical and doesn't match the "copy from/to" case, but that's life. Maybe Junio will fix it up one of these days.
-
由 Linus Torvalds 提交于
We update the index only if the "--index" flag is given, so you can actually use this as a strange kind of "patch" program even for non-git usage. Not that you'd likely want to, but it comes in handy for testing. This _should_ more or less get everythign right, but as usual I leave the testing to the usrs..
-
由 Linus Torvalds 提交于
(And fix name handling for when we have an implied create or delete event from a traditional diff).
-
由 Linus Torvalds 提交于
This applies the fragments in memory, but doesn't actually write the results out to the files yet. But we now do all the difficult parts, the rest is just basically writing the results out and updating the index.
-
由 Linus Torvalds 提交于
Right now it requires that the fragment offsets be exact, and it doesn't actually apply the fragment yet, but it does find where it goes and verify the data. Next step: actually applying the fragment changes.
-
- 01 6月, 2005 2 次提交
-
-
由 Linus Torvalds 提交于
It had already tried to do that, but with the independent rounding of the number of '+' and '-' characters, it would sometimes do 80-char lines after all.
-
由 Linus Torvalds 提交于
It just causes things like "git-apply --stat" to parse traditional patch headers differently depending on what your index is, which is nasty.
-
- 31 5月, 2005 1 次提交
-
-
由 Junio C Hamano 提交于
The way broken deletes and creates are shown in the -p (diff-patch) output format has become consistent with how rename/copy edits are shown. They will show "dissimilarity index" value, immediately following the "deleted file mode" and "new file mode" lines. The git-apply is taught to grok such an extended header. Signed-off-by: NJunio C Hamano <junkio@cox.net>
-
- 27 5月, 2005 6 次提交
-
-
由 Linus Torvalds 提交于
It currently only verifies the index against the working directory, it doesn't actually verify the diff fragments themselves yet.
-
由 Linus Torvalds 提交于
This means that filenames are totally unambiguous even if they have spaces or tabs in them.
-
由 Linus Torvalds 提交于
Pure mode changes, and deletes or creates of empty files won't have this information anywhere else.
-
由 Linus Torvalds 提交于
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.
-
由 Linus Torvalds 提交于
Hey, it's almost free by now, and it's a good way to see that we parse the patches correctly.
-
由 Linus Torvalds 提交于
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.
-
- 25 5月, 2005 1 次提交
-
-
由 Junio C Hamano 提交于
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: NLinus Torvalds <torvalds@osdl.org>
-
- 24 5月, 2005 8 次提交
-
-
由 Linus Torvalds 提交于
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.
-
由 Linus Torvalds 提交于
Right now we only use it to figure out what the filename might be when that is ambiguous, but we'll get there..
-
由 Linus Torvalds 提交于
This makes it act more like a traditional UNIX thing (eg "cat").
-
由 Linus Torvalds 提交于
-
由 Linus Torvalds 提交于
.. 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.
-
由 Linus Torvalds 提交于
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).
-
由 Linus Torvalds 提交于
Don't just stop at them and look for the next header. Die, die, die!
-
由 Linus Torvalds 提交于
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.
-