From: Ted Felix <ted@tedfelix.com>
To: git@vger.kernel.org
Subject: [BUG] rebase no longer omits local commits
Date: Thu, 03 Jul 2014 11:14:26 -0400 [thread overview]
Message-ID: <53B57352.50202@tedfelix.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 825 bytes --]
Starting with git 1.9.0, rebase no longer omits local commits that
appear in both the upstream and local branches.
I've bisected this down to commit bb3f458: "rebase: fix fork-point with
zero arguments". The attached script reproduces the problem. Reverting
the aforementioned commit fixes the problem.
A failed run of this script will result in conflicts. A successful run
against master with bb3f458 reverted ends as follows:
From /tmp/rebase-issue/maint
fe401cd..955af04 master -> origin/master
fatal: Not a valid object name: ''
First, rewinding head to replay your work on top of it...
Applying: Third change
(I'm not sure if that "fatal: Not a valid object name: ''" is of any
concern. It started appearing for me at some point during the bisect.)
Let me know if there's more I can do to help.
[-- Attachment #2: rebase-issue.sh --]
[-- Type: text/x-shellscript, Size: 1665 bytes --]
#!/bin/bash
# git-rebase is supposed to drop commits that it finds in both the
# local and upstream branches. As of 1.9.0, this isn't happening.
# This script reproduces the problem.
# I've bisected the issue down to commit bb3f458. Reverting that commit
# solves the problem.
# Run this in a directory where you have create privs.
# At the end, if there are conflicts, then the test has failed.
# Create a repo.
mkdir rebase-issue
cd rebase-issue
mkdir maint
cd maint
git init
# Create a README file and put some text in it
echo "Hi there!" >README
git add README
git commit -a -m "Initial commit"
# Clone the repo for "dev"
cd ..
git clone maint dev
# Dev makes *two* changes to the *same* area.
cd dev
# edit something, make some typos
echo "Freekwently Mispeled Werdz" >README
git commit -a -m "First change"
# edit same thing, fix those typos
echo "Frequently Misspelled Words" >README
git commit -a -m "Second change"
# Create patches to send to maintainer...
git format-patch -M origin/master
mv *.patch ../maint
# Add a third change that should make it through for completeness.
echo "Frequently Misspelled Words version 2" >README
git commit -a -m "Third change"
# We have to sleep (to make sure the times do not match?).
# If we don't, this script will succeed on fast machines.
# This can probably be reduced to 2 which should guarantee that
# the seconds will turn over on the clock.
echo
echo "Waiting 5 seconds to make sure apply time is different from patch time..."
sleep 5
echo
echo "Maint applies patches..."
cd ../maint
git am -3 *.patch
echo
echo "Dev does the fetch/rebase..."
cd ../dev
git fetch
git rebase
echo
git --version
next reply other threads:[~2014-07-03 15:20 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-03 15:14 Ted Felix [this message]
2014-07-03 19:09 ` [BUG] rebase no longer omits local commits John Keeping
2014-07-03 22:25 ` John Keeping
2014-07-07 17:56 ` Junio C Hamano
2014-07-07 21:14 ` John Keeping
2014-07-15 19:14 ` [PATCH 1/2] rebase--am: use --cherry-pick instead of --ignore-if-in-upstream John Keeping
2014-07-15 19:14 ` [PATCH 2/2] rebase: omit patch-identical commits with --fork-point John Keeping
2014-07-15 19:48 ` Ted Felix
2014-07-15 22:06 ` Junio C Hamano
2014-07-16 19:23 ` [PATCH v2 1/2] rebase--am: use --cherry-pick instead of --ignore-if-in-upstream John Keeping
2014-07-16 19:23 ` [PATCH v2 2/2] rebase: omit patch-identical commits with --fork-point John Keeping
2014-07-16 20:26 ` Junio C Hamano
2014-07-16 21:27 ` John Keeping
2014-07-16 21:36 ` Ted Felix
2014-07-17 9:36 ` John Keeping
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=53B57352.50202@tedfelix.com \
--to=ted@tedfelix.com \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
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;
as well as URLs for NNTP newsgroup(s).