Thread (3 messages) flat view 3 messages, 2 authors, 2016-06-15

Re: v1.7.0-rc0 shows lots of "unable to find <sha1>" on git-stash

From: Jonathan del Strother <hidden>
Date: 2016-06-15 22:48:08
Subsystem: the rest · Maintainer: Linus Torvalds

Possibly related (same subject, not in this thread)

On 30 January 2010 20:25, Junio C Hamano [off-list ref] wrote:
Junio C Hamano [off-list ref] writes:
quoted
Please try this.
oops, but with this, too.
quoted
diff --git a/submodule.c b/submodule.c
index ca0527f..8bd0a30 100644
--- a/submodule.c
+++ b/submodule.c
...
@@ -142,7 +142,9 @@ int is_submodule_modified(const char *path)
      env[0] = strbuf_detach(&buf, NULL);
      strbuf_addf(&buf, "GIT_DIR=%s/.git", path);
      env[1] = strbuf_detach(&buf, NULL);
-     env[2] = NULL;
+     strbuf_addf(&buf, "GIT_INDEX_FILE=");
This should be:

       strbuf_addf(&buf, "GIT_INDEX_FILE");
quoted
+     env[2] = strbuf_detach(&buf, NULL);
+     env[3] = NULL;

      memset(&cp, 0, sizeof(cp));
      cp.argv = argv;
Sorry, I'm not sure I follow your amendment - it looks exactly like
the patch you originally supplied?

With that original patch applied, I no longer get the 'unable to find'
errors on stashing.  However, git-status shows all my submodules as
being modified, but there appear to be no local changes :

[jon@gir:Developer/AudioBooWeb]$ git status
# On branch giterror
# Changed but not updated:
#   (use "git add <file>..." to update what will be committed)
#   (use "git checkout -- <file>..." to discard changes in working directory)
#
#	modified:   shared/vendor/plugins/acts_as_list
#	modified:   shared/vendor/plugins/cucumber
#	modified:   shared/vendor/plugins/delayed_job
#	modified:   shared/vendor/plugins/haml
#	modified:   shared/vendor/plugins/hoptoad_notifier
#	modified:   shared/vendor/plugins/machinist
#	modified:   shared/vendor/plugins/newrelic_rpm
#	modified:   shared/vendor/plugins/rspec
#	modified:   shared/vendor/plugins/rspec-rails
#	modified:   shared/vendor/rails
#
no changes added to commit (use "git add" and/or "git commit -a")

[jon@gir:Developer/AudioBooWeb]$ git diff
diff --git a/shared/vendor/plugins/acts_as_list
b/shared/vendor/plugins/acts_as_list
diff --git a/shared/vendor/plugins/cucumber b/shared/vendor/plugins/cucumber
diff --git a/shared/vendor/plugins/delayed_job
b/shared/vendor/plugins/delayed_job
diff --git a/shared/vendor/plugins/haml b/shared/vendor/plugins/haml
diff --git a/shared/vendor/plugins/hoptoad_notifier
b/shared/vendor/plugins/hoptoad_notifier
diff --git a/shared/vendor/plugins/machinist b/shared/vendor/plugins/machinist
diff --git a/shared/vendor/plugins/newrelic_rpm
b/shared/vendor/plugins/newrelic_rpm
diff --git a/shared/vendor/plugins/rspec b/shared/vendor/plugins/rspec
diff --git a/shared/vendor/plugins/rspec-rails
b/shared/vendor/plugins/rspec-rails
diff --git a/shared/vendor/rails b/shared/vendor/rails
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help