#82 ✓resolved
Anders Carling

File mode changes doesn't show in detailed history view producing confusing results

Reported by Anders Carling | January 29th, 2009 @ 11:05 AM | in 0.7

Changes in file mode doesn't show in the detailed view which makes files with only mode changes look rather confusing since they still produce an empty box.

The attached screenshot is of the commit:


commit e769200352192e7ce3581548ffa2991dcc2f58fa
tree 1ad9d24d79a2ae16692642857b0d64088ff22fee
parent d620e88150d3722fbeba3c75f16613ce366eb970
author Anders Carling <anders.carling@d05.se> 1233223359 +0100
committer Anders Carling <anders.carling@d05.se> 1233223359 +0100

    -x on demo, adding demo 2 for extra illustration

diff --git a/demo b/demo
old mode 100755
new mode 100644
diff --git a/demo2.txt b/demo2.txt
new file mode 100644
index 0000000..8f004b1
--- /dev/null
+++ b/demo2.txt
@@ -0,0 +1 @@
+Lorem ipsum..

Comments and changes to this ticket

  • Johannes Gilger

    Johannes Gilger January 29th, 2009 @ 12:02 PM

    • Tag changed from gui to bug, gui

    Yep, thanks for mentioning that, our current code absolutely doesn't catch that case. I guess we really should create a GitX-test-repo which test every kind of file change/addition/removal for different file-types etc.

  • Johannes Gilger

    Johannes Gilger January 29th, 2009 @ 03:18 PM

    Although I have fixed the bug itself the way in which stuff like is displayed is still not correct. For example there are scenarios in which the mode changes and the content does too, the same for binary files, and so on. I'm getting the feeling that we'll seriously have to consider restructuring the diffHighlighter.js and history.js, but that's up to Pieter.

    I sent him the patch for the meantime, at least the commits display correctly with that one.

  • Anders Carling

    Anders Carling January 29th, 2009 @ 07:05 PM

    Awesome!

    I think a test repository sounds like a good idea, and since there is quite a lot of other git related tools that's being developed, I guess there should be a rather good chance that somebody has already created such a repository.

    However I've tried to look around at the websites of a few different git frontends and such, and I can't find anything.

  • Pieter de Bie

    Pieter de Bie January 30th, 2009 @ 01:02 AM

    • Tag changed from bug, gui to bug, feature, gui
    • Milestone set to 0.7

    Should be doable for the next release :)

  • Pieter de Bie

    Pieter de Bie January 30th, 2009 @ 01:02 AM

    • State changed from “new” to “open”
  • Pieter de Bie

    Pieter de Bie March 24th, 2009 @ 01:43 AM

    One way to make this easier for us is to use an additional git call. git diff can do something like --file-status which gives a nice, machine-parsable description of what actually changed. The downside of doing that is that we need another git call, so it's more expensive... thoughts?

  • Johannes Gilger

    Johannes Gilger May 28th, 2009 @ 03:00 PM

    Hi Pieter,

    I just noticed your commit improving performance for history.js, nice! Unfortunately it broke the display of mode-change in a small way, i.e. that the HTML-arrow -> is "quoted". There doesn't seem to be a way around that when using createTextNode, which is why I simply replaced it by ASCII -> for now.

    Commit is on top of my bugfixes. By the way, my stresstest-repo http://github.com/heipei/stresstest/tree/master is a good way to test those cases, since most of us don't have file-mode-changes that often in their normal workflow.

  • Pieter de Bie

    Pieter de Bie May 28th, 2009 @ 03:14 PM

    Thanks, good eyes :) I forgot about your stresstest repo, that's a
    useful tool to have.

  • Johannes Gilger

    Johannes Gilger May 28th, 2009 @ 03:17 PM

    Yep, and I just noticed some other errors (the "argh!"-kind):

    1. The top commit in my stresstest-repo display a file twice
    2. The top-commit has no subject in the table (wtf?)
  • Pieter de Bie

    Pieter de Bie May 28th, 2009 @ 03:41 PM

    Yes, the subject stuff is because of line 155 in PBGitRevList.mm:

        [newCommit setSubject:[NSString stringWithUTF8String:subject.c_str()]];
        [newCommit setAuthor:[NSString stringWithUTF8String:author.c_str()]];
    

    It tries to convert it to UTF8, if that fails, it gets set to NULL.

    That can be handled by using --encoding=UTF-8 with the git-log
    command, but that still fails because your stresstest repository
    hasn't set the right encoding when you committed those changes.

    But, when I try to change that, I still can't get it to work.. hmm

  • Pieter de Bie

    Pieter de Bie May 28th, 2009 @ 03:53 PM

    ok, git log --pretty=%s doesn't convert to an encoding, even if you
    specified --encoding=UTF-8. I guess we'll have to convert it
    ourselves.. (using %e to get the encoding)

  • Pieter de Bie

    Pieter de Bie May 28th, 2009 @ 04:12 PM

    I fixed the encoding stuff in b7c46c16b8 (GitRevList -- Try to read
    the encoding of the commit message), for now. We might need to get
    back to that, but everything with encodings is difficult :)

  • Pieter de Bie

    Pieter de Bie May 28th, 2009 @ 04:13 PM

    Oh, and I don't see the double displaying of the file.

    (sorry for the spam everybody)

  • Pieter de Bie

    Pieter de Bie June 11th, 2009 @ 06:36 PM

    Johannes, do you know what the status of this ticket is?

  • Johannes Gilger

    Johannes Gilger June 11th, 2009 @ 07:19 PM

    Ok, the commits in my stresstest-repo all display fine. The ASCII-arrow -> isn't the prettiest, but aside from that I think all the problems in this ticket have been addressed.

  • Pieter de Bie

    Pieter de Bie June 11th, 2009 @ 07:59 PM

    • State changed from “open” to “resolved”

    OK, I'm just going to close this then :) We'll see if more issues pop up.

  • luis khan

    luis khan October 2nd, 2018 @ 08:30 AM

    Ok, the commits in my stresstest-repo all display fine. The ASCII-arrow -> isn't the prettiest, but aside from that I think all the problems in this ticket have been addressed.2019 Calendar Editable
    2019 Calendar Editable

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

GitX is the nice-looking gitk clone for OS X

Attachments

Tags

Pages