From: Junio C Hamano <junkio@cox•net>
To: Eric Wong <normalperson@yhbt•net>
Cc: git@vger•kernel.org
Subject: Re: [PATCH] rerere: record (or avoid misrecording) resolved, skipped or aborted rebase/am
Date: Sat, 09 Dec 2006 12:08:49 -0800 [thread overview]
Message-ID: <7vbqmcbzn2.fsf@assigned-by-dhcp.cox.net> (raw)
In-Reply-To: 1165613397460-git-send-email-normalperson@yhbt.net
I looked at your previous 5-patch series but will replace with
this updated 2-patch series.
The rerere command started its life as a mere helper for
Porcelains, but with 'status' and 'diff', you are making it
somewhat Porcelain-ish. I still have not decided myself, but I
think we probably would want to treat this as a Porcelain and
give a bit of usability to it, so what I've committed has two
changes from your version:
(1) 'diff' without @ARGV defaults to '-u';
(2) running rerere with unknown sub command die()s instead of
silently exiting with 0.
The difference between your previous 5-patch series and this
round raises an interesting issue.
You used to have a safety valve in git-commit to prevent users
from running it while rebase/am is in progress, which I imagine
would be a common mistake.
There are three commands in git suite that a user would use to
eventually make new commits, out of something other than what
was edited and prepared in the working tree, that can stop in
the middle.
(1) git-am is used to make new commits from e-mailed patches,
and stops in the middle when a patch does not apply.
"git-am --resolved/--skip" are the ways to continue.
(2) git-rebase is used to rewrite the history of a branch, and
stops in the middle when a patch does not apply or merge
conflicts. "git-rebase --continue/--skip/--abort" are
possible exits [*1*].
(3) git-pull/git-merge are used to make merge commits with
another branch, and stops in the middle when it conflicts.
Possible exits are "git commit" or "git reset".
Now, I am not going to propose to fix this inconsistency and
forbid use of "git commit" to resolve "git-merge" (instead, the
user would say "git-merge --resolved/--abort"). As the workflow
goes, these are very different operations and the user is often
well aware which workflow is in progress; having different
commands for different exit route is fine.
But in order to implement the safety valve like you did cleanly,
we should first have an enumeration of states (the above is a
subset --- there is the "base state" in which you are working
towards a commit based on HEAD, which is obviously concluded
with a "git commit", and "bisect in progress") and make it easy
for commands to communicate what state the working tree is in.
That would also help 'git-explain'.
[Footnote]
*1* Resuming rebase was much worse before Sean updated it with
commit 031321c6 to hide that it uses git-am as its backend,
which is purely its implementation detail.
next prev parent reply other threads:[~2006-12-09 20:08 UTC|newest]
Thread overview: 46+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-12-03 17:01 Some advanced index playing Alan Chandler
2006-12-03 18:24 ` Linus Torvalds
2006-12-03 19:36 ` Junio C Hamano
2006-12-03 20:11 ` Alan Chandler
2006-12-03 20:19 ` Jakub Narebski
2006-12-03 20:29 ` Alan Chandler
2006-12-03 20:40 ` Linus Torvalds
2006-12-04 10:41 ` Junio C Hamano
2006-12-03 18:31 ` Jakub Narebski
2006-12-03 18:34 ` Linus Torvalds
2006-12-03 20:26 ` Junio C Hamano
2006-12-05 3:48 ` [PATCH] git-explain Junio C Hamano
2006-12-05 3:55 ` Nicolas Pitre
2006-12-05 3:57 ` J. Bruce Fields
2006-12-05 6:09 ` Junio C Hamano
2006-12-05 7:26 ` Jeff King
2006-12-05 9:21 ` Eric Wong
2006-12-08 10:49 ` [RFC/PATCH 0/5] WIP status/rerere reporting Eric Wong
2006-12-08 10:49 ` [PATCH 1/5] rerere: avoid misrecording on a skipped or aborted rebase/am Eric Wong
2006-12-08 19:33 ` Junio C Hamano
2006-12-08 20:04 ` [PATCH 6/5] git-rerere: document the 'clear' and 'diff' commands Eric Wong
2006-12-08 20:43 ` [PATCH 1/5] rerere: avoid misrecording on a skipped or aborted rebase/am Junio C Hamano
2006-12-08 21:28 ` Eric Wong
2006-12-08 21:29 ` [PATCH] rerere: add clear, diff, and status commands Eric Wong
2006-12-08 21:29 ` [PATCH] rerere: record (or avoid misrecording) resolved, skipped or aborted rebase/am Eric Wong
2006-12-08 21:44 ` Jakub Narebski
2006-12-08 21:50 ` Eric Wong
2006-12-09 20:08 ` Junio C Hamano [this message]
2006-12-08 10:49 ` [PATCH 2/5] status: show files that would have resolutions recorded by rerere Eric Wong
2006-12-08 10:49 ` [PATCH 3/5] am and rebase resolve states get picked up by status/commit Eric Wong
2006-12-08 10:49 ` [PATCH 4/5] am: run git rerere to record resolution on successful --resolved Eric Wong
2006-12-08 10:49 ` [PATCH 5/5] rerere: add the diff command Eric Wong
2006-12-08 12:07 ` Jakub Narebski
2006-12-05 17:34 ` [PATCH] git-explain Horst H. von Brand
2006-12-05 8:58 ` Johannes Schindelin
2006-12-05 21:00 ` J. Bruce Fields
2006-12-05 9:11 ` Raimund Bauer
2006-12-05 10:43 ` Jakub Narebski
2006-12-05 23:00 ` Martin Langhoff
2006-12-05 23:07 ` Junio C Hamano
2006-12-05 23:37 ` Johannes Schindelin
2006-12-05 23:57 ` Junio C Hamano
2006-12-06 0:07 ` Carl Worth
2006-12-06 0:27 ` Johannes Schindelin
2006-12-06 1:50 ` Nicolas Pitre
2006-12-03 20:40 ` Some advanced index playing Alan Chandler
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=7vbqmcbzn2.fsf@assigned-by-dhcp.cox.net \
--to=junkio@cox$(echo .)net \
--cc=git@vger$(echo .)kernel.org \
--cc=normalperson@yhbt$(echo .)net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox