4 ms·
I’d also like to add on a different note, I don’t really get why git can’t support docx, pptx, and xlsx. They’re open standards not binary blobs. Basically just
by vxNsr 7y ago
I’d also like to add on a different note, I don’t really get why git can’t support docx, pptx, and xlsx. They’re open standards not binary blobs. Basically just zipped xml.
- scrollaway 7y agoYou can configure it to support it. Git supports configuring different diff programs for different file types. And there are tools to diff docx etc.
- savolai 7y agoNow if only github desktop had built in support for those extensions/configurations.
- xenadu02 7y agoCan you explain how to do that? I must be missing something because all I could find was merge tool support but no mechanism to tell Git globally that all files with extension "xyz" should use this specific merge tool.
- bhl 7y agoAccording to this StackOverflow post [1], you'll need to write merge driver. I was looking at this when trying to hack git to use conflict-free replicated data types (CRDTs) as a fallback for a specific document type. [1] https://stackoverflow.com/questions/23140240/git-how-do-i-add-a-custom-merge-strategy https://stackoverflow.com/questions/23140240/git-how-do-i-ad...
- giornogiovanna 7y agoCan I configure Git such that the merge of Haskell source code (any language will do) with base A: add x y = x + y left B: add z y = z + y and right C: add x w = x + w succeeds without a conflict?
- baddox 7y agoSeems like you’d need a language-aware diff algorithm that can parse the language then diff the AST.
- thaumasiotes 7y agoI don't like the example. Unless I'm missing something, all three of these are exactly equivalent, so you could accept any of them as the result of a merge. But the problem with that idea is that two different people explicitly made a change that looks meaningless. That tells us that we're evaluating "equivalent" incorrectly, which means we don't actually have any remaining justification for picking one over another, and the conflict is hopeless without further input.
- giornogiovanna 7y agoThe correct merge, in my opinion would be D: add z w = z + w My justification is that if you put each identifier on a separate line like this: fn add( x: i32, y: i32, ) -> i32 { x + y } then as far as I know, Git would happily merge B and C into D.
- wilgertvelinga 7y agoFor Excel there is this: https://www.xltrail.com/ https://www.xltrail.com/ I haven't tried it but it looks OK.
- fzumstein 7y agoIf you write VBA in Excel, there is a free Git extension called Git XL that we maintain which is able to properly Git merge your code directly in Excel: https://github.com/xlwings/git-xl https://github.com/xlwings/git-xl
- PaulWaldman 7y agoThese files can contain binary data for embedded objects like pictures.
- cpach 7y agoDiffing the contents of an Office document is not trivial. See https://news.ycombinator.com/item?id=22222667 https://news.ycombinator.com/item?id=22222667
- sadfklsjlkjwt 7y agoImplementing good enough .docx parsing is very very hard/tedious. For example... .docx sometimes actually contains binary blobs... Unzip a few MS Office documents and have a go yourself.