diff

diff returning entire file for identical files

心已入冬 提交于 2019-11-27 08:35:01
I've got a website that has a git repo. I cloned the repo so that I could develop in one directory and then push to the repo, and then pull in the live/prod directory (would be interested in suggestions for a better way to do this if there is one, but that's outside the scope of this question). I did the following in the live directory to push all my latest changes: git add . git commit -a // added a message git push I then did the following in the dev directory: git clone git@bitbucket.org:user/repo.git I then opened two files, prod/root/test.php and dev/root/test.php, and they looked

git difftool to give directory compare? [duplicate]

拈花ヽ惹草 提交于 2019-11-27 07:58:29
This question already has an answer here: Directory comparison of Git branches 3 answers Is it possible to get the git difftool command to open a directory compare between the changed files and the staging/checked files? So ideally, if 2 files have changed, they would be the only 2 shown, but within a directory compare. I've read posts about getting git to give all file diffs in parallel, so tools like BeyondCompare has all the diffs in tabs , but im not happy with that! One could pull a copy of the changed files from staging/checked in files into a temp folder, and then open that up. Is that

Is clearcase path is a standard one — '@@' and string after that

蹲街弑〆低调 提交于 2019-11-27 07:28:32
问题 is the clearcase path syntax is universal one. my_source.c@@\main\10.1_bugfix\another_branch\0 is this path is standard one? I invoked the following in emacs and it is working. how does emacs diff understand this path. somehow clearcase informs operating system how to interpret that path. or emacs-diff know of this path syntax? $ diff my_source.c@@\main\10.1_bugfix\another_branch\0 my_source.c 回答1: This is an extended path . It is working with dynamic views, which give access to the branches

Context-aware merge?

那年仲夏 提交于 2019-11-27 07:05:41
Is there any diff/merge tool for programming languages, that works in a syntax-aware way (like XML Diff Tool), doing more than compare line-by-line (and optionally ignoring whitespace). I'm interested in a program actually following the language syntax and delimeters, suggesting changes without breaking syntactic correctness, or bundling statements separated over multiple lines. Example behavior would be: *upon finding an if(){ which introduces an extra nesting level automatically bundle the closing brace } several lines below with it.) *keep matching syntax elements together, avoid silliness

How can I get a git submodule's associated commit ID from a past commit in the parent clone?

拈花ヽ惹草 提交于 2019-11-27 07:04:36
Is there a way, short of actually checking out the parent commit, to determine a submodule's SHA-1 commit ID based on a commit ID in the parent clone? I know I can find the currently associated SHA-1 with 'git submodule'. Here's an example: I have a clone with a single submodule 'foo' that has changed several times in the last month. I have a tag in the parent clone that is a few weeks old called 'released-1.2.3'. I want to find out what the associated SHA-1 of 'foo' was for this tagged commit. I could simply check out 'released-1.2.3' and use git-submodule to see, but I'm wondering if there's

Efficiently identify changed fields in CSV files using c#

你说的曾经没有我的故事 提交于 2019-11-27 07:00:32
问题 This turned out to be more difficult than I thought. Basically, each day a snapshot of a customer master list is being dumped by a system into CSV. It contains about 120000 records and 60 fields. About 25mb. Anyway, I'd like to report on values that change between one snapshot and another. It isn't a plan file diff, as it must be matched on the leftmost column value which contains the customer's unique number. Lines could be inserted/removed etc. All fields are strings, including the

Any way to use a custom diff tool with cleartool/clearcase?

六月ゝ 毕业季﹏ 提交于 2019-11-27 06:48:04
I'd like to use my own diff when working in a clearcase snapshot view. As far as I can see, there is no way to specify a diff tool when running " cleartool diff ", so I was thinking I could run something like " mydiff <predecessor file> <modified file in my view> ", but I don't know enough about ClearCase to be able to find the "predecessor file" to diff against. Any way to do this? Forgot to mention (until now, after reading the first two responses dealing with windows) that this is on Unix, and I am not allowed to muck with the ClearCase configuration. VonC How to change default diff tools

Adding new column with diff() function when there is one less row in R

本小妞迷上赌 提交于 2019-11-27 06:29:35
问题 If I have a sample data frame like mtcars, and I want to find the difference between mtcars$qsec for all rows, I can do diff(mtcars$qsec). But is there a simple way to make diff(mtcars$qsec) a new column in the original mtcars data frame? I'm finding it difficult because there's one less row in diff(mtcars$qsec) than the rest of mtcars. > head(mtcars,3) mpg cyl disp hp drat wt qsec vs am gear carb Mazda RX4 21.0 6 160.0 110 3.90 2.620 16.46 0 1 4 4 Mazda RX4 Wag 21.0 6 160.0 110 3.90 2.875 17

What does “@@ -1 +1 @@” mean in Git's diff output?

两盒软妹~` 提交于 2019-11-27 06:11:07
I've been collecting data from the information returned from git diff <commitId>..<commitId> and I ran into @@ -1 +1 @@ I can't figure out what that's telling me. I've searched a bit on Google but to no avail. Todd A. Jacobs It's a unified diff hunk identifier. This is documented by GNU Diffutils. The unified output format starts with a two-line header, which looks like this: --- from-file from-file-modification-time +++ to-file to-file-modification-time The time stamp looks like 2002-02-21 23:30:39.942229878 -0800 to indicate the date, time with fractional seconds, and time zone. The

Why diff with ignore matching lines doesn't work as expected?

穿精又带淫゛_ 提交于 2019-11-27 05:58:09
问题 I have the following files: file1.txt ################################################### Dump stat Title information for 'ssummary' view ################################################### Tab=> 'Instance' Title=> {text {Total instances: 7831}} Tab=> 'Device' Title=> {text {Total spice devices: 256}} Tab=> 'Memory' Title=> {text {Total memory allocated: 962192 kB}} Tab=> 'Cpu' Title=> {text {Total cumulative CPU time: 9030 ms}} file2.txt ###################################################