本文介绍了Gitk没有显示主人的头像?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是在Ubuntu 14.04上, 完全忽略 - all 切换并显示修改给定文件并且不收集任何引用的第一个提交。所以我再也不会把它称为一个错误,只是一个呃,它的实施方式。另外我应该提到,在 gitk 命令行中指定一个文件对我来说是一件不寻常的事情。


This is on Ubuntu 14.04, git version 1.9.1 (same for gitk). I'm doing this:

$ cd /tmp
$ git clone https://github.com/underdoeg/ofxLibRocket.git ofxLibRocket-git
Cloning into 'ofxLibRocket-git'...
remote: Counting objects: 1013, done.
remote: Total 1013 (delta 0), reused 0 (delta 0), pack-reused 1013
Receiving objects: 100% (1013/1013), 16.85 MiB | 326.00 KiB/s, done.
Resolving deltas: 100% (631/631), done.
Checking connectivity... done.
$ cd ofxLibRocket-git
$ git status
On branch master
Your branch is up-to-date with 'origin/master'.

nothing to commit, working directory clean
$ git log -1 --decorate
commit 14360ed8fd3428aa0a2e052f6363e5daa0bf0d75 (HEAD, origin/master, origin/HEAD, master)
Merge: 06dd209 801877c
Author: Philip Whitfield <[email protected]>
Date:   Fri Feb 22 03:16:37 2013 -0800

    Merge pull request #6 from neilmendoza/master

    Fixed OSX libs and example
$ gitk --all .

So far so good - but, if I run gitk --all . in this directory, then the commit of current HEAD is not indicated in the gitk display? This is what I get:

This is the weird thing: the only commit containing the word OSX shown in gitk, which I've selected manually:

  • has the hash 801877c48390324dc7d600936306cd7c00486dcc, unlike what git log shows for current head, 14360ed8fd3428aa0a2e052f6363e5daa0bf0d75
  • The 14360ed8 is the "merge pull request" by one committer, the 801877c the pull request by another committer, for the same patch/commit, "Fixed OSX libs and example"
  • The 14360ed8 is not listed in any commit of gitk
  • There is no yellow dot to indicate HEAD, nor a "master" branch label, anywhere in gitk (and certainly not next to 801877c).

So, why doesn't gitk in this case show the HEAD and the 14360ed8 commit? I have tried doing:

git checkout master
git reset --hard HEAD

... but it seems to make no difference in terms of display in gitk... How can I get the proper display of HEAD and the master branch in this case?


EDIT: So, I installed gitg (Version 0.2.7), and it seems to make more sense visualisation-wise:

So is this a bug in gitk, or does gitk need some special setup (say, command line switches) to show this state of the repository?

解决方案
  1. gitk --all without path specification gives the expected result, exactly as gitg
  2. It seems that gitk <some path> completely ignores --all switch and displays the first commit which modifies a given file and doesn't collect any references. So again I wouldn't call it a bug, just a, hmm, way it's implemented. Also I should mention that specifying a file in the command line for gitk is a unusual thing for me.

这篇关于Gitk没有显示主人的头像?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-30 16:48