On Mon, Jul 14, 2014 at 7:15 PM, Duy Nguyen pclo...@gmail.com wrote:
It makes me wonder if a cleaner way of rebuilding cache-treei in this
case is from git-add--interactive.perl, or by simply spawn git
update-index --rebuild-cache-tree after running
git-add--interactive.perl.
We could check
Fabian Ruch baf...@gmail.com wrote:
you're the original author of the code touched by this patch. Is the
second -q option really a simple copy-and-paste of the first or am I
overlooking something here? I'd like to confirm this as, in retrospect,
I feel a bit uncertain about the hasty claim in
On Mon, Jul 14, 2014 at 11:38:06PM -0700, Junio C Hamano wrote:
On Mon, Jul 14, 2014 at 7:15 PM, Duy Nguyen pclo...@gmail.com wrote:
It makes me wonder if a cleaner way of rebuilding cache-treei in this
case is from git-add--interactive.perl, or by simply spawn git
update-index
On 7/11/2014 7:51 PM, Matthieu Moy wrote:
+`int git_configset_add_file(struct config_set *cs, const char *filename)`::
+
+Parses the file and adds the variable-value pairs to the `config_set`,
+dies if there is an error in parsing the file.
The return value is undocumented.
If
Junio C Hamano gitster at pobox.com writes:
Tanay Abhra tanayabh at gmail.com writes:
diff --git a/test-config.c b/test-config.c
new file mode 100644
index 000..dc313c2
--- /dev/null
+++ b/test-config.c
at at -0,0 +1,125 at at
+
+
+int main(int argc, char **argv)
When adding alternate object directories, we try not to add the
directory of the current repository to avoid cycles. Unfortunately,
that test was broken, since it compared an absolute with a relative
path.
Signed-off-by: Ephrim Khong dr.kh...@gmail.com
---
Since v2: Added Johannes' comments.
Tanay Abhra tanay...@gmail.com writes:
I checked the whole codebase and in all of the cases if they cannot read a
file
they return -1 and continue running.
More precisely: in git_config_from_file, any fopen failure results in
return -1. But in git_config_early (one caller of
From: Karsten Blees bl...@dcon.de
Date: Sat, 14 Jan 2012 22:01:09 +0100
Changes opendir/readdir to use Windows Unicode APIs and convert between
UTF-8/UTF-16.
Removes parameter checks that are already covered by xutftowcs_path. This
changes detection of ENAMETOOLONG from MAX_PATH - 2 to MAX_PATH
Hello Hannes,
attached please find the patches that Karsten pointed out:
1) The unicode file name support was omitted from his unicode patch
series; my mistake, sorry. There is still big part missing: support
for unicode environment; I can only hope the tests would choke on
that.
2) Windows
From: Pat Thoyts pattho...@users.sourceforge.net
Date: Mon, 2 Sep 2013 15:44:54 +0100
git commit -m with some iso8859-1 encoded stuff is doomed to fail in MinGW,
because Windows don't let you pass encoded bytes to a process (CreateProcessW
always takes a UTF-16LE encoded string).
It is safe to
From: Karsten Blees bl...@dcon.de
Date: Thu, 15 Mar 2012 18:21:28 +0100
Replaces Windows ANSI APIs dealing with file- or path names with their
Unicode equivalent, adding UTF-8/UTF-16LE conversion as necessary.
The dirent API (opendir/readdir/closedir) is updated in a separate commit.
Adds
builtin/verify-commit.c was added in commit d07b00b (verify-commit:
scriptable commit signature verification, 2014-06-23), update
.gitignore to ignore the generated file.
Signed-off-by: Øyvind A. Holm su...@sunbase.org
---
.gitignore | 1 +
1 file changed, 1 insertion(+)
diff --git a/.gitignore
Hello,
I'm sorry that I have to reply to my own mail, but I forgot this:
Karsten Blees (2):
Win32: Unicode file name support (except dirent)
.. has this one squashed in:
Win32: fix detection of empty directories in is_dir_empty
https://github.com/msysgit/git/commit/91db148
Win32:
Hi,
[PATCH v9]: Applied most of the review comments mentioned in [11]. Mostly
asthetic changes.
test-config now clears the config_set before exiting. Most of the tests
now use the
check-config function. check_config_init() now handles return values
correctly.
Diff
Expose the `config_set` C API as a set of simple commands in order to
facilitate testing. Add tests for the `config_set` API as well as for
`git_config_get_*()` family for the usual config files.
Signed-off-by: Matthieu Moy matthieu@imag.fr
Signed-off-by: Tanay Abhra tanay...@gmail.com
---
Currently `git_config()` uses a callback mechanism and file rereads for
config values. Due to this approach, it is not uncommon for the config
files to be parsed several times during the run of a git program, with
different callbacks picking out different variables useful to themselves.
Add a
On Mon, 2014-07-14 at 10:17 -0700, Junio C Hamano wrote:
Jeff King p...@peff.net writes:
On Sun, Jul 13, 2014 at 01:33:56PM -0400, Jeff King wrote:
I realize that I am reinventing the error-reporting wheel on a sleepy
Sunday afternoon without having thought about it much, so there is
Tanay Abhra tanay...@gmail.com writes:
diff --git a/config.c b/config.c
index ba882a1..89e2d67 100644
--- a/config.c
+++ b/config.c
...
+const struct string_list *git_configset_get_value_multi(struct config_set
*cs, const char *key)
+{
+ struct config_set_element *e =
Tanay Abhra tanay...@gmail.com writes:
Expose the `config_set` C API as a set of simple commands in order to
facilitate testing. Add tests for the `config_set` API as well as for
`git_config_get_*()` family for the usual config files.
Signed-off-by: Matthieu Moy matthieu@imag.fr
Keller, Jacob E jacob.e.kel...@intel.com writes:
On Mon, 2014-07-14 at 10:17 -0700, Junio C Hamano wrote:
Jeff King p...@peff.net writes:
On Sun, Jul 13, 2014 at 01:33:56PM -0400, Jeff King wrote:
I realize that I am reinventing the error-reporting wheel on a sleepy
Sunday afternoon
On 7/15/2014 9:16 PM, Junio C Hamano wrote:
Tanay Abhra tanay...@gmail.com writes:
diff --git a/config.c b/config.c
index ba882a1..89e2d67 100644
--- a/config.c
+++ b/config.c
...
+const struct string_list *git_configset_get_value_multi(struct config_set
*cs, const char *key)
+{
+
Hi,
I have tried some methods introduced in the network, but always failed. Some
big files committed by me to a very old branch then the files deleted and new
branches were continuously created. Now the checkout directory has grown to
about 80 megabytes. What's the right way to permenently
On Tue, Jul 8, 2014 at 8:02 AM, Michael Haggerty mhag...@alum.mit.edu wrote:
On 06/20/2014 04:43 PM, Ronnie Sahlberg wrote:
Move the check for check_refname_format from lock_any_ref_for_update
to lock_ref_sha1_basic. At some later stage we will get rid of
lock_any_ref_for_update completely.
Hi,
I have tried some methods introduced in the network, but always failed. Some
big files committed by me to a very old branch then the files deleted and new
branches were continuously created. Now the checkout directory has grown to
about 80 megabytes. What's the right way to permenently
Duy Nguyen pclo...@gmail.com writes:
On Mon, Jul 14, 2014 at 11:38:06PM -0700, Junio C Hamano wrote:
On Mon, Jul 14, 2014 at 7:15 PM, Duy Nguyen pclo...@gmail.com wrote:
It makes me wonder if a cleaner way of rebuilding cache-treei in this
case is from git-add--interactive.perl, or by
On 7/15/2014 9:27 PM, Junio C Hamano wrote:
+test_expect_success 'setup default config' '
+cat .git/config \EOF
So the default .git/config that was prepared by git init is
discarded and replaced with this? Shouldn't it be
cat .git/config \EOF
instead?
Most of tests like
On Tue, 2014-07-15 at 09:03 -0700, Junio C Hamano wrote:
Keller, Jacob E jacob.e.kel...@intel.com writes:
On Mon, 2014-07-14 at 10:17 -0700, Junio C Hamano wrote:
Jeff King p...@peff.net writes:
On Sun, Jul 13, 2014 at 01:33:56PM -0400, Jeff King wrote:
I realize that I am
Michael Haggerty wrote:
So...I like the idea of enforcing refname checks at the lowest level
possible, but I think that the change you propose is too abrupt. I
think it needs either more careful analysis showing that it won't hurt
anybody, or some kind of tooling or non-strict mode that
Ronnie Sahlberg wrote:
What I suggest doing here is to create a new patch towards the end of
the series that will :
* change the resolve_ref_unsafe(... , int reading, ...) argument to be
a bitmask of flags with
#define RESOLVE_REF_READING 0x01 (== current flag)
#define
Keller, Jacob E jacob.e.kel...@intel.com writes:
On Tue, 2014-07-15 at 09:03 -0700, Junio C Hamano wrote:
...
Yes, that is fun.
I actually think your In 'version:pefname' and 'wersion:refname',
we want be able to report 'pefname' and 'wersion' are misspelled,
and returning -1 or enum
Stepan Kasal ka...@ucw.cz writes:
Hello Hannes,
attached please find the patches that Karsten pointed out:
1) The unicode file name support was omitted from his unicode patch
series; my mistake, sorry. There is still big part missing: support
for unicode environment; I can only hope the
Tanay Abhra tanay...@gmail.com writes:
... I need it for
test_expect_success 'proper error on error in default config files' '
which requires me to compare the line no at which the error was found.
I see. We may want to later rethink the way you validate the line
numbers, but in the meantime
On Tue, 2014-07-15 at 11:17 -0700, Junio C Hamano wrote:
Keller, Jacob E jacob.e.kel...@intel.com writes:
On Tue, 2014-07-15 at 09:03 -0700, Junio C Hamano wrote:
...
Yes, that is fun.
I actually think your In 'version:pefname' and 'wersion:refname',
we want be able to report
Jonathan Nieder jrnie...@gmail.com writes:
How to take care of the recovery use case is another question. FWIW I
also would prefer if git update-ref -d or git branch -D could be
used to delete corrupt refs instead of having to use fsck (since a
fsck run can take a while), but that's a
Am 15.07.2014 00:30, schrieb Junio C Hamano:
Karsten Blees karsten.bl...@gmail.com writes:
From: =?UTF-8?q?Nguy=E1=BB=85n=20Th=C3=A1i=20Ng=E1=BB=8Dc=20Duy?=
pclo...@gmail.com
Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com
Signed-off-by: Karsten Blees bl...@dcon.de
---
Thanks
Karsten Blees karsten.bl...@gmail.com writes:
Am 15.07.2014 00:30, schrieb Junio C Hamano:
Karsten Blees karsten.bl...@gmail.com writes:
From: =?UTF-8?q?Nguy=E1=BB=85n=20Th=C3=A1i=20Ng=E1=BB=8Dc=20Duy?=
pclo...@gmail.com
Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com
Junio C Hamano gits...@pobox.com writes:
Keller, Jacob E jacob.e.kel...@intel.com writes:
On Tue, 2014-07-15 at 09:03 -0700, Junio C Hamano wrote:
...
Yes, that is fun.
I actually think your In 'version:pefname' and 'wersion:refname',
we want be able to report 'pefname' and 'wersion'
Keller, Jacob E jacob.e.kel...@intel.com writes:
I am going to re-submit this with an enum-style return. I am also
changing how we parse so that we can correctly report whether the sort
function or sort atom is incorrect.
Oh, our mails crossed, I guess. As long as it will leave the door
open
When using `git format-patch --ignore-if-in-upstream` we are only
allowed to give a single revision range. In the next commit we will
want to add an additional exclusion revision in order to handle fork
points correctly, so convert `git-rebase--am` to use a symmetric
difference with
Ephrim Khong dr.kh...@gmail.com writes:
@@ -320,7 +320,7 @@ static int link_alt_odb_entry(const char *entry, const
char *relative_base, int
return -1;
}
}
- if (!strcmp(ent-base, objdir)) {
+ if (!strcmp_icase(ent-base, normalized_objdir))
From: Junio C Hamano gits...@pobox.com
Sent: Thursday, July 10, 2014 9:36 PM
Jeff King p...@peff.net writes:
On Mon, Jun 16, 2014 at 01:55:57PM +0100, Philip Oakley wrote:
+Error Messages
+
+ - We typically do not end error messages with a full stop. While
+ we've been rather inconsistent
On Tue, Jul 15, 2014 at 7:29 AM, Ephrim Khong dr.kh...@gmail.com wrote:
When adding alternate object directories, we try not to add the
directory of the current repository to avoid cycles. Unfortunately,
that test was broken, since it compared an absolute with a relative
path.
On Tue, Jul 15, 2014 at 11:04 AM, Jonathan Nieder jrnie...@gmail.com wrote:
Michael Haggerty wrote:
So...I like the idea of enforcing refname checks at the lowest level
possible, but I think that the change you propose is too abrupt. I
think it needs either more careful analysis showing that
On Tue, Jul 15, 2014 at 11:34 AM, Junio C Hamano gits...@pobox.com wrote:
Jonathan Nieder jrnie...@gmail.com writes:
How to take care of the recovery use case is another question. FWIW I
also would prefer if git update-ref -d or git branch -D could be
used to delete corrupt refs instead of
On 07/13/2014 10:28 PM, David Turner wrote:
From: David Turner dtur...@twopensource.com
[]
diff --git a/cache-tree.c b/cache-tree.c
index 7fa524a..f951d7d 100644
--- a/cache-tree.c
+++ b/cache-tree.c
@@ -239,9 +239,12 @@ static int update_one(struct cache_tree *it,
struct strbuf
Thanks, John. My test script is working fine for me now with these
patches.
--
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
Ephrim Khong dr.kh...@gmail.com writes:
diff --git a/t/t7702-repack-cyclic-alternate.sh
b/t/t7702-repack-cyclic-alternate.sh
new file mode 100755
index 000..8341d46
--- /dev/null
+++ b/t/t7702-repack-cyclic-alternate.sh
@@ -0,0 +1,24 @@
+#!/bin/sh
+#
+# Copyright (c) 2014 Ephrim
Jeff King p...@peff.net writes:
#define DEFINE_ALLOCATOR(name, type) \
+static struct alloc_state name##_state; \
void *alloc_##name##_node(void) \
{
Jeff King p...@peff.net writes:
Because the allocator functions for tree, blobs, etc are all
very similar, we originally used a macro to avoid repeating
ourselves. Since the prior commit, though, the heavy lifting
is done by an inline helper function. The macro does still
save us a few
Jeff King p...@peff.net writes:
diff --git a/alloc.c b/alloc.c
index 03e458b..fd2e32d 100644
--- a/alloc.c
+++ b/alloc.c
@@ -52,6 +52,7 @@ static struct alloc_state blob_state;
void *alloc_blob_node(void)
{
struct blob *b = alloc_node(blob_state, sizeof(struct blob));
+
On Tue, 2014-07-15 at 12:12 -0700, Junio C Hamano wrote:
Keller, Jacob E jacob.e.kel...@intel.com writes:
I am going to re-submit this with an enum-style return. I am also
changing how we parse so that we can correctly report whether the sort
function or sort atom is incorrect.
Oh, our
On Tue, Jul 15, 2014 at 12:34 PM, Ronnie Sahlberg sahlb...@google.com wrote:
On Tue, Jul 15, 2014 at 11:04 AM, Jonathan Nieder jrnie...@gmail.com wrote:
Michael Haggerty wrote:
So...I like the idea of enforcing refname checks at the lowest level
possible, but I think that the change you
This patch series is hopefully the final version of a series of patches which
updates git-tag to allow the .gitconfig variable 'tag.sort' to be used as the
default sort parameter. This version uses a new set/pop error routine setup
which enables correctly modifying the error routine to handle the
Let error routine be a stack of error functions so that callers can
temporarily override the error_routine and then pop their modification
off the stack. This enables customizing error for a small code segment.
Signed-off-by: Jacob Keller jacob.e.kel...@intel.com
---
This is a modification of
Add support for configuring default sort specification for git tags.
Command line option will override the configured value. Both methods use
the same syntax. Make use of (set/pop)_error_routine to temporarily
modify error reporting when parsing as a configuration option.
Cc: Jeff King
The --sort tests should use the better format for expect to maintain
indenting and ensure that no substitution is occurring. This makes
parsing and understanding the tests a bit easier.
Signed-off-by: Jacob Keller jacob.e.kel...@intel.com
---
t/t7004-tag.sh | 40
Update the parsing of sort string specifications so that it is able to
properly detect errors in the function type and allowed atoms.
Cc: Jeff King p...@peff.net
Signed-off-by: Jacob Keller jacob.e.kel...@intel.com
---
This function should replace the one I think is already on one of the
Torsten Bögershausen tbo...@web.de writes:
On 07/13/2014 10:28 PM, David Turner wrote:
From: David Turner dtur...@twopensource.com
[]
diff --git a/cache-tree.c b/cache-tree.c
index 7fa524a..f951d7d 100644
--- a/cache-tree.c
+++ b/cache-tree.c
@@ -239,9 +239,12 @@ static int
On Tue, 2014-07-15 at 12:12 -0700, Junio C Hamano wrote:
Keller, Jacob E jacob.e.kel...@intel.com writes:
I am going to re-submit this with an enum-style return. I am also
changing how we parse so that we can correctly report whether the sort
function or sort atom is incorrect.
Oh, our
Heiko Voigt hvo...@hvoigt.net writes:
Can there be any caller that include and use submodule-config.h that
does not need anythjing from submodule.h? Or vice versa?
It just did not look like these two headers describe independent
subsystems but they almost always have to go hand-in-hand.
Jacob Keller jacob.e.kel...@intel.com writes:
This patch series is hopefully the final version of a series of patches which
updates git-tag to allow the .gitconfig variable 'tag.sort' to be used as the
default sort parameter. This version uses a new set/pop error routine setup
which enables
Jacob Keller jacob.e.kel...@intel.com writes:
extern void set_error_routine(void (*routine)(const char *err, va_list
params));
+extern void pop_error_routine(void);
pop that undoes set smells somewhat weird. Perhaps we should rename
set to push? That would allow us catch possible topics
Am 15.07.2014 20:20, schrieb Junio C Hamano:
Stepan Kasal ka...@ucw.cz writes:
Hello Hannes,
attached please find the patches that Karsten pointed out:
1) The unicode file name support was omitted from his unicode patch
series; my mistake, sorry. There is still big part missing: support
MinGW and MSVC before 2010 don't define ELOOP, use EMLINK (aka Too many
links) instead.
Signed-off-by: Karsten Blees bl...@dcon.de
---
compat/mingw.h | 3 +++
1 file changed, 3 insertions(+)
diff --git a/compat/mingw.h b/compat/mingw.h
index 405c08f..510530c 100644
--- a/compat/mingw.h
+++
There is no fchmod() on native Windows platforms (MinGW and MSVC), and the
equivalent Win32 API (SetFileInformationByHandle) requires Windows Vista.
Use chmod() instead.
Signed-off-by: Karsten Blees bl...@dcon.de
---
config.c | 8
1 file changed, 4 insertions(+), 4 deletions(-)
diff
Both refs.c and fsck.c have their own private copies of the is_branch function.
Delete the is_branch function from fsck.c and make the version in refs.c
public.
Signed-off-by: Ronnie Sahlberg sahlb...@google.com
---
builtin/fsck.c | 5 -
refs.c | 2 +-
refs.h | 2 ++
3 files
Jun, List
Please find a trivial patch that makes refs.c:is_branch public.
This allows us to delete the identical copy of is_branch in fsck.c
Ronnie Sahlberg (1):
refs.c: add a public is_branch function
builtin/fsck.c | 5 -
refs.c | 2 +-
refs.h | 2 ++
3 files changed,
Ronnie Sahlberg wrote:
Signed-off-by: Ronnie Sahlberg sahlb...@google.com
---
builtin/fsck.c | 5 -
refs.c | 2 +-
refs.h | 2 ++
3 files changed, 3 insertions(+), 6 deletions(-)
Makes sense -- thanks. (This is an old one: v1.5.4-rc4~27
(2008-01-15), v1.5.4-rc4~30
On Tue, 2014-07-15 at 15:47 -0700, Junio C Hamano wrote:
Jacob Keller jacob.e.kel...@intel.com writes:
extern void set_error_routine(void (*routine)(const char *err, va_list
params));
+extern void pop_error_routine(void);
pop that undoes set smells somewhat weird. Perhaps we should
On Tue, 2014-07-15 at 15:47 -0700, Junio C Hamano wrote:
Jacob Keller jacob.e.kel...@intel.com writes:
extern void set_error_routine(void (*routine)(const char *err, va_list
params));
+extern void pop_error_routine(void);
pop that undoes set smells somewhat weird. Perhaps we should
Add support for configuring default sort specification for git tags.
Command line option will override the configured value. Both methods use
the same syntax. Make use of (set/pop)_error_routine to temporarily
modify error reporting when parsing as a configuration option.
Cc: Jeff King
Update the parsing of sort string specifications so that it is able to
properly detect errors in the function type and allowed atoms.
Cc: Jeff King p...@peff.net
Signed-off-by: Jacob Keller jacob.e.kel...@intel.com
---
builtin/tag.c | 55 +--
1
The --sort tests should use the better format for expect to maintain
indenting and ensure that no substitution is occurring. This makes
parsing and understanding the tests a bit easier.
Signed-off-by: Jacob Keller jacob.e.kel...@intel.com
---
t/t7004-tag.sh | 40
Rename set_error_routine to be push_error_routine, and add a new
pop_error_routine. This allows temporary modifications of the error
routine over a small block of code.
Signed-off-by: Jacob Keller jacob.e.kel...@intel.com
---
Renamed set_error_routine to push_error_routine in order to match the
Change prune_ref to delete the ref using a ref transaction. To do this we also
need to add a new flag REF_ISPRUNING that will tell the transaction that we
do not want to delete this ref from the packed refs. This flag is private to
refs.c and not exposed to external callers.
Reviewed-by: Jonathan
No external callers reference lock_ref_sha1 any more so lets declare it static.
Reviewed-by: Jonathan Nieder jrnie...@gmail.com
Signed-off-by: Ronnie Sahlberg sahlb...@google.com
---
refs.c | 2 +-
refs.h | 6 --
2 files changed, 1 insertion(+), 7 deletions(-)
diff --git a/refs.c b/refs.c
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.
Reviewed-by: Jonathan Nieder jrnie...@gmail.com
Signed-off-by: Ronnie Sahlberg sahlb...@google.com
---
builtin/commit.c | 24 +++-
1
Switch to using ref transactions in walker_fetch(). As part of the refactoring
to use ref transactions we also fix a potential memory leak where in the
original code if write_ref_sha1() would fail we would end up returning from
the function without free()ing the msg string.
Note that this
Change ref_transaction_delete() to do basic error checking and return
non-zero of error. Update all callers to check the return for
ref_transaction_delete(). There are currently no conditions in _delete that
will return error but there will be in the future. Add an err argument that
will be
lock_ref_sha1 was only called from one place in refc.c and only provided
a check that the refname was sane before adding back the initial refs/
part of the ref path name, the initial refs/ that this caller had already
stripped off before calling lock_ref_sha1.
Reviewed-by: Jonathan Nieder
Track the state of a transaction in a new state field. Check the field for
sanity, i.e. that state must be OPEN when _commit/_create/_delete or
_update is called or else die(BUG:...)
Signed-off-by: Ronnie Sahlberg sahlb...@google.com
---
refs.c | 39 ++-
1
Change update_branch() to use ref transactions for updates.
Reviewed-by: Jonathan Nieder jrnie...@gmail.com
Signed-off-by: Ronnie Sahlberg sahlb...@google.com
---
fast-import.c | 24 ++--
1 file changed, 14 insertions(+), 10 deletions(-)
diff --git a/fast-import.c
Update replace.c to use ref transactions for updates.
Reviewed-by: Jonathan Nieder jrnie...@gmail.com
Signed-off-by: Ronnie Sahlberg sahlb...@google.com
---
builtin/replace.c | 15 +--
1 file changed, 9 insertions(+), 6 deletions(-)
diff --git a/builtin/replace.c b/builtin/replace.c
Wrap all the ref updates inside a transaction.
Signed-off-by: Ronnie Sahlberg sahlb...@google.com
---
builtin/receive-pack.c | 96 +-
1 file changed, 63 insertions(+), 33 deletions(-)
diff --git a/builtin/receive-pack.c b/builtin/receive-pack.c
Reviewed-by: Jonathan Nieder jrnie...@gmail.com
Signed-off-by: Ronnie Sahlberg sahlb...@google.com
---
fast-import.c | 29 +++--
1 file changed, 23 insertions(+), 6 deletions(-)
diff --git a/fast-import.c b/fast-import.c
index d5206ee..a95e1be 100644
--- a/fast-import.c
Change delete_ref to use a ref transaction for the deletion. At the same time
since we no longer have any callers of repack_without_ref we can now delete
this function.
Change delete_ref to return 0 on success and 1 on failure instead of the
previous 0 on success either 1 or -1 on failure.
Since we only call update_ref_write from a single place and we only call it
with onerr==QUIET_ON_ERR we can just as well get rid of it and just call
write_ref_sha1 directly. This changes the return status for _commit from
1 to -1 on failures when writing to the ref. Eventually we will want
_commit
Change the update_ref helper function to use a ref transaction internally.
Reviewed-by: Jonathan Nieder jrnie...@gmail.com
Signed-off-by: Ronnie Sahlberg sahlb...@google.com
---
refs.c | 28
1 file changed, 24 insertions(+), 4 deletions(-)
diff --git a/refs.c
Do basic error checking in ref_transaction_create() and make it return
non-zero on error. Update all callers to check the result of
ref_transaction_create(). There are currently no conditions in _create that
will return error but there will be in the future. Add an err argument that
will be
Change create_branch to use a ref transaction when creating the new branch.
This also fixes a race condition in the old code where two concurrent
create_branch could race since the lock_any_ref_for_update/write_ref_sha1
did not protect against the ref already existing. I.e. one thread could end
This is the next 20 patches from my originally big patch series and follow
the previous 19 patches that is now in juns tree.
These patches were numbered 20-39 in the original 48-patch series.
Changes since these patches were in the original series:
- Addressing concerns from mhagger's review
Change to use ref transactions for all updates to refs.
Reviewed-by: Jonathan Nieder jrnie...@gmail.com
Signed-off-by: Ronnie Sahlberg sahlb...@google.com
---
sequencer.c | 27 ++-
1 file changed, 18 insertions(+), 9 deletions(-)
diff --git a/sequencer.c b/sequencer.c
Change tag.c to use ref transactions for all ref updates.
Reviewed-by: Jonathan Nieder jrnie...@gmail.com
Signed-off-by: Ronnie Sahlberg sahlb...@google.com
---
builtin/tag.c | 15 +--
1 file changed, 9 insertions(+), 6 deletions(-)
diff --git a/builtin/tag.c b/builtin/tag.c
index
Add an err argument to _begin so that on non-fatal failures in future ref
backends we can report a nice error back to the caller.
While _begin can currently never fail for other reasons than OOM, in which
case we die() anyway, we may add other types of backends in the future.
For example, a
Hi Michael,
Here is the next set of 20 patches of those you already reviewed.
I cut this patch off just before patch #40 in the previous series.
These are the patches numbered 20-39 in the original series.
I think I have addressed your concerns here so If you could take a quick look
and
On Tue, Jul 15, 2014 at 09:03:53AM -0700, Junio C Hamano wrote:
Do we want to go this way?
I do not speak for Peff, but I personally think this is just a fun
demonstration, nothing more, and my gut feeling is that it would
make things unnecessary complex without much real gain to pursue it
Since we now only call update_ref_lock with onerr==QUIET_ON_ERR we no longer
need this function and can replace it with just calling lock_any_ref_for_update
directly.
Reviewed-by: Jonathan Nieder jrnie...@gmail.com
Signed-off-by: Ronnie Sahlberg sahlb...@google.com
---
refs.c | 30
On Tue, Jul 15, 2014 at 04:32:59PM -0700, Jacob Keller wrote:
+static void error_bad_sort_config(const char *err, va_list params)
+{
+ vreportf(warning: tag.sort has , err, params);
+}
This feels a little like an abuse of the prefix field of vreportf, but
as you probably saw in my for
Karsten Blees wrote:
MinGW and MSVC before 2010 don't define ELOOP, use EMLINK (aka Too many
links) instead.
[...]
+#ifndef ELOOP
+#define ELOOP EMLINK
+#endif
This could use
#define ELOOP WSAELOOP
as an alternative. But it shouldn't matter since git doesn't look for
EMLINK
On Tue, 2014-07-15 at 19:42 -0400, Jeff King wrote:
On Tue, Jul 15, 2014 at 04:32:59PM -0700, Jacob Keller wrote:
+static void error_bad_sort_config(const char *err, va_list params)
+{
+ vreportf(warning: tag.sort has , err, params);
+}
This feels a little like an abuse of the
1 - 100 of 104 matches
Mail list logo