Hi,
This is my first post to this list, so I hope this is the appropriate place.
I'm having a problem understanding why "git log file" does not show
some of the commits where file is changed. Consider the following
commit history:
git log --pretty=oneline --abbrev-commit | head -20
e86d3b1 Merge remote-tracking branch 'git-svn' into MultiDataPath
05e7103 Made the system convert DP geometric info to MultiDP info and
load it at machine start.
2de7375 Fixed compilation under Linux.
b520873 Error handling!!
73110bd New Group manager for multi data processor
dce3ae9 Merge branch 'MultiDataPath' of
ssh://swteam/home/machine/git/SolarJet into MultiDataPath
25dff3c Merge branch 'MultiDataPath' of
ssh://swteam/home/machine/git/SolarJet into MultiDataPath
247f418 Rewrite of the Finger heightmap nozzle selection algorithm for
better load balancing.
026fec8 Stop all the jobs on async stop or on exception Choice nozzles
using max nozzles number
84a60b7 avoid CarouselSimulationParams
c40df74 git-svn-id: svn://swteam/SolarJet/trunk@4684
d8e1dcc2-e5e0-4eb0-83da-8cedbf775ddd
:
Now let's limit this to the history of a single file:
git log --pretty=oneline --abbrev-commit Apps/SolarJet/Project/qt/SysScripts/init.py | head
84a60b7 avoid CarouselSimulationParams
c40df74 git-svn-id: svn://swteam/SolarJet/trunk@4684
d8e1dcc2-e5e0-4eb0-83da-8cedbf775ddd
:
As can be see above there were lots of commits omitted now. E.g.
05e7103 (the second commit above). But if I list the changes in
05e7103 I then get:
git show 05e7103 --name-only | grep init.py
Apps/SolarJet/Project/qt/SysScripts/init.py
Running without --name-only show that there is a substantial change in init.py
So why does this commit not show up in in "git log file"?
One interesting observation is that the only commits that appear in
the "git log file" command are the commits that were imported from
svn. All other commits are filtered out.
So is this a bug, or am I doing something wrong?
Thanks in advance!
Dov
On Tue, Aug 2, 2011 at 15:38, Dov Grobgeld [off-list ref] wrote:
git log --pretty=oneline --abbrev-commit | head -20
Try `--full-history' maybe? Also, rather than `head -20', you can
limit the output directly with `-20':
git log --pretty=oneline --abbrev-commit --full-history -20
It's hard to know what's going on in your particular example; perhaps
give us the output of `git log' when using the `--graph' option.
--full-history indeed made the missing commits show up! So why was the
commit pruned? It contains some substantial source changes as may be
seen by the following commands:
1. Commit history for entire project:
git log --full-history --pretty=oneline -5 --abbrev-commit | ~/scripts/crop
e86d3b1 Merge remote-tracking ...
05e7103 Made the system conver...
2de7375 Fixed compilation unde...
b520873 Error handling!!
73110bd New Group manager for ...
2. Diff of a single file between two commits show that 05e7103
contains a substantial change for the file.
git diff 05e7103 2de7375 Apps/SolarJet/Project/qt/SysScripts/init.py | wc
105 389 5336
3. Full history of the file includes 05e7103
git log --full-history --pretty=oneline -5 --abbrev-commit Apps/SolarJet/Project/qt/SysScripts/init.py | ~/scripts/crop
05e7103 Made the system conver...
84a60b7 avoid CarouselSimulati...
c40df74 git-svn-id: svn://swte...
0bdf4b6 Group manager for mult...
0536a0d git-svn-id: svn://swte...
4. But the default "pruned" history of the file does not contain 05e7103
git log --pretty=oneline -5 --abbrev-commit Apps/SolarJet/Project/qt/SysScripts/init.py | ~/scripts/crop
84a60b7 avoid CarouselSimulati...
c40df74 git-svn-id: svn://swte...
0536a0d git-svn-id: svn://swte...
a720b61 Add full line wafer pr...
08b366b git-svn-id: svn://swte...
5. Here is the project graph:
git log --graph --abbrev-commit --pretty=oneline -20 | ~/scripts/crop
* e86d3b1 Merge remote-track...
|\
| * 026fec8 Stop all the jobs ...
| * 84a60b7 avoid CarouselSimu...
| * c40df74 git-svn-id: svn://...
| * fee6808 git-svn-id: svn://...
| * 047e697 Automatic Theta Ca...
* | 05e7103 Made the system co...
* | 2de7375 Fixed compilation ...
* | b520873 Error handling!!
* | 73110bd New Group manager ...
* | dce3ae9 Merge branch 'Mu...
|\ \
| * \ 25dff3c Merge branch '...
Finally, a few more questions. Is it possible to make gitk use the
--full-history option when running 'gitk file'? Is there any
configuration flag that always turns on "full history"?
Thanks!
Dov
On Tue, Aug 2, 2011 at 18:56, Michael Witten [off-list ref] wrote:
On Tue, Aug 2, 2011 at 15:38, Dov Grobgeld [off-list ref] wrote:
quoted
git log --pretty=oneline --abbrev-commit | head -20
Try `--full-history' maybe? Also, rather than `head -20', you can
limit the output directly with `-20':
git log --pretty=oneline --abbrev-commit --full-history -20
It's hard to know what's going on in your particular example; perhaps
give us the output of `git log' when using the `--graph' option.