On 12/10/2014 6:47 PM, Michael Haggerty wrote:
> set have_old unconditionally and set old_sha1 to null_sha1.
Reviewed-by: Brad King
-Brad
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo
On 12/10/2014 6:47 PM, Michael Haggerty wrote:
> Two of the tests fail because
>
> verify refs/heads/foo
>
> with no argument (not even zeros) actually *deletes* refs/heads/foo.
> This problem will be fixed in the next commit.
Reviewed-by: Brad King
-Brad
--
To unsubscr
On 04/02/2014 04:09 AM, Michael Haggerty wrote:
> From: Aman Gupta
[snip]
> @@ -147,6 +147,7 @@ static void parse_cmd_create(const char *next)
> struct ref_update *update;
>
> update = update_alloc();
> + update->have_old = 1;
Looks good.
> +test_expect_success 'stdin -z create
On 03/24/2014 01:56 PM, Michael Haggerty wrote:
> +void ref_transaction_update(struct ref_transaction *transaction,
> + const char *refname,
> + unsigned char *new_sha1, unsigned char *old_sha1,
> + int flags, int have_old);
[s
On 03/24/2014 01:56 PM, Michael Haggerty wrote:
> Changes relative to v1:
>
> * Rename the functions associated with ref_transactions to be more
> reminiscent of database transactions:
>
> * create_ref_transaction() -> ref_transaction_begin()
> * free_ref_transaction() -> ref_transaction_ro
On 03/24/2014 01:56 PM, Michael Haggerty wrote:
> Signed-off-by: Michael Haggerty
>
> t1400: Add a test of "update" with too few arguments
>
> Signed-off-by: Michael Haggerty
This looks like a stray squash message.
-Brad
--
To unsubscribe from this list: send the line "unsubscribe git" in
th
On 03/24/2014 01:56 PM, Michael Haggerty wrote:
> +/*
> + * For backwards compatibility, accept an empty string for create's
> + * in binary mode to be equivalent to specifying zeros.
> + */
> +#define PARSE_SHA1_ALLOW_EMPTY 0x02
The comment should say "update's", not "create's".
-Brad
--
To un
On Tue, Mar 11, 2014 at 4:06 PM, Junio C Hamano wrote:
> I may be misremembering things, but your first sentence quoted above
> was exactly my reaction while reviewing the original change, and I
> might have even raised that as an issue myself, saying something
> like "consistency across values is
On 03/10/2014 05:38 PM, Michael Haggerty wrote:
> It seems to me that "-z" input will nearly always be machine-generated,
> so there is not much reason to accept the empty string as shorthand for
> zeros. So I think that my version of the rules, being simpler to
> explain, is a slight improvement.
Hi Michael,
This is excellent work.
I haven't reviewed every line of logic in detail but the changes
look correct at a high level. The only exception is that the empty
is supposed to be accepted and treated as zero even in
"--stdin -z" mode. See my response to that individual change.
On 03/10
On 03/10/2014 08:46 AM, Michael Haggerty wrote:
> Instead of, for example,
>
> fatal: update refs/heads/master missing [] NUL
>
> emit
>
> fatal: update refs/heads/master missing
[snip]
> - die("update %s missing [] NUL", update->ref_name);
> + die("update %s mis
On 03/10/2014 01:08 PM, Brad King wrote:
>> -die("update %s missing [] NUL", update->ref_name);
>> +die("update %s missing ", update->ref_name);
>
> The reason for the original wording is that the is indeed
> optional.
On 03/10/2014 08:46 AM, Michael Haggerty wrote:
> This test is trying to test a few ways to delete references using "git
> update-ref -z --stdin". The third line passed in is
>
> update SP /refs/heads/c NUL NUL NUL
>
> , which is not a correct way to delete a reference according to the
> do
merge-base --all $ours $theirs) &&
git merge-recursive $bases -- $ours $theirs &&
tree=$(git write-tree)
Nowadays, that still works and the exit status is the same, but
merge-recursive produces a diagnostic if "our" side renamed a file:
error: addinfo_ca
Move lstat ENOENT handling from refresh_index to refresh_cache_ent and
activate it with a new CE_MATCH_IGNORE_MISSING option. This will allow
other call paths into refresh_cache_ent to use the feature.
Signed-off-by: Brad King
---
cache.h | 2 ++
read-cache.c | 8 +---
2 files changed
tree - ours has rename'
case in t3030-merge-recursive.
Suggested-by: Elijah Newren
Signed-off-by: Brad King
---
merge-recursive.c | 3 ++-
t/t3030-merge-recursive.sh | 2 +-
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/merge-recursive.c b/merge-recursive.c
ind
Convert the make_cache_entry boolean 'refresh' argument to a more
general 'refresh_options' argument. Pass the value through to the
underlying refresh_cache_ent call. Add option CE_MATCH_REFRESH to
enable stat refresh. Update call sites to use the new signature.
Sign
option.
* Rather than adding a new argument to make_cache_entry, the existing
'refresh' boolean argument has been generalized to a set of options.
This required the addition of a new CE_MATCH_REFRESH option to
enable refresh with no other options.
Thanks,
-Brad
Brad King (4):
t
Add an 'int refresh_flags' argument to make_cache_entry to tell the
refresh step about caller preferences. Teach it to honor the
REFRESH_IGNORE_MISSING flag to skip refreshing stat information when a
file is missing from the work tree on disk.
Signed-off-by: Brad King
---
built
to make_cache_entry.
This one is to request certain refresh behavior instead of just
to get an error value back.
* Patch 3 uses the new make_cache_entry feature in patch 2
to fix the test case. This approach is based on suggestions
from Elijah and Junio.
Thanks,
-Brad
Brad King (3
merge-base --all $ours $theirs) &&
git merge-recursive $bases -- $ours $theirs &&
tree=$(git write-tree)
Nowadays, that still works and the exit status is the same, but
merge-recursive produces a diagnostic if "our" side renamed a file:
error: addinfo_ca
tree - ours has rename'
case in t3030-merge-recursive.
Suggested-by: Elijah Newren
Signed-off-by: Brad King
---
merge-recursive.c | 3 ++-
t/t3030-merge-recursive.sh | 2 +-
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/merge-recursive.c b/merge-recursive.c
ind
On Fri, Jan 24, 2014 at 2:50 PM, Junio C Hamano wrote:
> It somehow feels wrong to force callers of make_cache_entry() to be
> so intimate with the implementation details of refresh_cache_ent()
[snip]
> option bit CE_MATCH_MISSING_OK that asks it to treat a path that is
> missing from the working
On 01/24/2014 01:42 PM, Elijah Newren wrote:
> While this change does work for the particular new testcase you provided,
> there's a more complex case where merge-recursive is failing
I'm not surprised. The change felt much like covering a symptom.
> it's just that we want the stat information r
On 01/24/2014 11:51 AM, Jonathan Nieder wrote:
> a quick summary of the symptoms and when it came up?
You're suggested commit message correctly explains it:
> Do you mean something like the following?
>
> Sometimes when working with a large repository it can be useful to
> try out a
ng file on disk.
Signed-off-by: Brad King
---
builtin/apply.c| 2 +-
builtin/checkout.c | 2 +-
builtin/reset.c| 2 +-
cache.h| 2 +-
merge-recursive.c | 3 ++-
read-cache.c | 12 +++-
resolve-undo.c | 2 +-
7 files changed, 14 insertions(+), 11 deletion
-recursive.
Signed-off-by: Brad King
---
merge-recursive.c | 21 +
t/t3030-merge-recursive.sh | 2 +-
2 files changed, 14 insertions(+), 9 deletions(-)
diff --git a/merge-recursive.c b/merge-recursive.c
index 4394c44..6a2b962 100644
--- a/merge-recursive.c
+++ b/merge-r
m $gmane/240853.
* Patch 2 extends the make_cache_entry signature to return lstat errno.
* Patch 3 uses this information to silence the add_cacheinfo diagnostic
-Brad
Brad King (3):
t3030-merge-recursive: Test known breakage with empty work tree
read-cache.c: Thread lstat error through m
rge appears to succeed, but it
causes this test case to fail.
Signed-off-by: Brad King
---
t/t3030-merge-recursive.sh | 47 ++
1 file changed, 47 insertions(+)
diff --git a/t/t3030-merge-recursive.sh b/t/t3030-merge-recursive.sh
index 2f96100..b6d3ed0
rge appears to succeed, but it
causes this test case to fail.
Signed-off-by: Brad King
---
t/t3030-merge-recursive.sh | 47 ++
1 file changed, 47 insertions(+)
diff --git a/t/t3030-merge-recursive.sh b/t/t3030-merge-recursive.sh
index 2f96100..b6d3ed0
Extend t/t1400-update-ref.sh to cover cases using the --stdin option.
Signed-off-by: Brad King
---
On 09/10/2013 06:46 PM, Eric Sunshine wrote:
> Thus printf provides all the functionality you require, and
> print_nul() function can be dropped. So:
>
> printf '%s\0'
On 09/10/2013 06:51 PM, Eric Sunshine wrote:
> On Mon, Sep 9, 2013 at 8:57 PM, Brad King wrote:
>> +Use 40 "0" or the empty string to specify a zero value, except that
>
> Did you want an 's' after the "0"?
The same description without 's
On 09/10/2013 12:30 PM, Junio C Hamano wrote:
> Thanks. I am not sure if I should rewind and rebuild the series
> with these patches, though. This is a new feature and does not have
> to be merged to 'maint', so rebasing is perfectly fine, but it is
> not strictly necessary, either.
I just thoug
The function resets refs rather than doing arbitrary updates.
Rename it to allow a future general-purpose update_refs function
to be added.
Signed-off-by: Brad King
---
builtin/reset.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/builtin/reset.c b/builtin/reset.c
Extend t/t1400-update-ref.sh to cover cases using the --stdin option.
Signed-off-by: Brad King
---
t/t1400-update-ref.sh | 639 ++
1 file changed, 639 insertions(+)
diff --git a/t/t1400-update-ref.sh b/t/t1400-update-ref.sh
index e415ee0..a510500
Expose lock_ref_sha1_basic's type_p argument to callers of
lock_any_ref_for_update. Update all call sites to ignore it by passing
NULL for now.
Signed-off-by: Brad King
---
branch.c | 2 +-
builtin/commit.c | 2 +-
builtin/fetch.c| 3 ++-
builtin/receive-pack.
Generalize repack_without_ref as repack_without_refs to support a list
of refs and implement the former in terms of the latter.
Signed-off-by: Brad King
---
refs.c | 33 -
1 file changed, 24 insertions(+), 9 deletions(-)
diff --git a/refs.c b/refs.c
index
Factor loose ref deletion into helper function delete_ref_loose to allow
later use elsewhere.
Signed-off-by: Brad King
---
refs.c | 27 +--
1 file changed, 17 insertions(+), 10 deletions(-)
diff --git a/refs.c b/refs.c
index f7d3c09..b14f59b 100644
--- a/refs.c
+++ b
is not
necessary to keep across invocations.
Signed-off-by: Brad King
---
refs.c | 30 --
1 file changed, 24 insertions(+), 6 deletions(-)
diff --git a/refs.c b/refs.c
index 5832a8f..f7d3c09 100644
--- a/refs.c
+++ b/refs.c
@@ -3170,12 +3170,13 @@ int for_each_re
original branch by a concurrent process, or risk of
a concurrent process creating the new branch first.
Signed-off-by: Brad King
---
refs.c | 100 +
refs.h | 20 +
2 files changed, 120 insertions(+)
diff --git a/refs.c b/
Add a --stdin signature to read update instructions from standard input
and apply multiple ref updates together. Use an input format that
supports any update that could be specified via the command-line,
including object names like "branch:path with space".
Signed-off-by:
(Replace deprecated
OPT_BOOLEAN by OPT_BOOL, 2013-08-03) was resolved by integrating
both changes. The new options added in patch 7 now use OPT_BOOL.
-Brad
Brad King (8):
reset: rename update_refs to reset_refs
refs: report ref type from lock_any_ref_for_update
refs: factor update_ref
series:
* Patches 1-6 are identical to v4 so are not re-sent here.
* Patch 7 and 8 now implement and test the input format proposed and
discussed at $gmane/233990.
-Brad
Brad King (2):
update-ref: support multiple simultaneous updates
update-ref: add test cases covering --stdin signature
Add a --stdin signature to read update instructions from standard input
and apply multiple ref updates together. Use an input format that
supports any update that could be specified via the command-line,
including object names like "branch:path with space".
Signed-off-by:
Extend t/t1400-update-ref.sh to cover cases using the --stdin option.
Signed-off-by: Brad King
---
t/t1400-update-ref.sh | 639 ++
1 file changed, 639 insertions(+)
diff --git a/t/t1400-update-ref.sh b/t/t1400-update-ref.sh
index e415ee0..a510500
On 9/5/2013 5:23 PM, Junio C Hamano wrote:
> Brad King writes:
>> create SP NUL NUL
>> update SP NUL NUL [] NUL
>
> That SP in '-z' format looks strange. Was there a reason why NUL
> was inappropriate?
The precedent I saw in the -z survey I poste
On 09/04/2013 05:27 PM, Junio C Hamano wrote:
> I am not saying the above is the best format, but the point is that
> the mode of the operation defines the structure
Great, thanks for your comments. Based on that I've prototyped a
new format. Rather than jumping straight to the patch, here is my
On 09/04/2013 02:23 PM, Junio C Hamano wrote:
> "whitespace-separated" implies that we may allow fields separated with not a
> single SP, but with double SPs or even HTs between them. I personally do not
> think we should be so loose
Okay, I will look at making it more strict. See proposed form
On 09/04/2013 03:17 PM, Junio C Hamano wrote:
> Brad King writes:
>> +static void update_refs_stdin_read_n()
>> +static void update_refs_stdin_read_z()
>
> These need to be defined with explicit (void) argument list.
Oops, fixed.
Thanks,
-Brad
--
To unsubscribe from thi
Factor loose ref deletion into helper function delete_ref_loose to allow
later use elsewhere.
Signed-off-by: Brad King
---
refs.c | 27 +--
1 file changed, 17 insertions(+), 10 deletions(-)
diff --git a/refs.c b/refs.c
index 4347826..ab9d22e 100644
--- a/refs.c
+++ b
Add a --stdin signature to read update instructions from standard input
and apply multiple ref updates together. Use an input format that
supports any update that could be specified via the command-line,
including object names like "branch:path with space".
Signed-off-by:
The function resets refs rather than doing arbitrary updates.
Rename it to allow a future general-purpose update_refs function
to be added.
Signed-off-by: Brad King
---
builtin/reset.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/builtin/reset.c b/builtin/reset.c
Expose lock_ref_sha1_basic's type_p argument to callers of
lock_any_ref_for_update. Update all call sites to ignore it by passing
NULL for now.
Signed-off-by: Brad King
---
branch.c | 2 +-
builtin/commit.c | 2 +-
builtin/fetch.c| 3 ++-
builtin/receive-pack.
in $gmane/233521 and made in v3 and kept in v4.
Thanks,
-Brad
Brad King (8):
reset: rename update_refs to reset_refs
refs: report ref type from lock_any_ref_for_update
refs: factor update_ref steps into helpers
refs: factor delete_ref loose ref step into a helper
refs: add function to rep
original branch by a concurrent process, or risk of
a concurrent process creating the new branch first.
Signed-off-by: Brad King
---
refs.c | 100 +
refs.h | 20 +
2 files changed, 120 insertions(+)
diff --git a/refs.c b/
Extend t/t1400-update-ref.sh to cover cases using the --stdin option.
Signed-off-by: Brad King
---
t/t1400-update-ref.sh | 445 ++
1 file changed, 445 insertions(+)
diff --git a/t/t1400-update-ref.sh b/t/t1400-update-ref.sh
index e415ee0..e8ba0d2
Generalize repack_without_ref as repack_without_refs to support a list
of refs and implement the former in terms of the latter.
Signed-off-by: Brad King
---
refs.c | 33 -
1 file changed, 24 insertions(+), 9 deletions(-)
diff --git a/refs.c b/refs.c
index
is not
necessary to keep across invocations.
Signed-off-by: Brad King
---
refs.c | 30 --
1 file changed, 24 insertions(+), 6 deletions(-)
diff --git a/refs.c b/refs.c
index c69fd68..4347826 100644
--- a/refs.c
+++ b/refs.c
@@ -3170,12 +3170,13 @@ int for_each_re
On 09/03/2013 04:16 AM, Eric Sunshine wrote:
> When you decomposed the monolithic test from v1 into individual tests,
> you dropped a couple cases ("fatal: unknown option'" and "fatal:
> unterminated single-quote"). Was this intentional?
Yes. The v3 patch 7 changed the set of error messages to be
On 09/03/2013 12:43 AM, Michael Haggerty wrote:
> Hmmm, I see that you changed the signature of update_refs() to take an
> array of pointers. My suggestion was unclear, but I didn't mean that
> the function signature had to be changed.
[snip]
> However, your approach is also fine.
Okay. Thanks f
On 09/02/2013 01:48 PM, Brad King wrote:
> + /* Parse the argument: */
> + strbuf_reset(arg);
> + if (*next == '"') {
> + if (unquote_c_style(arg, next, &next))
> + die("badly quoted argument:
ref name
* In patch 7, another new input format is proposed. It now uses
quoting based on unquote_c_style.
* In patch 8, more new test cases have been added. Failure cases
are now covered in separate steps to simplify diagnosis.
-Brad
Brad King (8):
reset: rename update_refs to reset_ref
Add a --stdin signature to read update instructions from standard input
and apply multiple ref updates together. Use an input format that
supports any update that could be specified via the command-line,
including object names like "branch:path with space".
Signed-off-by:
Expose lock_ref_sha1_basic's type_p argument to callers of
lock_any_ref_for_update. Update all call sites to ignore it by passing
NULL for now.
Signed-off-by: Brad King
---
branch.c |2 +-
builtin/commit.c |2 +-
builtin/fetch.c|3 ++-
builtin/re
is not
necessary to keep across invocations.
Signed-off-by: Brad King
---
refs.c | 30 --
1 file changed, 24 insertions(+), 6 deletions(-)
diff --git a/refs.c b/refs.c
index c69fd68..4347826 100644
--- a/refs.c
+++ b/refs.c
@@ -3170,12 +3170,13 @@ int for_each_re
Generalize repack_without_ref as repack_without_refs to support a list
of refs and implement the former in terms of the latter.
Signed-off-by: Brad King
---
refs.c | 29 ++---
1 file changed, 22 insertions(+), 7 deletions(-)
diff --git a/refs.c b/refs.c
index ab9d22e
original branch by a concurrent process, or risk of
a concurrent process creating the new branch first.
Signed-off-by: Brad King
---
refs.c | 100
refs.h | 20 +
2 files changed, 120 insertions(+)
diff --git a/refs.c b/
The function resets refs rather than doing arbitrary updates.
Rename it to allow a future general-purpose update_refs function
to be added.
Signed-off-by: Brad King
---
builtin/reset.c |4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/builtin/reset.c b/builtin/reset.c
Extend t/t1400-update-ref.sh to cover cases using the --stdin option.
Signed-off-by: Brad King
---
t/t1400-update-ref.sh | 256 +
1 file changed, 256 insertions(+)
diff --git a/t/t1400-update-ref.sh b/t/t1400-update-ref.sh
index e415ee0..b6d7dfa
Factor loose ref deletion into helper function delete_ref_loose to allow
later use elsewhere.
Signed-off-by: Brad King
---
refs.c | 27 +--
1 file changed, 17 insertions(+), 10 deletions(-)
diff --git a/refs.c b/refs.c
index 4347826..ab9d22e 100644
--- a/refs.c
+++ b
On 08/31/2013 11:41 PM, Eric Sunshine wrote:
>> + rm -f stdin &&
>> + touch stdin &&
>
> Unless the timestamp of 'stdin' has particular significance, modern
> git tests avoid 'touch' in favor of creating the empty file like this
>
> >stdin &&
Fixed.
>> + git update-ref --s
On 08/30/2013 06:51 PM, Junio C Hamano wrote:
> Brad King writes:
>> +With `--stdin`, update-ref reads instructions from standard input and
>> +performs all modifications together. Empty lines are ignored.
>> +Each non-empty line is parsed as whitespace-separated arguments.
On 08/31/2013 02:42 PM, Michael Haggerty wrote:
> On 08/30/2013 08:12 PM, Brad King wrote:
>> +If all s can be locked with matching s
>> +simultaneously all modifications are performed. Otherwise, no
>
> Comma after "simultaneously".
Fixed.
> I agree with
On 08/31/2013 02:19 PM, Michael Haggerty wrote:
> s/themeselves/themselves/
Fixed.
>> +struct ref_update *u1 = (struct ref_update *)(r1);
>> +struct ref_update *u2 = (struct ref_update *)(r2);
>
> If you declare u1 and u2 to be "const struct ref_update *" (i.e., add
> "const"), then you
On 09/01/2013 02:08 AM, Junio C Hamano wrote:
>> Though the refs themeselves cannot be modified together in a single
>
> "themselves".
Fixed.
> I notice that we are using an array of structures and letting qsort
> swap 50~64 bytes of data
Michael suggested this too, so fixed.
> Optionally we c
On 09/01/2013 02:08 AM, Junio C Hamano wrote:
> Brad King writes:
>> static struct ref_lock *lock;
>
> Not the fault of this patch, as the original update_ref() had it
> this way, but it is not necessary to keep the value of this variable
> across invocations. Let'
On 08/31/2013 12:30 PM, Michael Haggerty wrote:
> Given that ret is only returned, you could restore the filename before
> the if statement and replace the ret variable with an immediate return
> statement:
Good idea. Fixed in next revision.
Thanks,
-Brad
--
To unsubscribe from this list: send t
Add a --stdin signature to read update instructions from standard input
and apply multiple ref updates together. Use an input format that
supports any update that could be specified via the command-line,
including object names like 'branch:path with space'.
Signed-off-by:
original branch by a concurrent process, or risk of
a concurrent process creating the new branch first.
Signed-off-by: Brad King
---
refs.c | 121
refs.h | 14
2 files changed, 135 insertions(+)
diff --git a/refs.c b/refs.c
in
Generalize repack_without_ref as repack_without_refs to support a list
of refs and implement the former in terms of the latter.
Signed-off-by: Brad King
---
refs.c | 29 ++---
1 file changed, 22 insertions(+), 7 deletions(-)
diff --git a/refs.c b/refs.c
index 5dd86ee
Expose lock_ref_sha1_basic's type_p argument to callers of
lock_any_ref_for_update. Update all call sites to ignore it by passing
NULL for now.
Signed-off-by: Brad King
---
branch.c |2 +-
builtin/commit.c |2 +-
builtin/fetch.c|3 ++-
builtin/re
Factor the lock and write steps and error handling into helper functions
update_ref_lock and update_ref_write to allow later use elsewhere.
Expose lock_any_ref_for_update's type_p to update_ref_lock callers.
Signed-off-by: Brad King
---
refs.c | 28 +++-
1 file ch
Extend t/t1400-update-ref.sh to cover cases using the --stdin option.
Signed-off-by: Brad King
---
t/t1400-update-ref.sh | 206 +
1 file changed, 206 insertions(+)
diff --git a/t/t1400-update-ref.sh b/t/t1400-update-ref.sh
index e415ee0..9fd03fc
Factor loose ref deletion into helper function delete_ref_loose to allow
later use elsewhere.
Signed-off-by: Brad King
---
refs.c | 22 +++---
1 file changed, 15 insertions(+), 7 deletions(-)
diff --git a/refs.c b/refs.c
index 2e755b4..5dd86ee 100644
--- a/refs.c
+++ b/refs.c
The function resets refs rather than doing arbitrary updates.
Rename it to allow a future general-purpose update_refs function
to be added.
Signed-off-by: Brad King
---
builtin/reset.c |4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/builtin/reset.c b/builtin/reset.c
cases.
-Brad
Brad King (8):
reset: rename update_refs to reset_refs
refs: report ref type from lock_any_ref_for_update
refs: factor update_ref steps into helpers
refs: factor delete_ref loose ref step into a helper
refs: add function to repack without multiple refs
refs: add update_refs
On 08/29/2013 02:20 PM, Brad King wrote:
> I wasn't happy with the asymmetry either but forgot to raise it in
> the cover letter. We need a way to represent "old value not given"
> as different from "old value is_null_sha1".
[snip]
> Another approach i
On 08/29/2013 02:34 PM, Junio C Hamano wrote:
> Brad King writes:
>
>> +const char *c, *s, *oldvalue, *value[2] = {0,0};
>
> This patch has many style issues of the same kind, lack of a SP at
> places where there should be between operators and after comma.
Okay, I ca
On 08/29/2013 02:32 PM, Junio C Hamano wrote:
> But it may not be a bad idea to keep the callers dumb and have this
> function always sort, dedup, *and* fail inconsistent request.
I agree. I was just starting to write the comment for update_refs
and it basically would have said "always use ref_up
On 08/29/2013 02:07 PM, Junio C Hamano wrote:
> I didn't mean to force the caller of new "update-ref --stdin"; the
> new code you wrote for it is what feeds the input to update_refs()
> function, and that is one place you can make sure you do not lock
> yourself out.
>
> Besides, if you get two up
On 08/29/2013 01:39 PM, Junio C Hamano wrote:
> Brad King writes:
>> +for (i=0; i < n; ++i) {
>
> Style:
>
> for (i = 0; i < n; i++) {
Fixed.
> Is it asking for AB-BA deadlock? If so, is the caller responsible
> for avoiding it?
Since we don'
On 08/29/2013 01:34 PM, Junio C Hamano wrote:
> Brad King writes:
>> +if(i == n)
>
> Style:
> if (i == n)
Fixed in next revision.
-Brad
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
On 08/29/2013 01:28 PM, Junio C Hamano wrote:
> Brad King writes:
>> -if (!(flag & REF_ISPACKED) || flag & REF_ISSYMREF) {
>> +if (!(type & REF_ISPACKED) || type & REF_ISSYMREF) {
>
> Hits from "git grep REF_IS" tell me that all users of
On 08/29/2013 01:22 PM, Junio C Hamano wrote:
> If you are passing an NULL as a new parameter, please spell it
> "NULL", not "0".
Fixed at all updated call sites.
-Brad
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More maj
On 08/29/2013 01:17 PM, Junio C Hamano wrote:
> Brad King writes:
>
>> Get it out of the way for a future refs.h function.
>
> Readers do not know if "update_refs()" is a good name for that
> future refs.h function at this point, so "evict squatter" is
On 08/29/2013 12:21 PM, Junio C Hamano wrote:
> Brad King writes:
>> needs to reject duplicate ref names from the stdin lines before
>> trying to lock the ref twice to avoid this message.
>
> How about trying not to feed duplicates?
Sure, perhaps it is simplest to push the
On 08/29/2013 11:32 AM, Martin Fick wrote:
> On Thursday, August 29, 2013 08:11:48 am Brad King wrote:
>>
>>fatal: Unable to create 'lock': File exists.
>>If no other git process is currently running, this
>> probably means a git process crashed in
oach, interface, and implementation.
Thanks,
-Brad
Brad King (7):
reset: rename update_refs to reset_refs
refs: report ref type from lock_any_ref_for_update
refs: factor update_ref steps into helpers
refs: factor delete_ref loose ref step into a helper
refs: add function to repack without multi
Factor the lock and write steps and error handling into helper functions
update_ref_lock and update_ref_write to allow later use elsewhere.
Expose lock_any_ref_for_update's type_p to update_ref_lock callers.
Signed-off-by: Brad King
---
refs.c | 28 +++-
1 file ch
Expose lock_ref_sha1_basic's type_p argument to callers of
lock_any_ref_for_update. Update all call sites to ignore it; we will
use it later.
Signed-off-by: Brad King
---
branch.c |2 +-
builtin/commit.c |2 +-
builtin/fetch.c|2 +-
builtin/re
1 - 100 of 109 matches
Mail list logo