Re: [RFC/PATCH] Add git-unresolve <paths>...

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 19 Apr 2006 14:43:14 -0700, Junio C Hamano wrote:
>
> > It would be nice if the complementary operations of manually
> > resolving and unresolving a merge conflict had complementary command
> > names.
> 
> True.  I considered two other possibilities.
> 
>  * "git unmerge", because it creates unmerged index entries, and

This has the same problem as git-unresolve as compared to the old
git-resolve. Namely, it would provide an "unmerge" command that
syntactically looks like a complement to "merge" but in fact is an
entirely separate, (operating on different object types, etc.)

>  * "git update-index --unmerge", because this is just a special
>    kind of updates to the index file.

That seems like a very reasonable place to have this functionality (if
needed). Compared to things like "update-index --add" and
"update-index --remove" the desire for this operation is likely much
more rare, so perhaps doesn't merit its own command.

Meanwhile, I still think it's worth re-considering the original
problem. 

After a failed merge, I get a multi-parent diff from "git
diff". However, after updating the index, I can't find any way to get
multi-parent diffs anymore.

I'd still like to be able to do that, even when I know that what I
have in the index is good, and I don't want to undo it. So the
proposed unresolve (or update-index --unmerge, or whatever) is still
not totally satisfactory.

In this state, "git commit" is still multi-parent aware and will be
making a merged commit, (by examining .git/MERGE_HEAD). Wouldn't it be
reasonable to make "git diff --cached" also be aware of this mid-merge
state and display a multi-parent diff? at least as an option?

-Carl

PS. As a more bizarre suggestion, I've been idly wondering for some
time if it would make sense to provide names to allow the working tree
and the index to be treated as pseudo, in-progress objects. For
example, much of my initial (and occasionally residual) confusion
regarding "git diff" would be alleviated if I could run commands
something like:

	git diff HEAD TREE
	git diff HEAD INDEX
	git diff INDEX TREE

For this usage, perhaps INDEX and TREE are not the actual names that
git supports, but just some convenient refs that a user has set
up. And I don't have any proposal for what would be appropriate
low-level names for git to use for these pseudo-objects.

But I would sure be happy if I could just use refs like the above.

Then, if a concept like that existed, it should be rather
straightforward to achieve the multi-parent HEAD,MERGE_HEAD -> INDEX
diff that I'm after. It could probably come in handy in quite a few
other situations as well.

But I can imagine the idea might also break down quite badly. So just
let me know where it is totally stupid/infeasible.

Attachment: pgpL91jqkISoW.pgp
Description: PGP signature


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]