<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/diff-files.c, branch v1.3.2</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v1.3.2</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v1.3.2'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2006-03-30T07:54:13Z</updated>
<entry>
<title>tree/diff header cleanup.</title>
<updated>2006-03-30T07:54:13Z</updated>
<author>
<name>Junio C Hamano</name>
<email>junkio@cox.net</email>
</author>
<published>2006-03-30T06:55:43Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=1b0c7174a17de801051402ed35ac085ebd91e88c'/>
<id>urn:sha1:1b0c7174a17de801051402ed35ac085ebd91e88c</id>
<content type='text'>
Introduce tree-walk.[ch] and move "struct tree_desc" and
associated functions from various places.

Rename DIFF_FILE_CANON_MODE(mode) macro to canon_mode(mode) and
move it to cache.h.  This macro returns the canonicalized
st_mode value in the host byte order for files, symlinks and
directories -- to be compared with a tree_desc entry.
create_ce_mode(mode) in cache.h is similar but is intended to be
used for index entries (so it does not work for directories) and
returns the value in the network byte order.

Signed-off-by: Junio C Hamano &lt;junkio@cox.net&gt;
</content>
</entry>
<entry>
<title>Merge branch 'jc/nostat'</title>
<updated>2006-02-22T06:33:21Z</updated>
<author>
<name>Junio C Hamano</name>
<email>junkio@cox.net</email>
</author>
<published>2006-02-22T06:33:21Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=ee072260dbff6914c24d956bcc2d46882831f1a0'/>
<id>urn:sha1:ee072260dbff6914c24d956bcc2d46882831f1a0</id>
<content type='text'>
* jc/nostat:
  cache_name_compare() compares name and stage, nothing else.
  "assume unchanged" git: documentation.
  ls-files: split "show-valid-bit" into a different option.
  "Assume unchanged" git: --really-refresh fix.
  ls-files: debugging aid for CE_VALID changes.
  "Assume unchanged" git: do not set CE_VALID with --refresh
  "Assume unchanged" git
</content>
</entry>
<entry>
<title>combine-diff: diff-files fix (#2)</title>
<updated>2006-02-14T09:11:42Z</updated>
<author>
<name>Junio C Hamano</name>
<email>junkio@cox.net</email>
</author>
<published>2006-02-14T09:11:42Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=9ece7169a434d69a942b71dc49f507da37bbdbc3'/>
<id>urn:sha1:9ece7169a434d69a942b71dc49f507da37bbdbc3</id>
<content type='text'>
The raw format "git-diff-files -c" to show unmerged state forgot
to initialize the status fields from parents, causing NUL
characters to be emitted.

Signed-off-by: Junio C Hamano &lt;junkio@cox.net&gt;
</content>
</entry>
<entry>
<title>combine-diff: move formatting logic to show_combined_diff()</title>
<updated>2006-02-09T23:23:06Z</updated>
<author>
<name>Junio C Hamano</name>
<email>junkio@cox.net</email>
</author>
<published>2006-02-09T23:23:06Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=0a798076b8d1a4a31bf2b24c564e2a99fd1c43a1'/>
<id>urn:sha1:0a798076b8d1a4a31bf2b24c564e2a99fd1c43a1</id>
<content type='text'>
This way, diff-files can make use of it.  Also implement the
full suite of what diff_flush_raw() supports just for
consistency.  With this, 'diff-tree -c -r --name-status' would
show what is expected.

There is no way to get the historical output (useful for
debugging and low-level Plumbing work) anymore, so tentatively
it makes '-m' to mean "do not combine and show individual diffs
with parents".

diff-files matches diff-tree to produce raw output for -c.  For
textual combined diff, use -p -c.

Signed-off-by: Junio C Hamano &lt;junkio@cox.net&gt;
</content>
</entry>
<entry>
<title>"Assume unchanged" git</title>
<updated>2006-02-09T05:54:42Z</updated>
<author>
<name>Junio C Hamano</name>
<email>junkio@cox.net</email>
</author>
<published>2006-02-09T05:15:24Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=5f73076c1a9b4b8dc94f77eac98eb558d25e33c0'/>
<id>urn:sha1:5f73076c1a9b4b8dc94f77eac98eb558d25e33c0</id>
<content type='text'>
This adds "assume unchanged" logic, started by this message in the list
discussion recently:

	&lt;Pine.LNX.4.64.0601311807470.7301@g5.osdl.org&gt;

This is a workaround for filesystems that do not have lstat()
that is quick enough for the index mechanism to take advantage
of.  On the paths marked as "assumed to be unchanged", the user
needs to explicitly use update-index to register the object name
to be in the next commit.

You can use two new options to update-index to set and reset the
CE_VALID bit:

	git-update-index --assume-unchanged path...
	git-update-index --no-assume-unchanged path...

These forms manipulate only the CE_VALID bit; it does not change
the object name recorded in the index file.  Nor they add a new
entry to the index.

When the configuration variable "core.ignorestat = true" is set,
the index entries are marked with CE_VALID bit automatically
after:

 - update-index to explicitly register the current object name to the
   index file.

 - when update-index --refresh finds the path to be up-to-date.

 - when tools like read-tree -u and apply --index update the working
   tree file and register the current object name to the index file.

The flag is dropped upon read-tree that does not check out the index
entry.  This happens regardless of the core.ignorestat settings.

Index entries marked with CE_VALID bit are assumed to be
unchanged most of the time.  However, there are cases that
CE_VALID bit is ignored for the sake of safety and usability:

 - while "git-read-tree -m" or git-apply need to make sure
   that the paths involved in the merge do not have local
   modifications.  This sacrifices performance for safety.

 - when git-checkout-index -f -q -u -a tries to see if it needs
   to checkout the paths.  Otherwise you can never check
   anything out ;-).

 - when git-update-index --really-refresh (a new flag) tries to
   see if the index entry is up to date.  You can start with
   everything marked as CE_VALID and run this once to drop
   CE_VALID bit for paths that are modified.

Most notably, "update-index --refresh" honours CE_VALID and does
not actively stat, so after you modified a file in the working
tree, update-index --refresh would not notice until you tell the
index about it with "git-update-index path" or "git-update-index
--no-assume-unchanged path".

This version is not expected to be perfect.  I think diff
between index and/or tree and working files may need some
adjustment, and there probably needs other cases we should
automatically unmark paths that are marked to be CE_VALID.

But the basics seem to work, and ready to be tested by people
who asked for this feature.

Signed-off-by: Junio C Hamano &lt;junkio@cox.net&gt;
</content>
</entry>
<entry>
<title>combine-diff: show mode changes as well.</title>
<updated>2006-02-06T21:06:49Z</updated>
<author>
<name>Junio C Hamano</name>
<email>junkio@cox.net</email>
</author>
<published>2006-02-06T20:53:07Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=2454c962fbe82f23aac4a5d78a0c3b5ffaed83a0'/>
<id>urn:sha1:2454c962fbe82f23aac4a5d78a0c3b5ffaed83a0</id>
<content type='text'>
Signed-off-by: Junio C Hamano &lt;junkio@cox.net&gt;
</content>
</entry>
<entry>
<title>combine-diff: remove misguided --show-empty hack.</title>
<updated>2006-02-06T06:25:00Z</updated>
<author>
<name>Junio C Hamano</name>
<email>junkio@cox.net</email>
</author>
<published>2006-02-06T06:25:00Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=e3c3a550d4815d34b5674776c36cdd6d8a31ab85'/>
<id>urn:sha1:e3c3a550d4815d34b5674776c36cdd6d8a31ab85</id>
<content type='text'>
Now --always flag is available in diff-tree, there is no reason
to have that hack in the diffcore side.

Signed-off-by: Junio C Hamano &lt;junkio@cox.net&gt;
</content>
</entry>
<entry>
<title>diff-files -c/--cc: combine only when both ours and theirs exist.</title>
<updated>2006-01-28T10:26:18Z</updated>
<author>
<name>Junio C Hamano</name>
<email>junkio@cox.net</email>
</author>
<published>2006-01-28T10:09:08Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=939aabbf7d108b5d6830bf5cd89abc910cc9ff27'/>
<id>urn:sha1:939aabbf7d108b5d6830bf5cd89abc910cc9ff27</id>
<content type='text'>
The previous round forgot to make sure there actually are two
versions to compare against the working tree version.  Otherwise
using -c/--cc would not make much sense.

Also plug a small memory leak.

Signed-off-by: Junio C Hamano &lt;junkio@cox.net&gt;
</content>
</entry>
<entry>
<title>diff-files: -c and --cc options.</title>
<updated>2006-01-28T08:08:29Z</updated>
<author>
<name>Junio C Hamano</name>
<email>junkio@cox.net</email>
</author>
<published>2006-01-28T08:03:38Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=ea726d02e9677a66586d7ffebe97f112ab6dab33'/>
<id>urn:sha1:ea726d02e9677a66586d7ffebe97f112ab6dab33</id>
<content type='text'>
This ports the "combined diff" to diff-files so that differences
to the working tree files since stage 2 and stage 3 are shown
the same way as combined diff output from diff-tree for the
merge commit would be shown if the current working tree files
are committed.

Signed-off-by: Junio C Hamano &lt;junkio@cox.net&gt;
</content>
</entry>
<entry>
<title>diff-files: show diffs with stage0 and unmerged stage at the same time.</title>
<updated>2005-11-30T10:17:51Z</updated>
<author>
<name>Junio C Hamano</name>
<email>junkio@cox.net</email>
</author>
<published>2005-11-30T10:16:36Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=15bf57a18aaf10c038e2026dfe54281edbb6080a'/>
<id>urn:sha1:15bf57a18aaf10c038e2026dfe54281edbb6080a</id>
<content type='text'>
After thinking about it more, I realized that much of the change
I did on top of Linus' version does not make much sense.  This
commit reverts it so that it by default shows diffs with stage0
paths or stage2 paths with working tree; the unmerged stage to
use can be overridden with -1/-2/-3 option (-2 is the default so
essentially is a no-op).

When the index file is unmerged, we are by definition in the
middle of a conflicting merge, and we should show the diff with
stage 2 by default.  More importantly, paths without conflicts
are updated in the working tree and collapsed to stage0 in the
index, so showing diff with stage0 at the same time does not
hurt.  In normal cases, stage0 entries should be in sync with
the working tree files and does not clutter the output.  It even
helps the user to realize that the working tree has local
changes unrelated to the merge and remember to be careful not to
do a "git-commit -a" after resolving the conflicts.

When there is no unmerged entries, giving diff_unmerged_stage a
default value of 2 does not cause any harm, because it would not
be used anyway.  So in all, always showing diff between stage0
paths and unmerged entries from a stage (defaulting to 2) is the
right thing to do, as Linus originally did.

Signed-off-by: Junio C Hamano &lt;junkio@cox.net&gt;
</content>
</entry>
</feed>
