From: "Catalin Marinas" <catalin.marinas@gmail.com>
To: "Karl Hasselström" <kha@treskal.com>
Cc: "Pavel Roskin" <proski@gnu.org>,
git@vger.kernel.org, "Yann Dirson" <ydirson@altern.org>
Subject: Re: [StGIT PATCH 2/2] Don't touch ref files manually
Date: Tue, 21 Aug 2007 14:23:29 +0100 [thread overview]
Message-ID: <b0943d9e0708210623h112faa42p97bba06bc9fab774@mail.gmail.com> (raw)
In-Reply-To: <20070810032318.19791.70483.stgit@yoghurt>
Hi Karl,
On 10/08/07, Karl Hasselström <kha@treskal.com> wrote:
> Messing with files manually doesn't work if the refs are packed. The
> officially preferred way is to use git-update-ref, git-show-ref,
> et.al. So do that.
Thanks for this patch. I'll apply it but I have some questions below.
> @@ -294,14 +301,16 @@ def set_head_file(ref):
> # head cache flushing is needed since we might have a different value
> # in the new head
> __clear_head_cache()
> - if __run('git-symbolic-ref HEAD',
> - [os.path.join('refs', 'heads', ref)]) != 0:
> + if __run('git-symbolic-ref HEAD', ['refs/heads/%s' % ref]) != 0:
> raise GitException, 'Could not set head to "%s"' % ref
Why replacing os.path.join with a single string? I think the former is
more portable if, in the future, someone will try to run StGIT on
Windows (and GIT would be compiled directly, without cygwin).
> diff --git a/t/t1000-branch-create.sh b/t/t1000-branch-create.sh
> index cca5504..e920e93 100755
> --- a/t/t1000-branch-create.sh
> +++ b/t/t1000-branch-create.sh
> @@ -13,26 +13,9 @@ Exercises the "stg branch" commands.
> stg init
>
> test_expect_success \
> - 'Create a spurious refs/patches/ entry' '
> - find .git -name foo | xargs rm -rf &&
> - touch .git/refs/patches/foo
I haven't tried this test but is there any problem if we keep them?
Thanks.
--
Catalin
next prev parent reply other threads:[~2007-08-21 13:23 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-08-07 2:20 'pu' branch for StGIT Karl Hasselström
2007-08-07 2:38 ` Shawn O. Pearce
2007-08-08 5:03 ` Pavel Roskin
2007-08-08 9:20 ` Karl Hasselström
2007-08-08 21:39 ` Karl Hasselström
2007-08-08 22:18 ` Pavel Roskin
2007-08-08 23:23 ` Karl Hasselström
2007-08-09 0:10 ` Pavel Roskin
2007-08-09 7:38 ` Karl Hasselström
2007-08-09 13:24 ` Pavel Roskin
2007-08-09 14:18 ` Karl Hasselström
2007-08-09 14:24 ` Karl Hasselström
2007-08-09 16:33 ` Pavel Roskin
2007-08-09 20:39 ` Karl Hasselström
2007-08-10 3:23 ` [StGIT PATCH 0/2] Teach StGIT to survive git-gc Karl Hasselström
2007-08-10 3:23 ` [StGIT PATCH 1/2] New test: make sure that StGIT can handle packed refs Karl Hasselström
2007-08-10 3:23 ` [StGIT PATCH 2/2] Don't touch ref files manually Karl Hasselström
2007-08-21 13:23 ` Catalin Marinas [this message]
2007-08-21 15:58 ` Karl Hasselström
2007-08-21 16:09 ` Karl Hasselström
2007-08-21 16:12 ` Johannes Sixt
2007-08-21 16:38 ` Karl Hasselström
2007-08-21 16:46 ` Karl Hasselström
2007-08-21 20:48 ` Karl Hasselström
2007-08-23 14:04 ` Catalin Marinas
2007-08-09 21:31 ` 'pu' branch for StGIT Catalin Marinas
2007-08-10 0:30 ` Karl Hasselström
2007-08-12 22:47 ` Pavel Roskin
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=b0943d9e0708210623h112faa42p97bba06bc9fab774@mail.gmail.com \
--to=catalin.marinas@gmail.com \
--cc=git@vger.kernel.org \
--cc=kha@treskal.com \
--cc=proski@gnu.org \
--cc=ydirson@altern.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 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).