Comments (5)
Would you accept a pull request to fix this?
from go-diff.
Thanks for the proposal. I think we would. It seems like the set of inputs we understand will only increase + the empty diff makes sense. @eseliger @mrnugget thoughts? Any concerns around the nil time param?
from go-diff.
Don't think so, we should probably make sure we do proper nil checks in our codebase, but that shouldn't affect work in this repository.
I couldn't find any resources by a quick google search that defined this behavior, and I am struggling to understand what it actually means. So if it's only in source_a
, that basically means deleted, right? And the other way around, that means it's created?
If so, I would have expected the expected result you posted would be [2].NewName: "source_b/file_3.txt
and [2].OrigName: nil
, so I must be missing something :) Can you clarify how the "Only in ..." is different from deleted/created?
from go-diff.
@eseliger yes, you are right :) It mostly clarifies deleted/created files (except maybe files that actually have been renamed, but this couldn't be handled, as they will be marked as deleted with originName and created with NewName). It will just require an extra step for checking whether source_a should be marked as OrigSource or NewSource.
from go-diff.
Sounds like it's another way to express deleted/created in diffs and supporting that would just be additional functionality that would have no effect on the existing code. If so, yeah, I think we should accept a PR :)
from go-diff.
Related Issues (20)
- Add support for parsing multi-file diffs affecting binary files. HOT 3
- readme.md HOT 1
- Need an option to keep no newline message HOT 2
- tag the code with v1.0.0 (or v0.0.1 etc.) HOT 2
- Remove sourcegraph.com vanity import path HOT 5
- Parsing of diffs on windows fails
- diff: latest release version still has old module path HOT 14
- Rename of repository not handled well HOT 13
- sourcegraph.com/sourcegraph/[email protected]: parsing go.mod: unexpected module path "github.com/sourcegraph/go-diff" HOT 4
- Rename OrigName/NewName to OldPath/NewPath HOT 1
- No proper handling for special characters in file names
- Binary support v1
- Copy detection missing
- nil-panic when parsing diffs in which lines starting with `--` were removed HOT 1
- Passthrough for non-diff output HOT 3
- Tests will only pass if user timezone is Pacific. HOT 1
- can't parse patch: parsing time
- License is truncated HOT 1
- Two cases of unreachable code.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from go-diff.