t regards,
Andrey Okoshkin
adable/maintainable when presenting this part of the code
> to the user.)
>
> With or without this change:
> Reviewed-by: Stefan Beller
Yes, in current situation it's more for readability. And I'll make the usage
of merge_verbosity just after the assignment.
--
Best regards,
Andrey Okoshkin
24.10.2017 22:52, Jeff King wrote:
> On Tue, Oct 24, 2017 at 07:11:24PM +0200, Martin Ă…gren wrote:
>
>> On 24 October 2017 at 18:45, Eric Sunshine wrote:
>>> On Tue, Oct 24, 2017 at 12:28 PM, Stefan Beller wrote:
>>>> On Tue, Oct 24, 2017 at 8:27 AM, Andrey
ned-off-by: Andrey Okoshkin
Reviewed-by: Stefan Beller
---
Changes since the previous patch:
* no actions are taken between the merge_verbosity assignment and check.
merge-recursive.c | 7 ---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/merge-recursive.c b/merge-recursive.c
index
Thanks, Eric, indeed it's better to change the commit message.
25.10.2017 14:53, Eric Sunshine wrote:
> On Wed, Oct 25, 2017 at 7:39 AM, Andrey Okoshkin
> wrote:
>> Check 'GIT_MERGE_VERBOSITY' environment variable only once in
>> init_merge_options().
>
trtol()
as these environment related functions could modify the string pointer returned
by the initial getenv() call.
Signed-off-by: Andrey Okoshkin
---
I tried to rework the commit message.
merge-recursive.c | 7 ---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/merge-rec
Add lstat() error handling not only for ENOENT case.
Otherwise uninitialised 'struct stat st' variable is used later in case of
lstat() non-ENOENT failure which leads to processing of rubbish values of
file mode ('S_ISLNK(st.st_mode)' check) or size ('xsize_t(st.st_size)&
trtol()
as these environment related functions could modify the string pointer returned
by the initial getenv() call.
Signed-off-by: Andrey Okoshkin
Reviewed-by: Stefan Beller
---
Added 'reviewed-by' field.
merge-recursive.c | 7 ---
1 file changed, 4 insertions(+), 3 deletions(-)
ade via the environment as the one we checked earlier), and I
> can understand that it feels a bit redundant and ugly.
Yes, you absolutely right.
I believe this patch makes code more beautiful :-)
>>> Signed-off-by: Andrey Okoshkin
>>> Reviewed-by: Stefan Beller
>
Get rid of the duplicated getenv('GIT_MERGE_VERBOSITY') calls with the same
constant string argument. This makes code more readable and prevents typo in
the further development.
Signed-off-by: Andrey Okoshkin
Reviewed-by: Stefan Beller
---
Commit message is reworked according to th
Add check of the resolved HEAD reference while printing of a commit summary.
resolve_ref_unsafe() may return NULL pointer if underlying calls of lstat() or
open() fail in files_read_raw_ref().
Such situation can be caused by race: file becomes inaccessible to this moment.
Signed-off-by: Andrey
x27;t know how much trouble it is
worth going to for that. It's buried behind a ref_transaction, and I
don't think builtin/commit.c ever sees the real name (though maybe it
would be a good feature of the transaction to record the destinations of
any symrefs we updated).
--
Best regards,
Andrey Okoshkin
: Andrey Okoshkin
---
Thank you for your review.
Changes since the previous patch:
* BUG is replaced with die, message;
* Message is changed.
builtin/commit.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/builtin/commit.c b/builtin/commit.c
index 1a0da71a4..cc27c9af7 100644
--- a/builtin
19.10.2017 20:44, Jeff King wrote:
On Thu, Oct 19, 2017 at 12:36:50PM +0300, Andrey Okoshkin wrote:
Thanks, this looks good to me. One other possible minor improvement:
head = resolve_ref_unsafe("HEAD", 0, junk_oid.hash, NULL);
+ if (!head)
+ die(_(
Add check of the resolved HEAD reference while printing of a commit summary.
resolve_ref_unsafe() may return NULL pointer if underlying calls of lstat() or
open() fail in files_read_raw_ref().
Such situation can be caused by race: file becomes inaccessible to this moment.
Signed-off-by: Andrey
Add check of the resolved HEAD reference while printing of a commit summary.
resolve_ref_unsafe() may return NULL pointer if underlying calls of lstat() or
open() fail in files_read_raw_ref().
Such situation can be caused by race: file becomes inaccessible to this moment.
Signed-off-by: Andrey
Add usage of xmalloc() instead of malloc() in add_to_trie() as xmalloc wraps
and checks memory allocation result.
Signed-off-by: Andrey Okoshkin
---
Hello,
I'm not sure but it looks like there is a missing check of the malloc result.
memcpy() may crash with SIGSEGV due to the memory alloc
thread as getenv() is not thread-safe.
Signed-off-by: Andrey Okoshkin
---
merge-recursive.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/merge-recursive.c b/merge-recursive.c
index 1494ffdb8..eaac98145 100644
--- a/merge-recursive.c
+++ b/merge-recursive.c
@@ -2163
18 matches
Mail list logo