From: "Shawn O. Pearce" <spearce@spearce.org>
To: Junio C Hamano <gitster@pobox.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>,
Robin Rosenberg <robin.rosenberg@dewire.com>,
Git Mailing List <git@vger.kernel.org>
Subject: Re: [PATCH] Allow branch names that end with ".lock"
Date: Thu, 7 May 2009 18:01:10 -0700 [thread overview]
Message-ID: <20090508010110.GW30527@spearce.org> (raw)
In-Reply-To: <7veiv0bee2.fsf@alter.siamese.dyndns.org>
Junio C Hamano <gitster@pobox.com> wrote:
> "Shawn O. Pearce" <spearce@spearce.org> writes:
>
> > Junio C Hamano <gitster@pobox.com> wrote:
> >> A project policy for naming branches could be to use a dot as a word
> >> separator (instead of '-' which is often done by existing projects), and
> >> "fix.vm.lock" could be a very valid name for a branch to address a VM
> >> locking issues.
> >
> > I think we sent the same patch... except...
> >
> >> git-gui/lib/index.tcl | 2 +-
> >
> > Don't do that. I'll patch git-gui and send you a pull request.
>
> Why not? I never commit my "how about this" weatherbaloon patches
> directly ;-)
I know. I was saying, "don't patch git-gui in the same commit
as git.git". I would have spun that as two different commits.
> If you found that ours match identically except for that one line, that is
> a very good indication. I didn't check.
Here's `git diff yours mine`, we were really close:
diff --git a/Documentation/technical/api-lockfile.txt b/Documentation/technical/api-lockfile.txt
index 31e1141..982984f 100644
--- a/Documentation/technical/api-lockfile.txt
+++ b/Documentation/technical/api-lockfile.txt
@@ -4,7 +4,7 @@ lockfile API
The lockfile API serves two purposes:
* Mutual exclusion. When we write out a new index file, first
- we create a new "lock" file `$GIT_DIR/index..lck`, write the new
+ we create a new file `$GIT_DIR/index..lck`, write the new
contents into it, and rename it to the final destination
`$GIT_DIR/index`. We try to create the `$GIT_DIR/index..lck`
file with O_EXCL so that we can notice and fail when somebody
ACK, I like your version better than mine.
diff --git a/refs.c b/refs.c
index 03aded9..b4ca305 100644
--- a/refs.c
+++ b/refs.c
@@ -742,8 +742,6 @@ int check_ref_format(const char *ref)
return CHECK_REF_FORMAT_ERROR;
if (level < 2)
return CHECK_REF_FORMAT_ONELEVEL;
- if (has_extension(ref, "..lck"))
- return CHECK_REF_FORMAT_ERROR;
return ret;
}
}
NAK, I like how I removed this block. It can't happen anymore,
the no ".." in name earlier should have caught the condition.
--
Shawn.
next prev parent reply other threads:[~2009-05-08 1:01 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-05-07 15:05 [JGIT PATCH 1/2] Add support for boolean config values "yes", "no" Shawn O. Pearce
2009-05-07 15:05 ` [JGIT PATCH 2/2] Make Repository.isValidRefName compatible with Git 1.6.3 Shawn O. Pearce
2009-05-07 23:02 ` Robin Rosenberg
2009-05-07 23:29 ` Linus Torvalds
2009-05-08 0:32 ` Junio C Hamano
2009-05-08 0:47 ` Shawn O. Pearce
2009-05-08 7:24 ` Alex Riesen
2009-05-08 8:04 ` Johannes Schindelin
2009-05-08 8:43 ` Junio C Hamano
2009-05-08 9:54 ` Johannes Schindelin
2009-05-08 11:45 ` Alex Riesen
2009-05-08 14:34 ` Shawn O. Pearce
[not found] ` <7viqkcbenb.fsf_-_@alter.siamese.dyndns.org>
2009-05-08 0:54 ` [PATCH] Allow branch names that end with ".lock" Shawn O. Pearce
2009-05-08 0:57 ` Junio C Hamano
2009-05-08 1:01 ` Shawn O. Pearce [this message]
2009-05-08 1:25 ` Junio C Hamano
2009-05-07 17:56 ` [JGIT PATCH 1/2] Add support for boolean config values "yes", "no" Brandon Casey
2009-05-07 18:01 ` [JGIT PATCH v2 1/2] Add support for boolean config values "on", "off" Shawn O. Pearce
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=20090508010110.GW30527@spearce.org \
--to=spearce@spearce.org \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=robin.rosenberg@dewire.com \
--cc=torvalds@linux-foundation.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.