Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[perl branch]: submodule diff error #21

Closed
grota opened this issue Mar 31, 2012 · 9 comments
Closed

[perl branch]: submodule diff error #21

grota opened this issue Mar 31, 2012 · 9 comments

Comments

@grota
Copy link

grota commented Mar 31, 2012

The perl implementation chokes on line 126 with:

❯ git diffall
No such file or directory at /usr/lib/git-core/git-diffall--lib line 126.

I'm not fluent in perl. I've used some print statements and it seems to be trying to write to /tmp/git-diffall.5U5FV/left/bin/git-diffall.

I'm simply trying diffall on my https://github.com/grota/rcfiles repo:

diff --git i/bin/git-diffall w/bin/git-diffall
index 0838b05..4046847 160000
--- i/bin/git-diffall
+++ w/bin/git-diffall
@@ -1 +1 @@
-Subproject commit 0838b05556b608ca82d613c0a0e01dab97ab1511
+Subproject commit 4046847990d89e13fa53b0e4bc14be8d3e8ef1f6

I might be doing something silly myself since I haven't been able to test git-diffall for a while.

@thenigan
Copy link
Owner

thenigan commented Apr 2, 2012

It looks like you are using an older version of the script. I rewrote a big part of the Perl script. Can you try with the latest (commit 762871a)?

Also, can you tell me more information about your configuration?

  1. Which diff tool are you using?
  2. How did you set diff.tool or merge.tool?

@grota
Copy link
Author

grota commented Apr 2, 2012

Ok, I updated the code and run some more tests, here's the rundown, but first a recap on my settings:

❯ git config alias.dd
diffall --extcmd=/home/grota/local/bin/vimdirdiff.sh

❯ cat ~/local/bin/vimdirdiff.sh
#!/bin/sh
vim -f '+next' '+execute "DirDiff" argv(0) argv(1)' $@

case A: a simple repo with just a couple of file modifed, no submodules involved.

❯ git diffall --extcmd=meld
...works...

❯ git dd
...works...

case B: repo with files and submodules modified.

❯ git diffall --extcmd=meld
No such file or directory at /usr/lib/git-core/git-diffall line 116.


❯ git dd
No such file or directory at /usr/lib/git-core/git-diffall line 116.

@grota
Copy link
Author

grota commented Apr 2, 2012

I forgot to specify that my diff.tool is empty and

❯ git config merge.tool
vimdiff

@thenigan
Copy link
Owner

thenigan commented Apr 2, 2012

Using the same setup (including the 'dd' alias), I have not been able to replicate this error. If you have time, can you please tell me:

  1. What platform you are using? (Linux, Mac, Windows? including the version)
  2. What version of Git you are using? (output of git --version)
  3. For the range that is causing the error, can you post the output of git diff --raw <range>?

Is this a public repo that I could try to test against? I cloned your rcfiles repo, but there are no modifications to .gitmodules after the initial commit.

@grota
Copy link
Author

grota commented Apr 2, 2012

sure,

  1. Ubuntu 11.10
  2. git version 1.7.5.4
  3. here it is, it's a simple wc->index diff, so no arguments:
❯ git diff --raw
:160000 160000 0838b05... 0000000... M  bin/git-diffall
:100644 100644 8c15b10... 0000000... M  git/_gitconfig
:100644 100644 18dde99... 0000000... M  pentadactyl/_pentadactylrc
:160000 160000 f53be88... f53be88... M  private
:100644 100644 2accde8... 0000000... M  tmux/_tmux.conf

and here's the git diff (some bits pruned), also it's a bit of a WIP so please don't mind the content 😁

diff --git i/bin/git-diffall w/bin/git-diffall
index 0838b05..762871a 160000
--- i/bin/git-diffall
+++ w/bin/git-diffall
@@ -1 +1 @@
-Subproject commit 0838b05556b608ca82d613c0a0e01dab97ab1511
+Subproject commit 762871a118ef287f86f4071dc93e536690b01f16
diff --git i/git/_gitconfig w/git/_gitconfig
index 8c15b10..390f5f9 100644
--- i/git/_gitconfig
+++ w/git/_gitconfig
@@ -18,7 +18,7 @@
 # Passing --extcmd bypasses diff.tool and merge.tool (a valid option must be set, though)
 # --copy-back applies the modifications made on the temp rhs tree back to git's working copy.
 # ONLY the rhs tree will be copied to the working copy. The lhs will be discarded.
-   dd = diffall --extcmd=~/local/bin/vimdirdiff.sh
+   dd = diffall --extcmd=/home/grota/local/bin/vimdirdiff.sh
    vdd = -c merge.tool=meld diffall --copy-back

 # Defines a diff mode, you can then put in .gitattributes
@@ -43,3 +43,12 @@
 [tig "bind"]
     generic = up move-up
     generic = down move-down
+# vim: set ft=gitconfig:
+# merge manually until git 1.7.10, or use stgit http://procode.org/stgit/
+[user]
+   name = Giuseppe Rota
+   email = xxxxxx
+
+[github]
+   token = xxxxxxxxxx
+   user = xxxx
diff --git i/pentadactyl/_pentadactylrc w/pentadactyl/_pentadactylrc
index 18dde99..867c1ad 100644
--- i/pentadactyl/_pentadactylrc
+++ w/pentadactyl/_pentadactylrc
@@ -51,9 +51,10 @@ set mapleader=','
 set newtab=help,prefs
 set titlestring="Firefox / Pentadactyl"
 set hintkeys='asdfhjklgqwerpoiuyt'
-set passkeys+=mail.google.com:jkroaefu<CR>gi#
+set passkeys+=mail.google.com:jkroaefu<CR>gi#l
 "set wildmode=longest,full
 set defsearch=gg
+set go+=B

 highlight Hint       font-size: 14px; background: rgba(210,1,133,0.8) !important; border: 2px solid rgb(165,1,105); font-weight: bold; color: white; font-family: Helvetica; line-height:1em;
 highlight HintActive background: rgba(145,197,43,0.8)    !important;
diff --git i/private w/private
--- i/private
+++ w/private
@@ -1 +1 @@
-Subproject commit f53be889043c6ca7885f98b17247a470c00273bb
+Subproject commit f53be889043c6ca7885f98b17247a470c00273bb-dirty
diff --git i/tmux/_tmux.conf w/tmux/_tmux.conf
index 2accde8..c6bb51e 100644
--- i/tmux/_tmux.conf
+++ w/tmux/_tmux.conf
@@ -50,6 +50,7 @@ set -g status-justify centre
 set -g status-left-length 40
 # not very much useful for now
 #status-right ""#22T" %H:%M %d-%b-%y"
+set status-right "#(/home/grota/tmux-applets/tmux-cpu-freq 8)"
 #setw -g xterm-keys on
 #terminal-overrides ""
 # }}}

@thenigan
Copy link
Owner

thenigan commented Apr 3, 2012

I am now able to replicate this error. I found the root cause and will push a fix soon.

Thank you for the bug report and your patience in helping me find the reason.

@grota
Copy link
Author

grota commented Apr 3, 2012

thanks to you!

@grota
Copy link
Author

grota commented Apr 3, 2012

yes, it fixes the core issue. I still see 2 minor annoyances, though, due to the fact the we use the --raw option.

  1. Referring to the use case above, the private submodule (which is -dirty) does not get detected as modified since both "temp" files contain Subproject commit f53be889043c6ca7885f98b17247a470c00273bb, while the right one should probably also contain the same plus '-dirty'.
  2. The temp file for the bin/git-diffall submodule contains Subproject commit 0000000000000000000000000000000000000000

I don't see an easy way out of this, git-diff --submodule doesn't seem to help eithier, so this is just FYI.

@thenigan
Copy link
Owner

thenigan commented Apr 3, 2012

These are both valid complaints...I created issue #22 to document them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants