Open GoogleCodeExporter opened 9 years ago
Hmm, but Git is a DVCS, how can I know that you didn't do some sort of crazy
merge or backing-out or switching branches, etc.?
Original comment by mka...@google.com
on 25 Apr 2011 at 5:30
This is what I did:
mkdir test
cd test
git init
touch test.txt
git add .
git commit -m"one"
git log
echo "First line of code" >> test.txt
git add .
git commit -m"two"
git log
git branch crazy
git checkout crazy
echo "Second line of code" >> test.txt
git add .
git commit -m"crazy one"
git log
git log 46ba136687.. {this is commit "one"}
git checkout master
git merge --no-ff crazy
git log
git log 46ba136687.. {this is commit "one"}
The log shows info as expected.
I didn't test any "crazy" stuff. Limited knowledge of git :(.
Original comment by rho...@gmail.com
on 25 Apr 2011 at 5:53
Oh, no, I wasn't accusing you of doing crazy stuff. I was saying in general, I
need to rescan the whole repository, because I can't know what the user has
done with it.
Original comment by avatrax...@gmail.com
on 26 Apr 2011 at 5:27
I understand and I didn't think you accused me of anything :)
What I tried to demonstrate is that when you branch and merge, "git log from.."
will show the comments from withing the branch as well.
The only problem I see (with my limited knowledge of git) is when you have
stored commit id 46ba136687 in DB and someone removed that commit from the
repo. In that case "git log 46ba136687.." will tell you that such commit
doesn't exist and I guess will return -1 which would trigger full scan?
Original comment by rho...@gmail.com
on 26 Apr 2011 at 6:00
Ah, it's actually worse than that. You could change the HEAD pointer to point
to another branch with an identical commit at the top but different commits
underneath it.
Original comment by avatrax...@gmail.com
on 27 Apr 2011 at 7:21
Original issue reported on code.google.com by
rho...@gmail.com
on 25 Apr 2011 at 3:28