diff

How to get diff for specified user between two dates from git?

北慕城南 提交于 2019-12-03 10:31:25
Or, how to use git whatchanged command to list commits for specified user? Is there any none-scripting way? (builtin git command) I believe there's no such a way to get a diff only knowing dates. As of today you can do the following: git log --since "OCT 4 2011" --until "OCT 11 2011" --pretty=format:"%H" And then git diff between first and last revisions. If the revision list is far too long, use the above git log ... with | head -1 and | tail -1 to get the first and the last revisions. Note that the above git log will return revisions exactly between given dates, i.e. revisions for OCT 5, OCT

Ignore any blank space or line break in git-diff

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-03 10:05:52
I have the same file rendered in two different ways and want to compare it using git diff , taking care of ignoring every white-space, tab, line-break, carriage-return , or anything that is not strictly the source code of my files. I'm actually trying this: git diff --no-index --color --ignore-all-space <file1> <file2> but when some html tags are collapsed all on one line (instead of one per line and tabulated) git-diff detect is as a difference (while for me it is not). <html><head><title>TITLE</title><meta ...... is different from <html> <head> <title>TITLE</title> <meta ...... What option

line-end agnostic diff?

时光毁灭记忆、已成空白 提交于 2019-12-03 09:49:31
I'm working on a mac, with some fairly old files. Different files were created by different programs, so some of them end with \r (mac) and some with \n (unix). I want to be able to run commands like diff, grep, etc on these files, but the ones that have \r are treated as one giant line. does anyone know of a version of diff, grep, etc that will work correctly with all new-lines? ETA: I'd also like them to be unix utilities so I can use them in scripts, emacs, etc... As Jay said, Diff'nPatch seems what you are looking for. Alternatively you can convert all your '\r' line endings in '\n' in a

“Diffing” objects from a relational database

青春壹個敷衍的年華 提交于 2019-12-03 09:42:57
问题 Our win32 application assembles objects from the data in a number of tables in a MySQL relational database. Of such an object, multiple revisions are stored in the database. When storing multiple revisions of something, sooner or later you'll ask yourself the question if you can visualize the differences between two revisions :) So my question is: what would be a good way to "diff" two such database objects? Would you do the comparison at the database level? (Doesn't sound like a good idea:

Using Tortoise SVN diff in TFS

可紊 提交于 2019-12-03 09:36:04
问题 I want to use Tortoise SVN diff utility with TFS. I know how to configure user tools in TFS. What I need is installer for Tortoise SVN diff utility. I think I need to install full Tortoise SVN to get SVN diff tool, is there a standalone version of this tool available for download? I know various other diff tools are available like winMerge etc. but I am very much familiar with tortoise svn diff. 回答1: The TSVN diff tools are available separately. See the download page, scroll down to "Tools".

How does a wiki handle multiple simultaneous edits?

孤者浪人 提交于 2019-12-03 09:19:47
问题 This has always lingered in the back of my mind, so I figure I might as well go ahead and ask. How does a wiki handle multiple edits on the same content? Here's a simplistic example of what I'm asking. Let's say that a page has the following content: I'm a page! And now let's say that two go to edit that page. Each person adds a sentence: Person one: I'm a page! I'm a second sentence in the same page! Person two: I'm a page! I'm a second sentence! Imagine each person's second sentence being

Also use comma as a word separator in diff

北战南征 提交于 2019-12-03 09:11:05
问题 How can I add , as a word separator for git diff --word-diff? For instance I would like the diff to recognize that function(A,B,C) -> function(A, B, C) only has added the spaces instead of replacing the whole line. 回答1: Use --word-diff-regex : --word-diff-regex=<regex> Use <regex> to decide what a word is, instead of considering runs of non-whitespace to be a word. Also implies --word-diff unless it was already enabled. Every non-overlapping match of the <regex> is considered a word. Anything

Telling git to follow moved content (not simply moved files)

风流意气都作罢 提交于 2019-12-03 09:06:24
问题 While refactoring source code, sometimes you need to move big blocks of text inside a file, or even to a new file. You create a branch refactored and commit away: $git checkout master $git branch refactored $git checkout refactored <move code around> $git commit -m "refactored code" However, people may commit on top of the old pre-refactor branch, changing the code that was moved: $git checkout master <change code that was moved elsewhere on branch refactored> $git commit -m "bugfix" On

Building an HTML Diff/Patch Algorithm

你离开我真会死。 提交于 2019-12-03 08:46:09
问题 A description of what I'm going to accomplish: Input 2 (N is not essential) HTML documents. Standardize the HTML format Diff the two documents -- external styles are not important but anything inline to the document will be included. Determine delta at the HTML Block Element level. Expanding the last point: Imagine two pages of the same site that both share a sidebar with what was probably a common ancestor that has been copy/pasted. Each page has some minor changes to the sidebar. The diff

How to compare files with same names in two different directories using a shell script

梦想的初衷 提交于 2019-12-03 08:42:23
问题 Before moving on to use SVN, I used to manage my project by simply keeping a /develop/ directory and editing and testing files there, then moving them to the /main/ directory. When I decided to move to SVN, I needed to be sure that the directories were indeed in sync. So, what is a good way to write a shell script [ bash ] to recursively compare files with the same name in two different directories? Note: The directory names used above are for sample only. I do not recommend storing your code