{"thread":{"id":"16586","subject":"gitk: 'show origin of this line' barfs if gitk run in subdir","startedAt":"2008-12-03T20:51:58Z","lastAt":"2008-12-06T10:56:45Z","messageCount":3,"participants":["Mark Burton","Paul Mackerras"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"97094","messageId":"20081203205158.6b4b62c7@crow","threadId":"16586","inReplyTo":null,"subject":"gitk: 'show origin of this line' barfs if gitk run in subdir","fromName":"Mark Burton","fromEmail":"markb@ordern.com","sentAt":"2008-12-03T20:51:58Z","receivedAt":"2008-12-03T20:51:58Z","isPatch":false,"sender":{"key":"markb@ordern.com","avatar":null},"body":"\nHi,\n\nI was just trying out the new gitk feature that shows you the origin of a\nselected line in the diff pane and found that it doesn't work right if\ngitk is not started in the top-level work directory - i.e. if you are\nin a subdir it pops up an error message of this form:\n\nError running git blame: fatal: no such path $path in $sha1\n\nI guess it needs something like subdir-depth number of ../ prepended to\nthe front of the pathname to make the blame succeed.\n\nI could try and fix this but I am sure that others who understand\nthe sources of gitk/git-blame/git can do it much quicker than me.\n\nCheers,\n\nMark\n"},{"id":"97102","messageId":"20081203222258.6db9b34e@crow","threadId":"16586","inReplyTo":"20081203205158.6b4b62c7@crow","subject":"Re: gitk: 'show origin of this line' barfs if gitk run in subdir","fromName":"Mark Burton","fromEmail":"markb@ordern.com","sentAt":"2008-12-03T22:22:58Z","receivedAt":"2008-12-03T22:22:58Z","isPatch":false,"sender":{"key":"markb@ordern.com","avatar":null},"body":"\nHi,\n\nI think the same problem exists with the 'run git gui blame on this\nline' feature. It doesn't work when gitk is started in a subdir of the\nworking tree but it does work when gitk is started in the top-level\ndirectory.\n\nCheers,\n\nMark\n"},{"id":"97248","messageId":"18746.23149.709046.770559@cargo.ozlabs.ibm.com","threadId":"16586","inReplyTo":"20081203222258.6db9b34e@crow","subject":"Re: gitk: 'show origin of this line' barfs if gitk run in subdir","fromName":"Paul Mackerras","fromEmail":"paulus@samba.org","sentAt":"2008-12-06T10:56:45Z","receivedAt":"2008-12-06T10:56:45Z","isPatch":false,"sender":{"key":"paulus@samba.org","avatar":"https://avatars.githubusercontent.com/u/1606439?v=4"},"body":"Mark Burton writes:\n\n> I think the same problem exists with the 'run git gui blame on this\n> line' feature. It doesn't work when gitk is started in a subdir of the\n> working tree but it does work when gitk is started in the top-level\n> directory.\n\nI have checked in a fix into my gitk.git repository at\ngit://git.kernel.org/pub/scm/gitk/gitk.git.  However, there seems to\nbe a bug in git gui blame; it gives a \"list index out of range\" error\nsometimes.\n\nShawn, to see an example of the error, get a current kernel tree and\ndo:\n\n$ cd arch/powerpc\n$ git gui blame --line=1183 2c5e76158fcea6e3b9536a74efa7b5e2e846d374 \\\n  ../../net/sunrpc/svcsock.c\n\nPaul.\n"}]}