git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [patch pasky] refresh cache after changing tracked tree
@ 2005-04-14 22:54 Martin Schlemmer
  0 siblings, 0 replies; only message in thread
From: Martin Schlemmer @ 2005-04-14 22:54 UTC (permalink / raw)
  To: GIT Mailing Lists; +Cc: Petr Baudis


[-- Attachment #1.1: Type: text/plain, Size: 833 bytes --]

Hi,

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


Signed-off-by: Martin Schlemmer <azarah@nosferatu.za.org>

gittrack.sh:  03d6db1fb3a70605ef249c632c04e542457f0808
--- 03d6db1fb3a70605ef249c632c04e542457f0808/gittrack.sh
+++ uncommitted/gittrack.sh
@@ -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)


-- 
Martin Schlemmer


[-- Attachment #1.2: git-track-update_cache.patch --]
[-- Type: text/x-patch, Size: 532 bytes --]

gittrack.sh:  03d6db1fb3a70605ef249c632c04e542457f0808
--- 03d6db1fb3a70605ef249c632c04e542457f0808/gittrack.sh
+++ uncommitted/gittrack.sh
@@ -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)

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2005-04-14 22:47 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-04-14 22:54 [patch pasky] refresh cache after changing tracked tree Martin Schlemmer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).