Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Dealing with Git fatal: Invalid revision range

I am having an issue with Crucible and Git commit. Crucible hangs on

>git whatchanged --always --reverse --date-order -m --no-abbrev --no-renames 9e00d1317c4363f73b7deb5caf5096c69e646b81..641c20936dbec78308d1bfa06d14f174f9d7df1d --pretty=format:C:%H%nP:%P%nA:%aN%nE:%aE%nR:%cN%nF:%cE%nD:%at%nS:%s%nB:%b%n@@fe_body_end@@

with the error:

fatal: Invalid revision range 9e00d1317c4363f73b7deb5caf5096c69e646b81..641c20936dbec78308d1bfa06d14f174f9d7df1d

Apparently there is an error in the

>git show 641c20936dbec78308d1bfa06d14f174f9d7df1d
fatal: bad object 641c20936dbec78308d1bfa06d14f174f9d7df1d

What is the best way to correct such problems? Git fsck leads to no errors...

git fsck --full Checking object directories: 100% (256/256), done. Checking objects: 100% (21169/21169), done. dangling commit 50062154743dbc78837af62cc49388f9fabe5b58 dangling blob 4b82dcbd1bb49f865e5069f31d50cd9304e31c3e

like image 290
Al-Punk Avatar asked Oct 07 '13 14:10

Al-Punk


2 Answers

I had the same error. I guess you have not locally pull the commit "641c20936dbec78308d1bfa06d14f174f9d7df1d".

git checkout <branch_with_commit_641c20936dbec78308d1bfa06d14f174f9d7df1d>
git pull
git show 641c20936dbec78308d1bfa06d14f174f9d7df1d
like image 67
Netsab612 Avatar answered Oct 19 '22 19:10

Netsab612


this usually happens when someone forces a push across branches, or otherwise messes with the revision history. (like modifying history commits etc)

you may need to recreate the branch.

like image 1
zonabi Avatar answered Oct 19 '22 19:10

zonabi