From: Jeff Garzik <jgarzik@pobox.com>
To: Git Mailing List <git@vger.kernel.org>
Subject: checkout-cache -f: a better way?
Date: Fri, 20 May 2005 17:05:06 -0400 [thread overview]
Message-ID: <428E5102.60003@pobox.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 563 bytes --]
Being a weirdo, I don't use cogito for kernel development, just git
itself. I store branches in .git/refs/heads/ per the defacto standard,
and use the attached script to switch the working directory from one
branch to another.
Problem is, 'git-checkout-cache -q -f -a' really pounds the disk, and
takes quite a while.
Is there any way to avoid -f, while ensuring that the working directory
truly represents the new branch?
BitKeeper has a secret checkout arg '-S', which will leave files
untouched if the mtime/size information is unchanged.
Jeff
[-- Attachment #2: git-switch-tree --]
[-- Type: text/plain, Size: 381 bytes --]
#!/bin/sh
if [ "x$1" != "x" ]
then
if [ "$1" == "master" ]
then
( cd .git && rm -f HEAD && ln -s refs/heads/master HEAD )
else
if [ ! -f .git/refs/heads/$1 ]
then
echo Branch $1 not found.
exit 1
fi
( cd .git && rm -f HEAD && ln -s refs/heads/$1 HEAD )
fi
fi
git-read-tree $(cat .git/HEAD) && \
git-checkout-cache -q -f -a && \
git-update-cache --refresh
next reply other threads:[~2005-05-20 21:04 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-05-20 21:05 Jeff Garzik [this message]
2005-05-20 22:38 ` checkout-cache -f: a better way? Junio C Hamano
2005-05-20 23:33 ` Jeff Garzik
2005-05-20 23:39 ` Junio C Hamano
2005-05-20 23:58 ` Jeff Garzik
2005-05-21 1:44 ` Linus Torvalds
2005-05-21 1:45 ` Jeff Garzik
2005-05-20 23:33 ` Linus Torvalds
2005-05-20 23:51 ` Linus Torvalds
2005-05-20 23:55 ` Jeff Garzik
2005-05-20 23:59 ` Junio C Hamano
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=428E5102.60003@pobox.com \
--to=jgarzik@pobox.com \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.