Commit graph

8 commits

Author SHA1 Message Date
Junio C Hamano c4758d3c93 Fix read-tree not to discard errors
This fixes the issue identified with recently added tests to t1004

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-03-18 22:17:22 -07:00
Junio C Hamano 8a785dc921 Add tests to catch problems with un-unlinkable symlinks
This currently fails not because we refuse to check out, but because we
detect error but incorrectly discard it in the callchain.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-03-18 22:17:22 -07:00
Junio C Hamano 29dc133198 git-merge-one-file: fix longstanding stupid thinko
When a merge result creates a new file, and when our side already has a
file in the path, taking the merge result may clobber the untracked file.
However, the logic to detect this situation was totally the wrong way.  We
should complain when the file exists, not when the file does not exist.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-03-18 22:17:17 -07:00
Linus Torvalds 7f8ab8dc07 Don't update unchanged merge entries
In commit 34110cd4e3 ("Make 'unpack_trees()'
have a separate source and destination index") I introduced a really
stupid bug in that it would always add merged entries with the CE_UPDATE
flag set. That caused us to always re-write the file, even when it was
already up-to-date in the source index.

Not only is that really stupid from a performance angle, but more
importantly it's actively wrong: if we have dirty state in the tree when
we merge, overwriting it with the result of the merge will incorrectly
overwrite that dirty state.

This trivially fixes the problem - simply don't set the CE_UPDATE flag
when the merge result matches the old state.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-03-16 14:25:53 -07:00
Junio C Hamano 5be60078c9 Rewrite "git-frotz" to "git frotz"
This uses the remove-dashes target to replace "git-frotz" to "git frotz".

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-07-02 22:52:14 -07:00
Pavel Roskin 3dff5379bf Assorted typo fixes
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-02-03 21:49:54 -08:00
Junio C Hamano f8a9d42872 read-tree: further loosen "working file will be lost" check.
This follows up commit ed93b449 where we removed overcautious
"working file will be lost" check.

A new option "--exclude-per-directory=.gitignore" can be used to
tell the "git-read-tree" command that the user does not mind
losing contents in untracked files in the working tree, if they
need to be overwritten by a merge (either a two-way "switch
branches" merge, or a three-way merge).

Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-12-05 23:25:52 -08:00
Junio C Hamano ed93b449c5 merge: loosen overcautious "working file will be lost" check.
The three-way merge complained unconditionally when a path that
does not exist in the index is involved in a merge when it
existed in the working tree.  If we are merging an old version
that had that path tracked, but the path is not tracked anymore,
and if we are merging that old version in, the result will be
that the path is not tracked.  In that case we should not
complain.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-10-27 17:16:39 -07:00