* git rebase orthodontics
@ 2009-01-07 14:47 jidanni
2009-01-07 16:10 ` Boyd Stephen Smith Jr.
2009-01-07 16:31 ` Thomas Rast
0 siblings, 2 replies; 3+ messages in thread
From: jidanni @ 2009-01-07 14:47 UTC (permalink / raw)
To: git
In today's adventure we follow junior user me as he sets off in his
first bumper car ride on the wrong side of git-rebase, wherein he
discovers there are no guard rails. git version 1.6.0.6.
$ git branch
* jidanni
master
$ git commit -m bla --allow-empty
$ git rebase --interactive master
(In the editor I change the single pick offered into a squash)
grep: ....git/rebase-merge/done: No such file or directory
Cannot 'squash' without a previous commit
(OK, but the grep error being shown to the user is a bug.)
$ git show --abbrev-commit --pretty=raw jidanni master
commit 07aef4a...
tree 28f9caca33a8294d36b3d42f21ff472c6126da16
parent 3ad166e006afc3ce57a35b6ac650569e557b024a...
commit 3ad166e...
tree 28f9caca33a8294d36b3d42f21ff472c6126da16
parent 726f8d08e2f7642d56a568eb82a685de0da0baf7
$ EDITOR=cat git rebase --interactive master
pick 07aef4a This is a commit with No files, wow. bla.
# Rebase 3ad166e..07aef4a onto 3ad166e ...
Successfully rebased and updated refs/heads/jidanni.
(But it didn't. git show shows no change. ls -l shows
refs/heads/jidanni was not touched.
OK, it seems like all I am doing is changing
A jidanni
/
D---E---F---G master
into the same thing, a noop. But shouldn't it warn and quit, instead
of rewarding me with the success message? Let's try it the other way
around:
$ git checkout master
$ git rebase --interactive jidanni #Wherein one sees:
noop
# Rebase 07aef4a..3ad166e onto 07aef4a
Successfully rebased and updated refs/heads/master.
OK, now I have achieved
D---E---F---G---A master, jidanni
Observations:
When I tried a noop, it didn't say noop in the editor.
When I tried a yesop, it did say noop in the editor.
In both cases it gave the same success message.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: git rebase orthodontics
2009-01-07 14:47 git rebase orthodontics jidanni
@ 2009-01-07 16:10 ` Boyd Stephen Smith Jr.
2009-01-07 16:31 ` Thomas Rast
1 sibling, 0 replies; 3+ messages in thread
From: Boyd Stephen Smith Jr. @ 2009-01-07 16:10 UTC (permalink / raw)
To: jidanni; +Cc: git
[-- Attachment #1: Type: text/plain, Size: 559 bytes --]
If you want to go from:
> A jidanni
> /
> D---E---F---G master
To:
> D---E---F---G---A master, jidanni
You don't want rebase. You want 'git checkout master && git merge jidanni'.
I think you can throw --no-commit on the merge is you want to avoid a non-ff
update to the master ref.
--
Boyd Stephen Smith Jr. ,= ,-_-. =.
bss@iguanasuicide.net ((_/)o o(\_))
ICQ: 514984 YM/AIM: DaTwinkDaddy `-'(. .)`-'
http://iguanasuicide.net/ \_/
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 197 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: git rebase orthodontics
2009-01-07 14:47 git rebase orthodontics jidanni
2009-01-07 16:10 ` Boyd Stephen Smith Jr.
@ 2009-01-07 16:31 ` Thomas Rast
1 sibling, 0 replies; 3+ messages in thread
From: Thomas Rast @ 2009-01-07 16:31 UTC (permalink / raw)
To: jidanni; +Cc: git
[-- Attachment #1: Type: text/plain, Size: 2083 bytes --]
jidanni@jidanni.org wrote:
> wherein he discovers there are no guard rails
Good thing you learned this before getting to git-reset.
> $ EDITOR=cat git rebase --interactive master
> pick 07aef4a This is a commit with No files, wow. bla.
> # Rebase 3ad166e..07aef4a onto 3ad166e ...
> Successfully rebased and updated refs/heads/jidanni.
> (But it didn't. git show shows no change. ls -l shows
> refs/heads/jidanni was not touched.
> OK, it seems like all I am doing is changing
> A jidanni
> /
> D---E---F---G master
> into the same thing, a noop. But shouldn't it warn and quit, instead
> of rewarding me with the success message?
You asked for an interactive rebase of the range master..jidanni,
which consists of A, so it gave you an editor offering 'pick A' and
the chance to change that.
Non-interactive rebase indeed checks if you attempt to rebase, but are
already up to date. Interactive doesn't; the assumption is that
interactive rebases aren't used "blindly" to update. (Rebasing
changes committer and commit time, so there is a difference between
not rebasing at all, and merely ending up with the same history.)
> Let's try it the other way
> around:
> $ git checkout master
> $ git rebase --interactive jidanni #Wherein one sees:
> noop
> # Rebase 07aef4a..3ad166e onto 07aef4a
> Successfully rebased and updated refs/heads/master.
> OK, now I have achieved
> D---E---F---G---A master, jidanni
> Observations:
> When I tried a noop, it didn't say noop in the editor.
> When I tried a yesop, it did say noop in the editor.
The 'noop' means that there are no commits in the range you asked to
rebase, which is jidanni..master. It's telling you that it is going
to update the branch pointer, but not carry over any of the commits.
This can happen even if jidanni..master is nonempty, but all commits
in it are already contained in jidanni.
> In both cases it gave the same success message.
It successfully did what you told it to do.
--
Thomas Rast
trast@{inf,student}.ethz.ch
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 197 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2009-01-07 16:32 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-01-07 14:47 git rebase orthodontics jidanni
2009-01-07 16:10 ` Boyd Stephen Smith Jr.
2009-01-07 16:31 ` Thomas Rast
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).