Okay, so this git rebase feature is a joke...
IIRC, the Wedge repo was built using svn-git, and then fully converted to git. It's got, due to its SVN background, a fully linear history (except at the end, when I was experiencing with branches.)
Yesterday, I decided to go ahead and do the full rebase I wanted to do, to fix these problems:
- Many CRLF fixes in the first commits, which should be concatenated to their parent commit, so that the CRLF problems fix themselves.
- One more CRLF fix in late 2012. This one's been bothering me for a while, because it adds two useless steps to most Git Blame operations.
- An empty commit (entirely empty, really.)
- An empty commit message (this is a wrong manipulation, but the message exists in the New Revs topic, it's rev 142.)
That was more than enough to justify the rebase.
So, I started off by rebasing the CRLF stuff early in the history. As a result, I kept getting 3-way merge errors, insisting that some files were missing, or other silly things. Given that it's a LINEAR history, and that the only work was done was to cancel CRLF line endings, there's absolutely no reason for these.
Any ideas?
After several hours of failures, I decided to give it up, and instead start fixing from the most recent commits, and then work my way up.
I got rid of the empty commit easily (all it took was git filter-branch --prune-empty), then did a rebase on the 2012 bug, which seems to be fixed. Okay, all good...
Now, onto that empty commit message. What I did was retrieve the SHA1 of the grandfather commit, do git rebase -i on that SHA1, then when the list shows up, change 'pick' to 'reword' in the empty commit message line. Then I save, it shows me a commit window, I paste my rev 142 content, quit, and it starts rebasing. Until the end. ALL GOOD.
Then I right-clicked the Wedge repo, Show Log, and... Funny. You can see the error message below.
It still shows me the master and all commits, but I can't access the branch list, and switch to any of them.
I then restarted from scratch (well, before the last rebase), and I still got the same. That reword rebase totally breaks my refs.
From what I could gather, between my broken Wedge's .git folder and the last valid one, there are a few differences. Broken has an empty refs folder, except for the 'stash' file. All its subfolders are there, but empty. In Working, all subfolders have a list of files corresponding to the expected refs (master, other branches, etc.)
OTOH, Working has an info folder with just an 'exclude' file, while Broken has an extra file in it, called 'refs', and which holds a list of all my branches, like this:
9c63905a2072705aaf93d12866e3f81890f5fc39 refs/heads/master
So, basically, I'm thinking I could just re-create the files manually in /refs/, but (1) it's taxing, (2) I'm never gonna know if I forgot to fix something else, (2) I'll probably have the same problem again when I try another rebase, (3) I don't even know why git (command line) doesn't complain (if I type git status, I get a list of branches), and TortoiseGit is complaining.
Can anyone help..? (ema? :sob:)
IIRC, the Wedge repo was built using svn-git, and then fully converted to git. It's got, due to its SVN background, a fully linear history (except at the end, when I was experiencing with branches.)
Yesterday, I decided to go ahead and do the full rebase I wanted to do, to fix these problems:
- Many CRLF fixes in the first commits, which should be concatenated to their parent commit, so that the CRLF problems fix themselves.
- One more CRLF fix in late 2012. This one's been bothering me for a while, because it adds two useless steps to most Git Blame operations.
- An empty commit (entirely empty, really.)
- An empty commit message (this is a wrong manipulation, but the message exists in the New Revs topic, it's rev 142.)
That was more than enough to justify the rebase.
So, I started off by rebasing the CRLF stuff early in the history. As a result, I kept getting 3-way merge errors, insisting that some files were missing, or other silly things. Given that it's a LINEAR history, and that the only work was done was to cancel CRLF line endings, there's absolutely no reason for these.
Any ideas?
After several hours of failures, I decided to give it up, and instead start fixing from the most recent commits, and then work my way up.
I got rid of the empty commit easily (all it took was git filter-branch --prune-empty), then did a rebase on the 2012 bug, which seems to be fixed. Okay, all good...
Now, onto that empty commit message. What I did was retrieve the SHA1 of the grandfather commit, do git rebase -i on that SHA1, then when the list shows up, change 'pick' to 'reword' in the empty commit message line. Then I save, it shows me a commit window, I paste my rev 142 content, quit, and it starts rebasing. Until the end. ALL GOOD.
Then I right-clicked the Wedge repo, Show Log, and... Funny. You can see the error message below.
It still shows me the master and all commits, but I can't access the branch list, and switch to any of them.
I then restarted from scratch (well, before the last rebase), and I still got the same. That reword rebase totally breaks my refs.
From what I could gather, between my broken Wedge's .git folder and the last valid one, there are a few differences. Broken has an empty refs folder, except for the 'stash' file. All its subfolders are there, but empty. In Working, all subfolders have a list of files corresponding to the expected refs (master, other branches, etc.)
OTOH, Working has an info folder with just an 'exclude' file, while Broken has an extra file in it, called 'refs', and which holds a list of all my branches, like this:
9c63905a2072705aaf93d12866e3f81890f5fc39 refs/heads/master
So, basically, I'm thinking I could just re-create the files manually in /refs/, but (1) it's taxing, (2) I'm never gonna know if I forgot to fix something else, (2) I'll probably have the same problem again when I try another rebase, (3) I don't even know why git (command line) doesn't complain (if I type git status, I get a list of branches), and TortoiseGit is complaining.
Can anyone help..? (ema? :sob:)