public inbox for git@vger.kernel.org 
 help / color / mirror / Atom feed
From: Jonathan Nieder <jrnieder@gmail•com>
To: Justin Frankel <justin@cockos•com>
Cc: git@vger•kernel.org, "Ævar Arnfjörð Bjarmason" <avarab@gmail•com>
Subject: Re: RFC: checkout/temporary branch switch restoring modification times
Date: Mon, 4 Oct 2010 00:11:48 -0500	[thread overview]
Message-ID: <20101004051148.GG24884@burratino> (raw)
In-Reply-To: <4CA95B18.5090008@cockos.com>

Hi,

Justin Frankel wrote:

> git cop master
> ; build
> git cop some-branch-that-affects-lots-of-files
> ; edit some things, commit
> git cop master
> ; build (fast, nothing changed)

Interesting.  I guess the intended use is that you only ever build
on the master branch?

Have you ever tried the contrib/workdir/git-new-workdir script?
I find it fits the use case well for me:

 git clone $repo
 cd repo
 make
 # oh, shoot! I need to try something out real quick.
 cd ..
 git new-workdir repo repo2 origin/master
 cd repo2
 git am patch-to-test
 make
 # okay, back to what I was doing...
 cd ../repo

Maybe it could be helpful for you, too?

Limitations:

 - requires a file system with support for symbolic links
   (I think Pierre Habouzit and Junio discussed changing
   that);

 - workdirs share refs.  If you update master in one
   workdir and another workdir also has master checked
   out, the new changes will appear as staged changes.

 - workdirs do not share HEAD.  "git gc" from one
   workdir can completely trash another if it has a
   detached HEAD pointing to a commit that is not part
   of any local or remote branch.

  parent reply	other threads:[~2010-10-04  5:15 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-04  4:42 RFC: checkout/temporary branch switch restoring modification times Justin Frankel
2010-10-04  5:00 ` Ævar Arnfjörð Bjarmason
2010-10-04  5:11 ` Jonathan Nieder [this message]
2010-10-04 14:20   ` Justin Frankel

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=20101004051148.GG24884@burratino \
    --to=jrnieder@gmail$(echo .)com \
    --cc=avarab@gmail$(echo .)com \
    --cc=git@vger$(echo .)kernel.org \
    --cc=justin@cockos$(echo .)com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox