().
Reviewed-by: Jonathan Nieder jrnie...@gmail.com
--
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
Ronnie Sahlberg wrote:
--- a/fast-import.c
+++ b/fast-import.c
@@ -1679,39 +1679,45 @@ found_entry:
static int update_branch(struct branch *b)
{
static const char *msg = fast-import;
- struct ref_lock *lock;
+ struct ref_transaction *transaction;
unsigned char
Ronnie Sahlberg wrote:
--- a/sequencer.c
+++ b/sequencer.c
@@ -272,23 +272,31 @@ static int fast_forward_to(const unsigned char *to,
const unsigned char *from,
[...]
+ error(_(HEAD: Could not fast-forward: %s\n), err.buf);
As with 'git commit', since err.buf already mentions
);
errno is not guaranteed valid here. The usual
die(%s, err.buf);
should do the trick.
With the changes mentioned above (commit message typofix, die()
message),
Reviewed-by: Jonathan Nieder jrnie...@gmail.com
Thanks.
--
To unsubscribe from this list: send the line
Ronnie Sahlberg wrote:
Change the update_ref helper function to use a ref transaction internally.
Signed-off-by: Ronnie Sahlberg sahlb...@google.com
---
refs.c | 25 +
1 file changed, 21 insertions(+), 4 deletions(-)
diff --git a/refs.c b/refs.c
index
Ronnie Sahlberg wrote:
Change ref_transaction_commit so that it does not free the transaction.
Instead require that a caller will end a transaction by either calling
ref_transaction_rollback or ref_transaction_free.
Can I always use ref_transaction_rollback instead of ref_transaction_free?
It
Nguyễn Thái Ngọc Duy wrote:
--- a/config.c
+++ b/config.c
@@ -826,8 +826,12 @@ static int git_default_core_config(const char *var,
const char *value)
if (!strcmp(var, core.commentchar)) {
const char *comment;
int ret = git_config_string(comment, var,
Nguyễn Thái Ngọc Duy wrote:
core.commentChar starts with '#' as in default but if it's already in
the prepared message, find another one among a small subset. This
should stop surprises because git strips some lines unexpectedly.
Probably worth mentioning this only kicks in if someone
(cc-ing peff, who may remember this STORE_REF_ERROR_DF_CONFLICT case
from long ago)
Ronnie Sahlberg wrote:
In s_update_ref there are two calls that when they fail we return an error
based on the errno value. In particular we want to return a specific error
if ENOTDIR happened. Both these
Ronnie Sahlberg wrote:
This patch series can also be found at
https://github.com/rsahlberg/git/tree/ref-transactions
I think the rerolls are coming too fast. I've been using your
repository on github to check if I should not send any particular
comment because you've already fixed it, so the
(+cc: peff for STORE_REF_ERROR_DF_CONFLICT expertise)
Ronnie Sahlberg wrote:
--- a/builtin/fetch.c
+++ b/builtin/fetch.c
@@ -375,7 +375,7 @@ static int s_update_ref(const char *action,
[...]
+ transaction = ref_transaction_begin();
+ if (!transaction ||
+
Ronnie Sahlberg wrote:
Change store_updated_refs to use a single ref transaction for all refs that
are updated during the fetch. This makes the fetch more atomic when update
failures occur.
Fun.
[...]
--- a/builtin/fetch.c
+++ b/builtin/fetch.c
[...]
@@ -373,27 +374,13 @@ static int
Ronnie Sahlberg wrote:
--- a/builtin/fetch.c
+++ b/builtin/fetch.c
[...]
@@ -384,15 +384,16 @@ static int s_update_ref(const char *action,
snprintf(msg, sizeof(msg), %s: %s, rla, action);
errno = 0;
- lock = lock_any_ref_for_update(ref-name,
-
Hi,
Thomas Braun wrote:
pushing over the dump git protocol with a windows git client.
I've never heard of the dump git protocol. Do you mean the git
protocol that's used with git:// URLs?
[...]
Alternative approaches considered but deemed too invasive:
- Rewrite read/write wrappers in
Hi,
Elia Pinto wrote:
These patch series convert test -a/-o to and ||.
Should this come with a new check in t/check-non-portable-shell.pl so
we don't regress in the future?
Elia Pinto (19):
[...]
check_bindir|2 +-
contrib/examples/git-clone.sh |2 +-
Ronnie Sahlberg wrote:
Wrap all the ref updates inside a transaction to make the update atomic.
Interesting.
[...]
--- a/builtin/receive-pack.c
+++ b/builtin/receive-pack.c
@@ -46,6 +46,8 @@ static void *head_name_to_free;
static int sent_capabilities;
static int shallow_update;
Ronnie Sahlberg wrote:
[Subject: fast-import.c: use a ref transaction when dumping tags]
This seems like an odd thing to do: either it would make sense to have
a single transaction for all imported refs so all fail or succeed
together, or there would be separate transactions for each ref.
That
Ramsay Jones wrote:
--- a/t/t-basic.sh
+++ b/t/t-basic.sh
@@ -296,8 +296,9 @@ test_expect_success 'test --verbose-only' '
'
test_expect_success 'GIT_SKIP_TESTS'
- GIT_SKIP_TESTS='git.2' \
- run_sub_test_lib_test git-skip-tests-basic \
+
Hi,
Ramsay Jones wrote:
On 20/05/14 22:40, Jonathan Nieder wrote:
What should happen if I have set GIT_SKIP_TESTS explicitly to run
only some of the tests in t-basic?
A quick test (with the above patch applied) shows that
it works as I would expect:
$ GIT_SKIP_TESTS=t.1[2-6
Ronnie Sahlberg wrote:
This changes the locking slightly for walker_fetch. Previously the code would
lock all refs before writing them but now we do not lock the refs until the
commit stage. There is thus a very short window where changes could be done
locally during the fetch which would be
Ronnie Sahlberg wrote:
No external users call write_ref_sha1 any more so lets declare it static.
Yay!
[...]
+++ b/refs.c
@@ -251,6 +251,8 @@ struct ref_entry {
[...]
static void read_loose_refs(const char *dirname, struct ref_dir *dir);
+static int write_ref_sha1(struct ref_lock *lock,
+
Ronnie Sahlberg wrote:
No external callers reference lock_ref_sha1 any more so lets declare it
static.
Signed-off-by: Ronnie Sahlberg sahlb...@google.com
---
refs.c | 2 +-
refs.h | 3 ---
2 files changed, 1 insertion(+), 4 deletions(-)
Reviewed-by: Jonathan Nieder jrnie...@gmail.com
Ronnie Sahlberg wrote:
--- a/refs.c
+++ b/refs.c
@@ -3308,6 +3308,12 @@ struct ref_update {
const char refname[FLEX_ARRAY];
};
+enum ref_transaction_status {
+ REF_TRANSACTION_OPEN = 0,
+ REF_TRANSACTION_CLOSED = 1,
+ REF_TRANSACTION_ERROR = 2,
What is the
Ronnie Sahlberg wrote:
Signed-off-by: Ronnie Sahlberg sahlb...@google.com
---
refs.c | 30 ++
1 file changed, 6 insertions(+), 24 deletions(-)
Reviewed-by: Jonathan Nieder jrnie...@gmail.com
--
To unsubscribe from this list: send the line unsubscribe git
Ronnie Sahlberg wrote:
+++ b/refs.c
[...]
@@ -3518,14 +3499,16 @@ int ref_transaction_commit(struct ref_transaction
*transaction,
struct ref_update *update = updates[i];
if (!is_null_sha1(update-new_sha1)) {
- ret = update_ref_write(msg,
many commits. Luckily this one is
only used in make_cover_letter to create a cover letter describing the
single branch on the command line, making it is a small, one-time
leak.
Less noise from static and dynamic analysis tools is still worthwhile,
so for what it's worth,
Reviewed-by: Jonathan
Hi,
meanlo...@gmail.com wrote:
2. commit test.txt to master:
line1
line1
3. branch and checkout branch1
4. make and commit the following change to branch1:
#line1
#line2
5. checkout master
6. make and commit the following change to master:
line1
#line2
7. merge branch1, git sees a
The fall-back rules used when compilers don't support the -MMD switch
to generate makefile rules based on #includes have been out of date
since v1.7.12.1~22^2~8 (move git_version_string into version.c,
2012-06-02).
Checked with 'make CHECK_HEADER_DEPENDENCIES=yes'.
Signed-off-by: Jonathan Nieder
is introduced, and in the
meantime this is simpler and does not change behavior.
Reviewed-by: Jonathan Nieder jrnie...@gmail.com
Thanks.
--
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
be
else
return o-gently ? -1 : reject_merge(current, o);
and then all calls could be replaced in a followup patch.
Sensible?
Thanks,
Jonathan Nieder (2):
unpack-trees: use 'cuddled' style for if-else cascade
checkout -m: attempt merge when deletion
recognizable for the end user.
Simplify by just using 'current'.
Noticed by coverity, Id:290002
Signed-off-by: Stefan Beller stefanbel...@gmail.com
Improved-by: Junio C Hamano gits...@pobox.com
Signed-off-by: Jonathan Nieder jrnie...@gmail.com
---
unpack-trees.c | 12 ++--
1 file changed, 2
empty) lines, without any loss of readability.
Signed-off-by: Jonathan Nieder jrnie...@gmail.com
---
unpack-trees.c | 12
1 file changed, 4 insertions(+), 8 deletions(-)
diff --git a/unpack-trees.c b/unpack-trees.c
index f4a9aa9..187b15b 100644
--- a/unpack-trees.c
+++ b/unpack
at it, inline the o-gently check
into reject_merge to prevent future call sites from making the same
mistake.
Noticed by code inspection. The motivating case hasn't been tested.
Signed-off-by: Jonathan Nieder jrnie...@gmail.com
---
This is the most iffy of the three patches, mostly because I was too
lazy
Bernhard Reiter wrote:
Use libcurl's high-level API functions to implement git-imap-send
instead of the previous low-level OpenSSL-based functions.
Wow! This sounds lovely. Thanks for working on this.
[...]
Since version 7.30.0, libcurl's API has been able to communicate with
IMAP
Hi Markus,
export NO_APPLE_COMMON_CRYPTO=yes
make configure
CFLAGS=-O2 ./configure --without-tcltk --prefix=/usr/global
make all
compiles fine on 10.4.10. Would a configure patch checking for the
existence of CommonHMAC.h and, if not found, defining this variable, be
acceptable?
Yes,
Hi,
Robert Dailey wrote:
The documentation wasn't 100% clear on this, but I'm assuming by
remote origin, it says that the relative URL is relative to the
actual remote *named* origin (and it is not using origin as just a
general terminology).
Thanks for reporting. The remote used is the
Hi,
Ronnie Sahlberg wrote:
On Wed, Aug 20, 2014 at 7:52 AM, Michael Haggerty mhag...@alum.mit.edu
wrote:
I'm a little worried that abandoning *all* refname checks could open us
up to somehow trying to delete a reference with a name like
../../../../etc/passwd. Either such names have to be
Hi,
Ronnie Sahlberg wrote:
List, please see here an overview and ordering of the ref transaction
patch series.
Thanks much for this.
[...]
rs/ref-transaction-0
[...]
Has been merged into next.
This is even part of master now, so if people have review comments
then they can make them most
, in particular preparing for a moment
when $(LIB_H), which is part of $(LOCALIZED_C), can be computed on the
fly.
We still need a dependency on GENERATED_H, to force those files to be
built when regenerating git.pot.
Signed-off-by: Jonathan Nieder jrnie...@gmail.com
---
Makefile | 2 +-
1 file
Hi,
Bertram Scharpf wrote:
today I wrote a port-merge hook. Then I just detected that it only gets
executed when the merge is immediately successful. In case there is a
conflict, I have to finish the merge using the command git commit.
This will not call the post-merge hook.
I think the
Hi,
Michael Haggerty wrote[1]:
Jonathan Nieder wrote:
The check-ref-format documentation is pretty unclear, but the
intent is that it would be used like
git check-ref-format heads/master
(see the surviving examples in contrib/examples/). That way, it can
enforce the rule (from git
Junio C Hamano wrote:
implication of which is that the 'at least one slash'
rule was to expect things are 'refs/anything' so there will be at
least one. Even back then, that anything alone had at least one
slash (e.g. heads/master), but the intention was *never* that we
would
Junio C Hamano wrote:
Michael Haggerty wrote[1]:
Jonathan Nieder wrote:
The check-ref-format documentation is pretty unclear, but the
intent is that it would be used like
git check-ref-format heads/master
(see the surviving examples in contrib/examples/). That way, it can
enforce
Ronnie Sahlberg wrote:
On Fri, Aug 22, 2014 at 10:46 PM, Jeff King p...@peff.net wrote:
Yeah, this weird do not allow refs/foo behavior has continually
confused me. Coincidentally I just noticed a case today where
pack-refs treats refs/foo specially for no good reason:
Jeff King wrote:
-LOCALIZED_C := $(C_OBJ:o=c) $(LIB_H) $(GENERATED_H)
+LOCALIZED_C = $(C_OBJ:o=c) $(GENERATED_H)
Why is LIB_H dropped here? This would mean that po/git.pot stops
including strings from macros and static inline functions in headers
(e.g., in parse-options.h).
The rest looks
-prune -o \
-name Documentation -prune -o \
-name '*.h' -print)
to avoid spending time looking in other dot-directories like .svn,
.hg, or .snapshot.
With or without such a change,
Reviewed-by: Jonathan Nieder jrnie...@gmail.com
--
To unsubscribe from this list: send
Junio C Hamano wrote:
Jonathan Nieder jrnie...@gmail.com writes:
Tiny nit: I might use
$(shell $(FIND) * \
-name . -o
-name '.*' -prune -o \
-name t -prune -o \
-name Documentation -prune -o \
-name '*.h' -print
Jonathan Nieder wrote:
Ronnie Sahlberg wrote:
ref-transaction-1 (2014-07-16) 20 commits
-
Second batch of ref transactions
- refs.c: make delete_ref use a transaction
- refs.c: make prune_ref use a transaction to delete the ref
(-)
[...]
Jonathan Nieder jrnie...@gmail.com writes:
--- a/builtin/receive-pack.c
+++ b/builtin/receive-pack.c
@@ -580,18 +580,18 @@ static char *update(struct command *cmd, struct
shallow_info *si)
[...]
if (!transaction ||
ref_transaction_update(transaction
Jonathan Nieder wrote:
This series teaches the tag, replace, commit, cherry-pick,
fast-import, checkout -b, branch, receive-pack, and http-fetch
commands and all update_ref and delete_ref callers to use the ref
transaction API instead of lock_ref_sha1.
The main user-visible change should
that
will return error but there will be in the future. Add an err argument that
will be updated on failure.
Signed-off-by: Ronnie Sahlberg sahlb...@google.com
Signed-off-by: Jonathan Nieder jrnie...@gmail.com
---
builtin/update-ref.c | 5 +++--
refs.c | 16 +++-
refs.h
that
will return error but there will be in the future. Add an err argument that
will be updated on failure.
Signed-off-by: Ronnie Sahlberg sahlb...@google.com
Signed-off-by: Jonathan Nieder jrnie...@gmail.com
---
builtin/update-ref.c | 4 +++-
refs.c | 18 --
refs.h
() anyway, we may add other types of backends in the future.
For example, a hypothetical MySQL backend could fail in _begin with
Can not connect to MySQL server. No route to host.
Signed-off-by: Ronnie Sahlberg sahlb...@google.com
Signed-off-by: Jonathan Nieder jrnie...@gmail.com
---
builtin/update
sahlb...@google.com
Signed-off-by: Jonathan Nieder jrnie...@gmail.com
---
refs.c | 34 +-
1 file changed, 33 insertions(+), 1 deletion(-)
diff --git a/refs.c b/refs.c
index 9cb7908..cc63056 100644
--- a/refs.c
+++ b/refs.c
@@ -3387,6 +3387,21 @@ struct ref_update
From: Ronnie Sahlberg sahlb...@google.com
Date: Wed, 16 Apr 2014 15:30:41 -0700
Change tag.c to use ref transactions for all ref updates.
Signed-off-by: Ronnie Sahlberg sahlb...@google.com
Signed-off-by: Jonathan Nieder jrnie...@gmail.com
---
builtin/tag.c | 16 ++--
1 file changed
From: Ronnie Sahlberg sahlb...@google.com
Date: Wed, 16 Apr 2014 15:32:29 -0700
Update replace.c to use ref transactions for updates.
Signed-off-by: Ronnie Sahlberg sahlb...@google.com
Signed-off-by: Jonathan Nieder jrnie...@gmail.com
---
builtin/replace.c | 14 --
1 file changed, 8
From: Ronnie Sahlberg sahlb...@google.com
Date: Wed, 16 Apr 2014 15:34:19 -0700
Change commit.c to use ref transactions for all ref updates.
Make sure we pass a NULL pointer to ref_transaction_update if have_old
is false.
Signed-off-by: Ronnie Sahlberg sahlb...@google.com
Signed-off-by: Jonathan
From: Ronnie Sahlberg sahlb...@google.com
Date: Wed, 16 Apr 2014 15:37:45 -0700
Change to use ref transactions for all updates to refs.
Signed-off-by: Ronnie Sahlberg sahlb...@google.com
Signed-off-by: Jonathan Nieder jrnie...@gmail.com
---
sequencer.c | 26 ++
1 file
/write_ref_sha1
did not protect against the ref already existing. I.e. one thread could end up
overwriting a branch even if the forcing flag is false.
Signed-off-by: Ronnie Sahlberg sahlb...@google.com
Signed-off-by: Jonathan Nieder jrnie...@gmail.com
---
branch.c | 31 +--
1 file
From: Ronnie Sahlberg sahlb...@google.com
Date: Wed, 16 Apr 2014 16:21:13 -0700
Change update_branch() to use ref transactions for updates.
Signed-off-by: Ronnie Sahlberg sahlb...@google.com
Signed-off-by: Jonathan Nieder jrnie...@gmail.com
---
fast-import.c | 25 +++--
1
From: Ronnie Sahlberg sahlb...@google.com
Date: Thu, 24 Apr 2014 16:36:55 -0700
Change the update_ref helper function to use a ref transaction internally.
Signed-off-by: Ronnie Sahlberg sahlb...@google.com
Signed-off-by: Jonathan Nieder jrnie...@gmail.com
---
refs.c | 29
lock the ref 'refs/heads/topic'.
To foo
! [remote rejected] HEAD - topic (failed to update ref)
Signed-off-by: Ronnie Sahlberg sahlb...@google.com
Signed-off-by: Jonathan Nieder jrnie...@gmail.com
---
builtin/receive-pack.c | 25 -
1 file changed, 16 insertions(+), 9
From: Ronnie Sahlberg sahlb...@google.com
Date: Mon, 28 Apr 2014 15:23:58 -0700
Signed-off-by: Ronnie Sahlberg sahlb...@google.com
Reviewed-by: Michael Haggerty mhag...@alum.mit.edu
Signed-off-by: Jonathan Nieder jrnie...@gmail.com
---
fast-import.c | 29 +++--
1 file
From: Ronnie Sahlberg sahlb...@google.com
Date: Mon, 28 Apr 2014 15:38:47 -0700
No external callers reference lock_ref_sha1 any more so let's declare it
static.
Signed-off-by: Ronnie Sahlberg sahlb...@google.com
Reviewed-by: Michael Haggerty mhag...@alum.mit.edu
Signed-off-by: Jonathan Nieder
and cause the fetch to fail for are even more rare.
Signed-off-by: Ronnie Sahlberg sahlb...@google.com
Signed-off-by: Jonathan Nieder jrnie...@gmail.com
---
walker.c | 72
1 file changed, 41 insertions(+), 31 deletions(-)
diff --git
from
1 to -1 on failures when writing to the ref. Eventually we will want
_commit to start returning more detailed error conditions than the current
simple success/failure.
Signed-off-by: Ronnie Sahlberg sahlb...@google.com
Signed-off-by: Jonathan Nieder jrnie...@gmail.com
---
refs.c | 34
...@google.com
Reviewed-by: Michael Haggerty mhag...@alum.mit.edu
Signed-off-by: Jonathan Nieder jrnie...@gmail.com
---
refs.c | 30 ++
1 file changed, 6 insertions(+), 24 deletions(-)
diff --git a/refs.c b/refs.c
index 0dc093c..de07791 100644
--- a/refs.c
+++ b/refs.c
@@ -3336,24
stripped off before calling lock_ref_sha1.
Signed-off-by: Ronnie Sahlberg sahlb...@google.com
Reviewed-by: Michael Haggerty mhag...@alum.mit.edu
Signed-off-by: Jonathan Nieder jrnie...@gmail.com
---
refs.c | 15 +--
1 file changed, 5 insertions(+), 10 deletions(-)
diff --git a/refs.c
is private to
refs.c and not exposed to external callers.
Signed-off-by: Ronnie Sahlberg sahlb...@google.com
Signed-off-by: Jonathan Nieder jrnie...@gmail.com
---
refs.c | 28 +---
refs.h | 13 +++--
2 files changed, 32 insertions(+), 9 deletions(-)
diff --git
on failure instead of the
previous 0 on success either 1 or -1 on failure.
Signed-off-by: Ronnie Sahlberg sahlb...@google.com
Reviewed-by: Michael Haggerty mhag...@alum.mit.edu
Signed-off-by: Jonathan Nieder jrnie...@gmail.com
---
Thanks for reading.
refs.c | 35
Hi,
dev wrote:
CC credential-store.o
git-compat-util.h, line 516: error: identifier redeclared: inet_ntop
current : function(int, pointer to const void, pointer to char,
unsigned long) returning pointer to const char
previous: function(int, pointer to const void, pointer to
]
- shallow = PKT-LINE(shallow SP obj-id)
+ shallow = PKT-LINE(shallow SP obj-id LF)
In git, the client sends LF and the server is happy with or
without LF. JGit and libgit2 don't send 'shallow' lines.
Reviewed-by: Jonathan Nieder jrnie...@gmail.com
command-list
Hi again,
dev wrote:
So I guess I have to create a config.mak file from somewhere.
Sorry, let's take a step back.
What exact commands do you use to build, starting from a pristine
extracted tarball? What output do you get back?
[...]
Undefined first referenced
Keller, Jacob E wrote:
On Wed, 2014-08-27 at 21:14 +, Keller, Jacob E wrote:
I am having trouble using revert. If I attempt to
$ git revert sha1id
where sha1id is the same as the HEAD commit, I instead get the output of
what looks like git status.
[...]
It's actually not my
Matthieu Moy wrote:
Signed-off-by: Matthieu Moy matthieu@imag.fr
[...]
---
advice.c| 3 +--
git-pull.sh | 2 +-
2 files changed, 2 insertions(+), 3 deletions(-)
Thanks for taking it on.
Reviewed-by: Jonathan Nieder jrnie...@gmail.com
[...]
It was already on my todo-list
that
will return error but there will be in the future. Add an err argument that
will be updated on failure.
Signed-off-by: Ronnie Sahlberg sahlb...@google.com
Reviewed-by: Michael Haggerty mhag...@alum.mit.edu
Signed-off-by: Jonathan Nieder jrnie...@gmail.com
---
builtin/update-ref.c | 4 +++-
refs.c
This makes it more obvious at a glance where the output of functions
parsing the --stdin stream goes.
No functional change intended.
Signed-off-by: Jonathan Nieder jrnie...@gmail.com
Reviewed-by: Michael Haggerty mhag...@alum.mit.edu
---
Thanks for reading.
builtin/update-ref.c | 27
Hi,
David Aguilar wrote:
--- /dev/null
+++ b/check-headers.sh
@@ -0,0 +1,29 @@
[...]
+ $@ -Wno-unused -I$subdir -c -o $header.check -x c - $header
All .c files in git are supposed to start by #include-ing
git-compat-util.h, cache.h, or builtin.h to set the appropriate
feature test
David Aguilar wrote:
Add dependent headers so that including a header does not
require including additional headers.
I agree with this goal, modulo the compat-util.h caveat. Thanks
for working on it.
[...]
--- a/archive.h
+++ b/archive.h
@@ -1,6 +1,7 @@
#ifndef ARCHIVE_H
#define
Johannes Sixt wrote:
Am 07.09.2014 21:49, schrieb Jonathan Nieder:
+enum object_type;
Enum forward declarations are a relatively new C feature. They certainly
don't exist pre-C99.
Good catch. That makes
diff --git i/archive.h w/archive.h
index 4a791e1..b2ca5bf 100644
--- i/archive.h
+++ w
Junio C Hamano wrote:
By the way, Jonathan, with dbedf8bf (t1450 (fsck): remove dangling
objects, 2010-09-06) you added a 'test_might_fail git fsck' to the
1450 test that catches an object corruption. Do you remember if
there was some flakiness in this test that necessitated it, or is it
Jonathan Nieder wrote:
The next series from Ronnie's collection is available at
https://code-review.googlesource.com/#/q/topic:ref-transaction in case
someone wants a fresh series to look at.
Here is the outcome of that review. It could use another set of eyes
(hint, hint) but should
behind by the earlier
ones at all (making it easier to rearrange or skip some tests in the
file or to tweak 'reset --hard' behavior without breaking unrelated
tests).
Noticed while testing a patch that fixes the reset --hard behavior
described above.
Signed-off-by: Jonathan Nieder jrnie...@gmail.com
if the file did not exist.
Signed-off-by: Ronnie Sahlberg sahlb...@google.com
Signed-off-by: Jonathan Nieder jrnie...@gmail.com
---
git-compat-util.h | 7 +--
wrapper.c | 14 ++
2 files changed, 11 insertions(+), 10 deletions(-)
diff --git a/git-compat-util.h b/git-compat
Signed-off-by: Jonathan Nieder jrnie...@gmail.com
---
git-compat-util.h | 9 +
wrapper.c | 14 ++
2 files changed, 23 insertions(+)
diff --git a/git-compat-util.h b/git-compat-util.h
index 611e77b..5ee140c 100644
--- a/git-compat-util.h
+++ b/git-compat-util.h
@@ -307,6
error
string if the transaction failed due to delete_loose_ref.
Signed-off-by: Ronnie Sahlberg sahlb...@google.com
Signed-off-by: Jonathan Nieder jrnie...@gmail.com
---
refs.c | 11 ++-
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/refs.c b/refs.c
index 7235574..5609622 100644
of badly
named refs, at which time we will need to modify lock_ref_sha1_basic once more
in order to allow locking these refs for certain use cases such as rename
and delete.
Signed-off-by: Ronnie Sahlberg sahlb...@google.com
Signed-off-by: Jonathan Nieder jrnie...@gmail.com
---
refs.c | 7 +--
1
-by: Jonathan Nieder jrnie...@gmail.com
---
refs.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/refs.c b/refs.c
index 99a9b86..39571f5 100644
--- a/refs.c
+++ b/refs.c
@@ -2671,7 +2671,7 @@ int rename_ref(const char *oldrefname, const char
*newrefname, const char *logms
transaction.
Signed-off-by: Ronnie Sahlberg sahlb...@google.com
Signed-off-by: Jonathan Nieder jrnie...@gmail.com
---
branch.c | 4 ++--
builtin/commit.c | 4 ++--
builtin/receive-pack.c | 5 +++--
builtin/replace.c | 5 +++--
builtin/tag.c | 4 ++--
builtin
From: Ronnie Sahlberg sahlb...@google.com
Date: Thu, 1 May 2014 10:43:39 -0700
Skip using the lock_any_ref_for_update wrapper and call lock_ref_sha1_basic
directly from the commit function.
Signed-off-by: Ronnie Sahlberg sahlb...@google.com
Signed-off-by: Jonathan Nieder jrnie...@gmail.com
...@google.com
Signed-off-by: Jonathan Nieder jrnie...@gmail.com
---
refs.c | 18 --
refs.h | 5 +
2 files changed, 17 insertions(+), 6 deletions(-)
diff --git a/refs.c b/refs.c
index b63ab2f..86c708a 100644
--- a/refs.c
+++ b/refs.c
@@ -3584,9 +3584,10 @@ int ref_transaction_commit(struct
will be automatically resolved
by the transaction when it deletes m.
Signed-off-by: Ronnie Sahlberg sahlb...@google.com
Signed-off-by: Jonathan Nieder jrnie...@gmail.com
---
refs.c | 41 -
1 file changed, 28 insertions(+), 13 deletions(-)
diff --git a/refs.c b/refs.c
From: Ronnie Sahlberg sahlb...@google.com
Date: Mon, 28 Apr 2014 13:49:07 -0700
Change s_update_ref to use a ref transaction for the ref update.
Signed-off-by: Ronnie Sahlberg sahlb...@google.com
Signed-off-by: Jonathan Nieder jrnie...@gmail.com
---
builtin/fetch.c | 34
From: Ronnie Sahlberg sahlb...@google.com
Date: Mon, 28 Apr 2014 15:36:58 -0700
No external users call write_ref_sha1 any more so lets declare it static.
Signed-off-by: Ronnie Sahlberg sahlb...@google.com
Signed-off-by: Jonathan Nieder jrnie...@gmail.com
---
refs.c | 10 --
refs.h | 3
to make sure that we capture any
instances where callers have not been updated/aware of the new api so that
they can be audited.
Signed-off-by: Ronnie Sahlberg sahlb...@google.com
Signed-off-by: Jonathan Nieder jrnie...@gmail.com
---
branch.c| 2 +-
builtin/blame.c | 2
of these behaviors are for historical reasons and others were
accidents. Luckily no callers pass err == NULL any more. Simplify
by consistently requiring the strbuf argument.
Signed-off-by: Jonathan Nieder jrnie...@gmail.com
---
refs.c | 46 +++---
1 file
From: Ronnie Sahlberg sahlb...@google.com
Date: Fri, 5 Sep 2014 14:35:17 -0700
Print a warning message for any badly named refs we find in the repo.
Signed-off-by: Ronnie Sahlberg sahlb...@google.com
Signed-off-by: Jonathan Nieder jrnie...@gmail.com
---
builtin/for-each-ref.c | 6 ++
1 file
refs
and refuse to delete them unless REF_BADNAMEOK flag is passed.
Signed-off-by: Ronnie Sahlberg sahlb...@google.com
Signed-off-by: Jonathan Nieder jrnie...@gmail.com
---
builtin/branch.c| 13 ++
builtin/update-ref.c| 3 ++-
cache.h | 8
(for example to print a
message about it) with that flag set --- resolve_ref_unsafe will
resolve one level of symrefs and stop there.
Signed-off-by: Jonathan Nieder jrnie...@gmail.com
---
builtin/branch.c | 3 ++-
cache.h | 1 +
refs.c| 10 ++
t/t1400
The former caller uses unable_to_lock_message now.
Signed-off-by: Jonathan Nieder jrnie...@gmail.com
Reviewed-by: Ronnie Sahlberg sahlb...@google.com
---
cache.h| 1 -
lockfile.c | 10 --
2 files changed, 11 deletions(-)
diff --git a/cache.h b/cache.h
index 03a6144..995729f 100644
201 - 300 of 2895 matches
Mail list logo