Skip to contentSkip to conversation

refresh cache after changing tracked tree

PATCH New Martin Schlemmer 1 participant 1 message Jun 15, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 refresh cache after changing tracked tree

Hi,

I see the latest gitdiff-do does the right thing regarding modes, but we still need to refresh the cache.

gittrack.sh: 03d6db1fb3a70605ef249c632c04e542457f0808

gittrack.sh +2 -0
@@ -51,6 +51,7 @@
 
        read-tree $(tree-id "$name")
        gitdiff.sh local "$name" | gitapply.sh
+       update-cache --refresh
 
 else
        [ "$tracking" ] || \
@@ -61,6 +62,7 @@
        if [ -s ".git/HEAD.local" ]; then
                gitdiff.sh "$tracking" local | gitapply.sh
                read-tree $(tree-id local)
+               update-cache --refresh
 
                head=$(cat .git/HEAD)
                branchhead=$(cat .git/heads/$tracking)
Signature · 1 line
Martin Schlemmer

gittrack.sh: 03d6db1fb3a70605ef249c632c04e542457f0808

gittrack.sh +2 -0
@@ -51,6 +51,7 @@
 
 	read-tree $(tree-id "$name")
 	gitdiff.sh local "$name" | gitapply.sh
+	update-cache --refresh
 
 else
 	[ "$tracking" ] || \
@@ -61,6 +62,7 @@
 	if [ -s ".git/HEAD.local" ]; then
 		gitdiff.sh "$tracking" local | gitapply.sh
 		read-tree $(tree-id local)
+		update-cache --refresh
 
 		head=$(cat .git/HEAD)
 		branchhead=$(cat .git/heads/$tracking)