Re: [RFC] Two conceptually distinct commit commands

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Carl Worth
Date: Monday, December 4, 2006 - 1:10 pm

> 	So, if I could do:

BTW, the current "apply --index" doesn't allow what I imagined in the
scenario above. It notices that the affected file is different in the
working tree compared to the index and just refuses to do anything.

Given that safety-valve in git-apply, the current behavior of "git
commit paths" would allow for splitting a submitted patch into two
commits.

The difference is that it only works if the local modifications do not
affect any of the same paths as the patch. The user is freed from
worrying about this somewhat, since if it's not the case, then
git-apply just complains and doesn't do anything.

But what might be very interesting is a modified "git-apply --index"
that would not fail in this case, but would instead do the following:

	1. Apply the patch to the working tree

	2. Apply the patch to the index

And of course, if either fails then the entire apply operation fails,
leaving no changes to working tree or to the index.

With that new git-apply behavior, then the scenario I outlined above
would work, and would work in spite of any changes to the same file in
both the working tree and the index. It would also require the
separate commands for commit-index-content vs.
commit-working-tree-content as described in my original message above.

-Carl
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[RFC] Two conceptually distinct commit commands, Carl Worth, (Mon Dec 4, 12:08 pm)
Re: [RFC] Two conceptually distinct commit commands, Carl Worth, (Mon Dec 4, 1:10 pm)
Re: [RFC] Two conceptually distinct commit commands , Horst H. von Brand, (Mon Dec 4, 5:52 pm)
Re: [RFC] Two conceptually distinct commit commands , Horst H. von Brand, (Mon Dec 4, 7:14 pm)
Re: [RFC] Two conceptually distinct commit commands, Theodore Tso, (Mon Dec 4, 8:51 pm)
Re: [RFC] Two conceptually distinct commit commands, Junio C Hamano, (Mon Dec 4, 11:33 pm)
Re: [RFC] Two conceptually distinct commit commands, Carl Worth, (Mon Dec 4, 11:38 pm)
Re: [RFC] Two conceptually distinct commit commands, Junio C Hamano, (Tue Dec 5, 6:13 pm)
Re: [RFC] Two conceptually distinct commit commands, Carl Worth, (Tue Dec 5, 9:53 pm)
Commit order in git.git, was Re: [RFC] Two conceptually di ..., Johannes Schindelin, (Wed Dec 6, 2:54 am)
Re: [RFC] Two conceptually distinct commit commands, Carl Worth, (Wed Dec 6, 9:14 am)