In using "git-rebase --interactive" to re-order commits you
occasionally get conflicts and will see a message like this:
When commiting, use the option '-c %s' to retain authorship and message
I was thinking that it might be nice to stash away this commit id
somewhere in GIT_DIR so that the user didn't have to explicitly
remember it, and add a new switch to git-commit that could be used to
automatically use that stashed commit id, something like:
git commit --retain
Although I most often see this kind of message in interactive
rebasing, the message is generated in builtin-revert.c when cherry-
picking, so you can also see it in any other situation where you're
cherry picking and there's a conflict.
What do people think? Would this be a nice usability improvement? Or
is it adding clutter?
Cheers,
Wincent
On Nov 26, 2007, at 10:02 AM, Wincent Colaiuta wrote:
In using "git-rebase --interactive" to re-order commits you
occasionally get conflicts and will see a message like this:
When commiting, use the option '-c %s' to retain authorship and
message
I was thinking that it might be nice to stash away this commit id
somewhere in GIT_DIR so that the user didn't have to explicitly
remember it, and add a new switch to git-commit that could be used
to automatically use that stashed commit id, something like:
git commit --retain
Although I most often see this kind of message in interactive
rebasing, the message is generated in builtin-revert.c when cherry-
picking, so you can also see it in any other situation where you're
cherry picking and there's a conflict.
What do people think? Would this be a nice usability improvement?
Or is it adding clutter?
I'm not sure but I think this message is just some unwanted
(misleading) noise, since when you rebase, once you solve the
conflicts, you git-rebase --continue, you don't git-commit.
--
Benoit Sigoure aka Tsuna
EPITA Research and Development Laboratory
El 26/11/2007, a las 10:32, Benoit Sigoure escribió:
On Nov 26, 2007, at 10:02 AM, Wincent Colaiuta wrote:
quoted
In using "git-rebase --interactive" to re-order commits you
occasionally get conflicts and will see a message like this:
When commiting, use the option '-c %s' to retain authorship and
message
I was thinking that it might be nice to stash away this commit id
somewhere in GIT_DIR so that the user didn't have to explicitly
remember it, and add a new switch to git-commit that could be used
to automatically use that stashed commit id, something like:
git commit --retain
Although I most often see this kind of message in interactive
rebasing, the message is generated in builtin-revert.c when cherry-
picking, so you can also see it in any other situation where you're
cherry picking and there's a conflict.
What do people think? Would this be a nice usability improvement?
Or is it adding clutter?
I'm not sure but I think this message is just some unwanted
(misleading) noise, since when you rebase, once you solve the
conflicts, you git-rebase --continue, you don't git-commit.
Looks like you're right. I just did a simple test and it turns out
that after a conflict, this:
git commit -c ...
git rebase --continue
Produces exactly the same history as this:
git rebase --continue
So I think that misleading noise needs to be suppressed or reworded
when rebasing. Will look into it.
Cheers,
Wincent
El 26/11/2007, a las 12:27, Wincent Colaiuta escribió:
El 26/11/2007, a las 10:32, Benoit Sigoure escribió:
quoted
On Nov 26, 2007, at 10:02 AM, Wincent Colaiuta wrote:
quoted
In using "git-rebase --interactive" to re-order commits you
occasionally get conflicts and will see a message like this:
When commiting, use the option '-c %s' to retain authorship and
message
I was thinking that it might be nice to stash away this commit id
somewhere in GIT_DIR so that the user didn't have to explicitly
remember it, and add a new switch to git-commit that could be used
to automatically use that stashed commit id, something like:
git commit --retain
Although I most often see this kind of message in interactive
rebasing, the message is generated in builtin-revert.c when cherry-
picking, so you can also see it in any other situation where
you're cherry picking and there's a conflict.
What do people think? Would this be a nice usability improvement?
Or is it adding clutter?
I'm not sure but I think this message is just some unwanted
(misleading) noise, since when you rebase, once you solve the
conflicts, you git-rebase --continue, you don't git-commit.
Looks like you're right. I just did a simple test and it turns out
that after a conflict, this:
git commit -c ...
git rebase --continue
Produces exactly the same history as this:
git rebase --continue
So I think that misleading noise needs to be suppressed or reworded
when rebasing. Will look into it.
How about something like this? It would obviously be nice if we could
avoid adding another option to builtin-revert; perhaps when/if git-
rebase becomes a builtin we can avoid that. The other alternative, and
probably one I like I bit more, would be to auto-detect that a rebase
is in progress by looking inside the GIT_DIR, although that would also
alter the behaviour of manual invocations of git-revert and git-cherry-
pick during an interactive rebase (do people actually do that?). What
do you think?
On Nov 26, 2007, at 1:34 PM, Wincent Colaiuta wrote:
How about something like this? It would obviously be nice if we
could avoid adding another option to builtin-revert; perhaps when/
if git-rebase becomes a builtin we can avoid that. The other
alternative, and probably one I like I bit more, would be to auto-
detect that a rebase is in progress by looking inside the GIT_DIR,
although that would also alter the behaviour of manual invocations
of git-revert and git-cherry-pick during an interactive rebase (do
people actually do that?). What do you think?
Hmm yeah, I agree that it's a little bit of a dirty workaround but,
as you pointed out, until rebase is builtinified, this looks like the
best/easiest alternative.
--
Benoit Sigoure aka Tsuna
EPITA Research and Development Laboratory
From: Johannes Sixt <hidden> Date: 2016-06-15 22:43:53
Wincent Colaiuta schrieb:
El 26/11/2007, a las 12:27, Wincent Colaiuta escribió:
quoted
So I think that misleading noise needs to be suppressed or reworded
when rebasing. Will look into it.
How about something like this? It would obviously be nice if we could
avoid adding another option to builtin-revert; perhaps when/if
git-rebase becomes a builtin we can avoid that. The other alternative,
and probably one I like I bit more, would be to auto-detect that a
rebase is in progress by looking inside the GIT_DIR, although that would
also alter the behaviour of manual invocations of git-revert and
git-cherry-pick during an interactive rebase (do people actually do
that?). What do you think?
Introduce an environment variable _GIT_CHERRY_PICK_HELP (note the leading
underscore), which git-rebase sets; if it's set, git-cherry-pick uses that
text instead of the usual one.
-- Hannes
El 26/11/2007, a las 13:51, Johannes Sixt escribió:
Wincent Colaiuta schrieb:
quoted
El 26/11/2007, a las 12:27, Wincent Colaiuta escribió:
quoted
So I think that misleading noise needs to be suppressed or
reworded when rebasing. Will look into it.
How about something like this? It would obviously be nice if we
could avoid adding another option to builtin-revert; perhaps when/
if git-rebase becomes a builtin we can avoid that. The other
alternative, and probably one I like I bit more, would be to auto-
detect that a rebase is in progress by looking inside the GIT_DIR,
although that would also alter the behaviour of manual invocations
of git-revert and git-cherry-pick during an interactive rebase (do
people actually do that?). What do you think?
Introduce an environment variable _GIT_CHERRY_PICK_HELP (note the
leading underscore), which git-rebase sets; if it's set, git-cherry-
pick uses that text instead of the usual one.
From: Johannes Schindelin <hidden> Date: 2016-06-15 22:43:53
Hi,
On Mon, 26 Nov 2007, Benoit Sigoure wrote:
On Nov 26, 2007, at 10:02 AM, Wincent Colaiuta wrote:
quoted
In using "git-rebase --interactive" to re-order commits you occasionally get
conflicts and will see a message like this:
When commiting, use the option '-c %s' to retain authorship and
message
I was thinking that it might be nice to stash away this commit id somewhere
in GIT_DIR so that the user didn't have to explicitly remember it, and add a
new switch to git-commit that could be used to automatically use that
stashed commit id, something like:
git commit --retain
Although I most often see this kind of message in interactive rebasing, the
message is generated in builtin-revert.c when cherry-picking, so you can
also see it in any other situation where you're cherry picking and there's a
conflict.
What do people think? Would this be a nice usability improvement? Or is it
adding clutter?
I'm not sure but I think this message is just some unwanted (misleading)
noise, since when you rebase, once you solve the conflicts, you git-rebase
--continue, you don't git-commit.
Yep. It is on my TODO list since a long time, but I am just as glad
somebody else is doing it. But I have to agree with Hannes that using an
environment variable is cleaner, more elegant and shorter.
Ciao,
Dscho
El 26/11/2007, a las 14:41, Johannes Schindelin escribió:
Hi,
On Mon, 26 Nov 2007, Wincent Colaiuta wrote:
quoted
+ help_message = getenv("_GIT_CHERRY_PICK_HELP");
Why on earth do you have a leading underscore? No existing git
environment variable does it that way.
I was following the suggestion of Johannes Sixt:
El 26/11/2007, a las 13:51, Johannes Sixt escribió:
Introduce an environment variable _GIT_CHERRY_PICK_HELP (note the
leading underscore), which git-rebase sets; if it's set, git-cherry-
pick uses that text instead of the usual one.
I imagine that he proposed it that way because it's an "internal use
only" thing.
Once I get a clear idea of what kind of change is likely to actually
get accepted I'll submit a proper patch.
Cheers,
Wincent