Signed-off-by: Michael Haggerty
---
t/t1430-bad-ref-name.sh | 16
1 file changed, 16 insertions(+)
diff --git a/t/t1430-bad-ref-name.sh b/t/t1430-bad-ref-name.sh
index a963951..612cc32 100755
--- a/t/t1430-bad-ref-name.sh
+++ b/t/t1430-bad-ref-name.sh
@@ -155,6 +155,22
It is never read, so we can pass NULL to resolve_ref_unsafe().
Signed-off-by: Michael Haggerty
---
builtin/submodule--helper.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/builtin/submodule--helper.c b/builtin/submodule--helper.c
index ed4f60b..c72365e 100644
--- a
Signed-off-by: Michael Haggerty
---
t/t1430-bad-ref-name.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/t/t1430-bad-ref-name.sh b/t/t1430-bad-ref-name.sh
index 005e2b1..cb815ab 100755
--- a/t/t1430-bad-ref-name.sh
+++ b/t/t1430-bad-ref-name.sh
@@ -148,7 +148,7
for different reference backends, the other implementations
might have different scratch space requirements.
Note that we now preserve errno across the calls to strbuf_release(),
which calls free() and can thus theoretically overwrite errno.
Signed-off-by: Michael Haggerty
---
refs/files-backend.c
now.
Signed-off-by: Michael Haggerty
---
refs/files-backend.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/refs/files-backend.c b/refs/files-backend.c
index 120b2dd..a15986c 100644
--- a/refs/files-backend.c
+++ b/refs/files-backend.c
@@ -1372,7 +1372,7 @@ sta
Signed-off-by: Michael Haggerty
---
t/t1430-bad-ref-name.sh | 18 --
1 file changed, 12 insertions(+), 6 deletions(-)
diff --git a/t/t1430-bad-ref-name.sh b/t/t1430-bad-ref-name.sh
index c465abe..005e2b1 100755
--- a/t/t1430-bad-ref-name.sh
+++ b/t/t1430-bad-ref-name.sh
@@ -42,7
If there is an error in resolve_ref_unsafe(), it returns NULL. We check
for this case, but not until after calling strip_namespace(). Instead,
call strip_namespace() *after* the NULL check.
Signed-off-by: Michael Haggerty
---
builtin/receive-pack.c | 2 +-
1 file changed, 1 insertion(+), 1
In place of `buf`, use `refname`, which is anyway a better description
of what is being pointed at.
Signed-off-by: Michael Haggerty
---
refs/files-backend.c | 13 ++---
1 file changed, 6 insertions(+), 7 deletions(-)
diff --git a/refs/files-backend.c b/refs/files-backend.c
index
It is never read, so we can pass NULL to resolve_ref_unsafe().
Signed-off-by: Michael Haggerty
---
builtin/fsck.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/builtin/fsck.c b/builtin/fsck.c
index 55eac75..3f27456 100644
--- a/builtin/fsck.c
+++ b/builtin/fsck.c
If the caller passes flags==NULL, then set it to point at a local
scratch variable. This removes the need for a lot of "if (flags)" guards
in resolve_ref_1() and resolve_missing_loose_ref().
Signed-off-by: Michael Haggerty
---
refs/files-backend.c | 31 +
There is no need to adjust *flags if we're just about to fail.
Signed-off-by: Michael Haggerty
---
refs/files-backend.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/refs/files-backend.c b/refs/files-backend.c
index 69ec903..60f1493 100644
--- a/refs/files-back
We can use (*flags & REF_BAD_NAME) for that purpose.
Signed-off-by: Michael Haggerty
---
refs/files-backend.c | 13 +
1 file changed, 5 insertions(+), 8 deletions(-)
diff --git a/refs/files-backend.c b/refs/files-backend.c
index 60f1493..b865ba5 100644
--- a/refs/files-backe
resolve_ref_unsafe() wasn't doing anything useful anymore.
Signed-off-by: Michael Haggerty
---
refs/files-backend.c | 31 +--
1 file changed, 9 insertions(+), 22 deletions(-)
diff --git a/refs/files-backend.c b/refs/files-backend.c
index f752568..120b2dd 1
On 03/01/2016 01:52 AM, David Turner wrote:
> Refactor resolve_ref_1 in terms of a new function read_raw_ref, which
> is responsible for reading ref data from the ref storage.
>
> Later, we will make read_raw_ref a pluggable backend function, and make
> resolve_ref_unsafe common.
>
> Testing done
On 03/01/2016 01:52 AM, David Turner wrote:
> From: Ramsay Jones
>
> Now that we have moved do_for_each_ref into refs.c, it no longer needs
> to be public.
>
> Signed-off-by: Ramsay Jones
> Signed-off-by: Junio C Hamano
> ---
> refs.c | 19 +++
> refs/refs-intern
On 03/01/2016 01:52 AM, David Turner wrote:
> Alternate refs backends might not need the refs/heads directory and so
> on, so we make ref db initialization part of the backend.
>
> Signed-off-by: David Turner
> Signed-off-by: Junio C Hamano
> ---
> builtin/init-db.c| 20 ++--
On 03/01/2016 01:52 AM, David Turner wrote:
> Instead of using a files-backend-specific struct ref_lock, the generic
> ref_transaction struct should provide a void pointer that backends can use
> for their own lock data.
Aside from the comments I've already mentioned, I've checked the patches
up t
On 03/24/2016 07:47 AM, David Turner wrote:
> [...]
> I incorporated your changes into the lmdb backend. To make merging
> later more convenient, I rebased on top of pu -- I think this mainly
> depends on jk/check-repository-format, but I also included some fixes
> for a couple of tests that had b
On 03/29/2016 10:12 PM, David Turner wrote:
> On Sun, 2016-03-27 at 07:22 +0200, Michael Haggerty wrote:
>> On 03/24/2016 07:47 AM, David Turner wrote:
>>> [...]
>>> I incorporated your changes into the lmdb backend. To make merging
>>> later more convenien
Currently the way to iterate over references is via a family of
for_each_ref()-style functions. You pass some arguments plus a callback
function and cb_data to the function, and your callback is called for
each reference that is selected.
This works, but it has two big disadvantages:
1. It is cum
On 03/30/2016 10:05 PM, David Turner wrote:
> On Wed, 2016-03-30 at 08:37 +0200, Michael Haggerty wrote:
>> On 03/29/2016 10:12 PM, David Turner wrote:
>>> On Sun, 2016-03-27 at 07:22 +0200, Michael Haggerty wrote:
>>>> On 03/24/2016 07:47 AM, David Turner wrote:
&g
On 04/07/2016 03:02 PM, David Turner wrote:
> From: Michael Haggerty
>
> Signed-off-by: Michael Haggerty
> [...]
David, even though I wrote these patches, I believe you need to sign
them off too since you are the one submitting them to the list (it's a
chain-of-custody sort
On 04/07/2016 03:02 PM, David Turner wrote:
> We now have quite a large number of patches before we even get into
> the meat of the pluggable refs backend series. So it's worth breaking
> those out and getting them in before we get into the main series
> (which Michael Haggerty s
On 04/15/2016 06:52 PM, Jeff King wrote:
> On Fri, Apr 15, 2016 at 01:18:46PM +0200, Christian Couder wrote:
>
>> On Fri, Apr 15, 2016 at 11:51 AM, Duy Nguyen wrote:
>>> On Fri, Apr 15, 2016 at 12:04:49AM +0200, Christian Couder wrote:
There is a draft of an article about the first part
On 03/01/2016 01:52 AM, David Turner wrote:
> The refs infrastructure learns about log-only ref updates, which only
> update the reflog. Later, we will use this to separate symbolic
> reference resolution from ref updating.
>
> Signed-off-by: David Turner
> Signed-off-by: Junio C Hamano
> ---
>
On 04/22/2016 08:05 AM, Matthieu Moy wrote:
> Simon P writes:
> > This patch is inspired from
> >
> > https://github.com/graingert/secure-smtplib/blob/master/src/secure_smtplib/__init__.py
>
> Please, add your sign-off and a proper commit message to your patch,
> see:
>
> https://github.com/git
Signed-off-by: Michael Haggerty
---
close() rarely fails, but it is possible.
refs/files-backend.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/refs/files-backend.c b/refs/files-backend.c
index 8fcbd7d..e86e3de 100644
--- a/refs/files-backend.c
+++ b/refs/files-backend.c
@@ -3144,6
Signed-off-by: Michael Haggerty
---
refs/files-backend.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/refs/files-backend.c b/refs/files-backend.c
index 1f38076..de38517 100644
--- a/refs/files-backend.c
+++ b/refs/files-backend.c
@@ -2686,7 +2686,7 @@ static int
Change add_update() to initialize all of the fields in the new
ref_update object. Rename the function to ref_transaction_add_update(),
and increase its visibility to all of the refs-related code.
All of this makes the function more useful for other future callers.
Signed-off-by: Michael Haggerty
From: David Turner
The refs infrastructure learns about log-only ref updates, which only
update the reflog. Later, we will use this to separate symbolic
reference resolution from ref updating.
Signed-off-by: David Turner
Signed-off-by: Junio C Hamano
Signed-off-by: Michael Haggerty
Among other things, document the (important!) requirement that input
refname be checked for safety before calling this function.
Signed-off-by: Michael Haggerty
---
refs/files-backend.c | 41 -
1 file changed, 24 insertions(+), 17 deletions(-)
diff --git
The reference name is going to be compared to other reference names, so
it should be in its normalized form.
Signed-off-by: Michael Haggerty
---
Does anybody have a use case for allowing un-normalized reference
names like "refs/foo/../bar///baz"? I'm pretty certain they would
resolve_ref_unsafe() can cope with being called with NULL passed to its
flags argument. So lock_ref_sha1_basic() can just hand its own type
parameter through.
Signed-off-by: Michael Haggerty
---
refs/files-backend.c | 9 +++--
1 file changed, 3 insertions(+), 6 deletions(-)
diff --git a
ff-by: Michael Haggerty
---
refs/files-backend.c | 20 +---
1 file changed, 9 insertions(+), 11 deletions(-)
diff --git a/refs/files-backend.c b/refs/files-backend.c
index 0ade681..05797cb 100644
--- a/refs/files-backend.c
+++ b/refs/files-backend.c
@@ -3043,7 +3043,6 @
e the read_ref_full() call into the (update->type & REF_ISSYMREF)
block.
Signed-off-by: Michael Haggerty
---
refs/files-backend.c | 52
1 file changed, 32 insertions(+), 20 deletions(-)
diff --git a/refs/files-backend.c b/refs/files-bac
The two string_list arguments can be const.
Signed-off-by: Michael Haggerty
---
This is needed because I want to add a new caller that has const
versions of these lists in hand.
refs/files-backend.c | 4 ++--
refs/refs-internal.h | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
diff
Signed-off-by: Michael Haggerty
---
refs.c | 8 +---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/refs.c b/refs.c
index 87dc82f..5789152 100644
--- a/refs.c
+++ b/refs.c
@@ -120,17 +120,19 @@ int check_refname_format(const char *refname, int flags)
int refname_is_safe
This avoids the need for a forward declaration in the next patch.
Signed-off-by: Michael Haggerty
---
refs/files-backend.c | 20 ++--
1 file changed, 10 insertions(+), 10 deletions(-)
diff --git a/refs/files-backend.c b/refs/files-backend.c
index 546656a..8f2a795 100644
--- a
_lock::orig_ref_name
* Remove local variable orig_refname from lock_ref_sha1_basic()
* commit_ref_update() never has to write to the reflog for
lock->orig_ref_name
Signed-off-by: Michael Haggerty
---
refs/files-backend.c | 54
1 file cha
Signed-off-by: Michael Haggerty
---
This fixes a coding error from the original implementation.
refs.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/refs.c b/refs.c
index 5789152..ca0280f 100644
--- a/refs.c
+++ b/refs.c
@@ -136,11 +136,12 @@ int refname_is_safe(const
After all, it doesn't hold the symbolic reference, but rather the
reference referred to.
Signed-off-by: Michael Haggerty
---
refs/files-backend.c | 21 +++--
refs/refs-internal.h | 2 +-
2 files changed, 12 insertions(+), 11 deletions(-)
diff --git a/refs/files-backen
Add a docstring for the remove_dir_recursively() function and the
REMOVE_DIR_* flags that can be passed to it.
Signed-off-by: Michael Haggerty
---
dir.h | 23 +++
1 file changed, 23 insertions(+)
diff --git a/dir.h b/dir.h
index 301b737..5f19acc 100644
--- a/dir.h
+++ b
It is nonsensical (and a little bit dangerous) to use REF_ISPRUNING
without REF_NODEREF. Forbid it explicitly. Change the one REF_ISPRUNING
caller to pass REF_NODEREF too.
Signed-off-by: Michael Haggerty
---
This also makes later patches a bit clearer.
refs.c | 3 +++
refs/files
Document the difference between this function and
safe_create_leading_directories_const(), and that the former restores
path before returning.
Signed-off-by: Michael Haggerty
---
cache.h | 5 +
1 file changed, 5 insertions(+)
diff --git a/cache.h b/cache.h
index 2711048..4134f64 100644
* Always start error messages with a lower-case letter.
* Always enclose reference names in single quotes.
Signed-off-by: Michael Haggerty
---
This change is not strictly needed, but I wanted to fix the old error
messages before I started adding new ones (otherwise, should the new
error
The return value of resolve_ref_unsafe() is not guaranteed to stay
around as long as we need it, so use resolve_refdup() instead.
Signed-off-by: Michael Haggerty
---
builtin/branch.c | 19 +++
1 file changed, 11 insertions(+), 8 deletions(-)
diff --git a/builtin/branch.c b
commit_ref_update() is now only called with flags=0. So remove the flags
parameter entirely.
Signed-off-by: Michael Haggerty
---
refs/files-backend.c | 14 +++---
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/refs/files-backend.c b/refs/files-backend.c
index 40ed157
flogs for symbolic references
if there is a concurrent update by another process, since the old_oid
of a symref is determined before the lock on the pointed-to ref is
held.
Both problems will soon be fixed.
Signed-off-by: David Turner
Signed-off-by: Junio C Hamano
Signed-off-by: Mi
roken symref would use the pointed-to ref name for the moved
reflog.
Add a test for the reflog bug.
Signed-off-by: David Turner
Signed-off-by: Junio C Hamano
Signed-off-by: Michael Haggerty
---
refs/files-backend.c | 13 -
t/t3200-branch.sh| 9 +
2 files change
Signed-off-by: Michael Haggerty
---
refs/files-backend.c | 9 +++--
1 file changed, 3 insertions(+), 6 deletions(-)
diff --git a/refs/files-backend.c b/refs/files-backend.c
index de38517..0ade681 100644
--- a/refs/files-backend.c
+++ b/refs/files-backend.c
@@ -2351,20 +2351,17 @@ int
in the old code, the
old_sha1 of the symref was resolved before the reference that it pointed
at was locked. So it was possible that the old_sha1 value logged to the
symref's reflog could be wrong if another process changed the downstream
reference before it was locked.
Signed-off-by: Michael Ha
If the user has asked that a new value be set for a reference, we use
check_refname_format() to verify that the reference name satisfies all
of the rules. But in other cases, at least check that refname_is_safe().
Signed-off-by: Michael Haggerty
---
There are remaining problems in this area of
l.git/287949/focus=287958
[3] http://article.gmane.org/gmane.comp.version-control.git/282927
[4] https://github.com/mhagger/git
David Turner (2):
refs: allow log-only updates
refs: don't dereference on rename
Michael Haggerty (27):
safe_create_leading_directories(): improve docstring
Extract a new function, lock_ref_for_update(), from
ref_transaction_commit().
Signed-off-by: Michael Haggerty
---
refs/files-backend.c | 152 ---
1 file changed, 85 insertions(+), 67 deletions(-)
diff --git a/refs/files-backend.c b/refs/files
This is more convenient and less error-prone for callers.
Signed-off-by: Michael Haggerty
---
refs/files-backend.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/refs/files-backend.c b/refs/files-backend.c
index 303c43b..f10c80f 100644
--- a/refs/files-backend.c
+++ b/refs/files-backend.c
This will hopefully reduce confusion with the "flags" arguments that are
used in many functions in this module as an input parameter to choose
how the function should operate.
Signed-off-by: Michael Haggerty
---
refs/files-backend.c | 16
refs/refs-internal.h | 2 +
On 04/27/2016 11:15 PM, Junio C Hamano wrote:
> Junio C Hamano writes:
>
>> If a casual reader sees this code:
>>
>> ref_transaction_delete(transaction, r->name, r->sha1,
>> REF_ISPRUNING | REF_NODEREF, NULL, &err)
>>
>> it gives an incorrect impression that there may
On 04/27/2016 08:55 PM, Junio C Hamano wrote:
> Michael Haggerty writes:
>
>> @@ -2380,8 +2381,8 @@ int rename_ref(const char *oldrefname, const char
>> *newrefname, const char *logms
>> goto rollback;
>> }
>>
>> -if (!read_ref_
On 04/27/2016 10:14 PM, Junio C Hamano wrote:
> Michael Haggerty writes:
>
>> If the user has asked that a new value be set for a reference, we use
>> check_refname_format() to verify that the reference name satisfies all
>> of the rules. But in other cases, at least ch
On 04/29/2016 01:40 AM, David Turner wrote:
> On Wed, 2016-04-27 at 18:57 +0200, Michael Haggerty wrote:
> +retry:
> ...
>> +if (--attempts_remaining > 0)
>> +goto retry;
>
> could this be a loop instead of using gotos?
It cer
On 04/29/2016 10:53 AM, Junio C Hamano wrote:
> Michael Haggerty writes:
>
>>> Could you explain s/sha1/NULL/ here in the proposed log message?
>>
>> Good question.
>>
>> Passing sha1 to delete_ref() doesn't add any safety, because the same
>>
On 04/29/2016 02:12 PM, Jeff King wrote:
> On Fri, Apr 29, 2016 at 12:57:29PM +0200, Michael Haggerty wrote:
>
>> Remember, we're talking about rename_ref() only, not reference deletion
>> in general. rename_ref() is not very robust anyway--it doesn't happen in
>&g
On 04/29/2016 10:41 AM, Junio C Hamano wrote:
> [...Long, thoughtful comments omitted...]
> So perhaps your original might be the best version
> among those that have been discussed in this thread.
Very well. I'll also add a comment near the definition of REF_ISPRUNING
that it must only be used to
On 04/30/2016 01:21 AM, David Turner wrote:
> On Fri, 2016-04-29 at 09:38 +0200, Michael Haggerty wrote:
>> On 04/27/2016 08:55 PM, Junio C Hamano wrote:
>>> Michael Haggerty writes:
>>>
>>>> @@ -2380,8 +2381,8 @@ int rename_ref(const char *oldrefname,
On 10/07/2015 03:25 AM, David Turner wrote:
> On Mon, 2015-10-05 at 11:03 +0200, Michael Haggerty wrote:
>> On 09/29/2015 12:02 AM, David Turner wrote:
>>> Because HEAD and stash are per-worktree, other backends need to
>>> go through the files backend to manage t
On 10/07/2015 03:51 AM, David Turner wrote:
> On Mon, 2015-10-05 at 17:47 +0200, Michael Haggerty wrote:
>> On 09/29/2015 12:02 AM, David Turner wrote:
>>> Add a database backend for refs using LMDB. [...]
>>
>> I think you have said before that if one writer hol
On 10/07/2015 09:20 PM, David Turner wrote:
> On Wed, 2015-10-07 at 20:31 +0200, Michael Haggerty wrote:
>> [...]
>> I'm really happy about your work.
>>
>> Regarding strategy: I think a good approach would be to get as much of
>> the preparatory work as possi
On 10/07/2015 10:55 PM, David Turner wrote:
> On Wed, 2015-10-07 at 18:00 +0200, Michael Haggerty wrote:
>>
>> That's a really good point.
>>
>> I hate to break it to you, but the handling of symrefs in Git is already
>> a mess. HEAD is the only sy
; +int verify_refname_available(const char *newname, struct string_list *extra,
> + struct string_list *skip, struct strbuf *err);
This function has an `extra` parameter but the description of this
parameter disappeared as the docstring was moved from refs.c to here.
> +
> +/*
> * Flags controlling ref_transaction_update(), ref_transaction_create(), etc.
> * REF_NODEREF: act on the ref directly, instead of dereferencing
> * symbolic references.
>
Michael
--
Michael Haggerty
mhag...@alum.mit.edu
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
ultimately end up in refs.h) given that it intrinsically only has to do
with file-based references. But I will read on...
Michael
--
Michael Haggerty
mhag...@alum.mit.edu
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.o
t; + }
> +
> + if (old_sha1) {
> + unsigned char actual_old_sha1[20];
> + read_ref(pseudoref, actual_old_sha1);
The original read
if (read_ref(pseudoref, actual_old_sha1))
die("could not read ref '%s'&
as in the previous patch. The original was
if (read_ref(pseudoref, actual_old_sha1))
die("could not read ref '%s'", pseudoref);
> + if (hashcmp(actual_old_sha1, old_sha1)) {
> + warning("Unexpected sha1 when deleting %s",
ern, '/');
in place of the above two lines. I think you made a mistake when
rebasing on top of
00b6c178c3 use strbuf_complete to conditionally append slash
> + /* No need to check for '*', there is none. */
> + strbuf_addch(&real_pa
ane.org/gmane.comp.version-control.git/279049
[2] https://github.com/mhagger/git
--
Michael Haggerty
mhag...@alum.mit.edu
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
On 10/13/2015 04:39 AM, Michael Haggerty wrote:
> On 10/12/2015 11:51 PM, David Turner wrote:
>> is_branch was already non-static, but this patch declares it in the
>> header.
>>
>> Signed-off-by: Ronnie Sahlberg
>> Signed-off-by: David Turner
>&
c references.
>
The previous commit deleted this comment from where it previously
appeared in refs-be-files.c. It would make more sense to squash this
commit onto that one so it's clear that you are moving the comment
rather than creating a new comment out of thin air.
Mich
hunks from the subsequent commit is needed in this
commit.
Michael
--
Michael Haggerty
mhag...@alum.mit.edu
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
_be_files is needed in the public interface.
> +int set_refs_backend(const char *name);
> +
> #endif /* REFS_H */
Michael
--
Michael Haggerty
mhag...@alum.mit.edu
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
On 10/13/2015 09:33 AM, Michael Haggerty wrote:
> On 10/12/2015 11:51 PM, David Turner wrote:
>> This function might be used by other refs backends
>>
>> Signed-off-by: David Turner
>> ---
>> refs.h | 11 +++
>> 1 file changed, 11 insertions(+)
>
enum ref_type ref_type(const char *refname);
>
> +int copy_reflog_msg(char *buf, const char *msg);
> +
> enum expire_reflog_flags {
> EXPIRE_REFLOGS_DRY_RUN = 1 << 0,
> EXPIRE_REFLOGS_UPDATE_REF = 1 << 1,
>
Michael
--
Michael Haggerty
mhag...@alum.mit.edu
--
L_BROKEN = -4
> +};
> +
> +enum peel_status peel_object(const unsigned char *name, unsigned char *sha1);
> +
> /**
> * Resolve refname in the nested "gitlink" repository that is located
> * at path. If the resolution is successful, return 0 and set sha1 to
>
Michael
--
Michael Haggerty
mhag...@alum.mit.edu
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
cate a new string, copy refname to
it, append a '/', then free the string again when it's done.
Alternatively, it could accept its refname argument in a strbuf and
temporarily append the '/'.
But neither one of these alternatives is so elegant, so maybe it's OK if
e seven because I squashed the first two together).
Michael
[1] http://article.gmane.org/gmane.comp.version-control.git/279286
[2] https://github.com/mhagger/git
--
Michael Haggerty
mhag...@alum.mit.edu
--
To unsubscribe from this list: send the line "unsubscribe git" in
the b
ersion-control.git/279496
--
Michael Haggerty
mhag...@alum.mit.edu
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
On 10/13/2015 08:28 PM, David Turner wrote:
> On Tue, 2015-10-13 at 09:56 +0200, Michael Haggerty wrote:
>> On 10/12/2015 11:51 PM, David Turner wrote:
>>> [...]
>>> +extern struct ref_be refs_be_files;
>>
>> I don't think that refs_be_files is
y_refname_available(const char *newname, struct string_list *extra,
>struct string_list *skip, struct strbuf *err);
>
> +extern int is_branch(const char *refname);
> +
> /*
> * Flags controlling ref_transaction_update(), ref_transaction_create()
y
> around is because the code that will eventually remain in this new
> refs-be-files.c file is so entangled that it would then be very
> difficult to break the split up into small independent patches/chunks.
> [...]
Michael
--
Michael Haggerty
mhag...@alum.mit.edu
--
To unsubscrib
Thanks for cleaning these up, Tobias. I totally forgot to look for
includes that were no longer needed.
Michael
--
Michael Haggerty
mhag...@alum.mit.edu
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
fn fn,
> void *cb_data)
> -{
> - return for_each_ref_in_submodule(submodule, "refs/remotes/", fn,
> cb_data);
> -}
> -
> int for_each_replace_ref(each_ref_fn fn, void *cb_data)
> {
> return do_for_each_ref(&ref_cache, git_replace_ref_base, fn,
Nit: y
efs-be-files.c
refs/refs-be-lmdb.c <- still to come
What would you think of that?
Michael
[1] We've discussed this idea earlier, using the tentative names
refs-shared.h or refs-common.h.
--
Michael Haggerty
mhag...@alum.mit.edu
--
To unsubscribe from this list: send the line &qu
d-off-by: Junio C Hamano
> Signed-off-by: Michael Haggerty
> ---
> refs-be-files.c | 49 -
> refs.c | 38 ++
> refs.h | 15 +++
> 3 files changed, 61 insertions(+),
version
shortly as v6.
Otherwise it all looks good. I've checked everything rather carefully
and didn't find any problems.
Thanks for your patience!
Michael
[1] https://github.com/mhagger/git
--
Michael Haggerty
mhag...@alum.mit.edu
--
To unsubscribe from this list: send the line &
From: Ronnie Sahlberg
Signed-off-by: Ronnie Sahlberg
Signed-off-by: David Turner
Signed-off-by: Junio C Hamano
Signed-off-by: Michael Haggerty
---
refs/files-backend.c | 5 -
refs/refs.c | 5 +
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/refs/files
From: Ronnie Sahlberg
Signed-off-by: Ronnie Sahlberg
Signed-off-by: Junio C Hamano
Signed-off-by: Michael Haggerty
---
refs/files-backend.c | 15 ---
refs/refs.c | 15 +++
2 files changed, 15 insertions(+), 15 deletions(-)
diff --git a/refs/files-backend.c b
David Turner
Signed-off-by: Junio C Hamano
Signed-off-by: Michael Haggerty
---
refs/files-backend.c | 33 -
refs/refs-internal.h | 15 +++
refs/refs.c | 24
3 files changed, 39 insertions(+), 33 deletions(-)
diff --
From: Ronnie Sahlberg
This function can be shared across all refs backends so move it
to the common code.
Signed-off-by: Ronnie Sahlberg
Signed-off-by: David Turner
Signed-off-by: Junio C Hamano
Signed-off-by: Michael Haggerty
---
refs/files-backend.c | 7 ---
refs/refs.c | 7
This is a proposed revision of David Turner's refs-backend-pre-vtable
v5 [1]. It incorporates all of the changes I suggested when reviewing
that series, plus it moves the refs-related code to a subdirectory and
creates a new header file refs/refs-internal.h for declarations meant
to be used within
From: Ronnie Sahlberg
Signed-off-by: Ronnie Sahlberg
Signed-off-by: Junio C Hamano
Signed-off-by: Michael Haggerty
---
refs/files-backend.c | 9 -
refs/refs.c | 9 +
2 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/refs/files-backend.c b/refs/files
From: David Turner
is_branch was already non-static, but this patch declares it in the
header.
Signed-off-by: Ronnie Sahlberg
Signed-off-by: David Turner
Signed-off-by: Junio C Hamano
Signed-off-by: Michael Haggerty
---
refs.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/refs.h b
From: Ronnie Sahlberg
This function does not contain any backend specific code so move it to
the common code.
Signed-off-by: Ronnie Sahlberg
Signed-off-by: David Turner
Signed-off-by: Junio C Hamano
Signed-off-by: Michael Haggerty
---
refs/files-backend.c | 109
701 - 800 of 3206 matches
Mail list logo