Hi!
I'm trying to use git in an integration test and i'm having trouble
with configuration options.
On windows developer machines we use wincred as our credenital helper
and thus have it set in ~/.gitconfig
For the integration test that is no use as it will make testing
unauthorized logging in
Matthieu Moy:
> Using "git send-email" normally does the right thing. You may want to
> look at https://submitgit.herokuapp.com/ too.
git send-email does not work as my institute proxy does not allow
IMAP/SMTP connections. But I will take care of this from hence forward.
> The commit message
On Thu, Feb 25, 2016 at 10:07 PM, Jeff King wrote:
> Of the two you suggested, I think I like the here-doc better, as it does
> not leave any question to a reader that there is other interpolation
> going on.
>
> -Peff
Agreed. Since I forgot the parts about argc checking, I will
On Fri, Feb 26, 2016 at 3:04 AM, Stephan Beyer wrote:
> Signed-off-by: Stephan Beyer
> ---
>
> To be honest: the test could be better, it could be more "targeted",
> i.e. the example commit history could be smaller and just consider
> all the cases and corner
On Thu, Feb 25, 2016 at 09:26:14PM -0500, Eric Sunshine wrote:
> On Thu, Feb 25, 2016 at 9:19 PM, Jacob Keller wrote:
> > On Thu, Feb 25, 2016 at 5:55 PM, Eric Sunshine
> > wrote:
> >> Not worth a re-roll, but these quote sequences are
---
Documentation/SubmittingPatches | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/Documentation/SubmittingPatches
b/Documentation/SubmittingPatches
index 98fc4cc..b2c7664 100644
--- a/Documentation/SubmittingPatches
+++ b/Documentation/SubmittingPatches
@@ -168,7 +168,9
On Fri, Feb 26, 2016 at 12:17:49PM +0530, Guilherme wrote:
> I'm trying to use git in an integration test and i'm having trouble
> with configuration options.
>
> On windows developer machines we use wincred as our credenital helper
> and thus have it set in ~/.gitconfig
>
> For the integration
Perhaps squash these two while queuing to address comments from you two?
Thanks.
Documentation/CodingGuidelines | 3 ++-
Makefile | 18 +-
2 files changed, 11 insertions(+), 10 deletions(-)
diff --git a/Documentation/CodingGuidelines
On Wed, Feb 24, 2016 at 11:09 PM, Christian Couder
wrote:
[Resent because I was accidentally in GMail's HTML mode and the ML rejected it]
> If there was a config option called maybe "rebase.taskset" or
> "rebase.setcpuaffinity" that could be set to ask the OS for all
Ævar Arnfjörð Bjarmason writes:
> At the risk of derailing this thread, a thing that would make rebase
> even faster I think would be to change it so that instead of applying
> a patch at a time to the working tree the whole operation takes place
> on temporary trees & commits
I would like to do a shallow clone of a submodule like this:
$ git submodule add --branch master --single-branch --depth 5 repo dir
but it doesn't work. I think '--single-branch' is not yet implemented
for submodules.
With the clone command it works:
$ git clone --branch master --single-branch
Matthieu Moy writes:
> The description was misleading, since "set to any boolean value" include
> "set to false", and diff.renames=false does not enable basic detection,
> but actually disables it. Also, document that diff.renames only affects
> Porcelain.
>
>
Thanx )
On 02/25/2016 07:14 PM, Thomas Gummerer wrote:
[Please keep everyone cc'd in the conversation, especially the mailing
list. I added it back for now.
Also please don't top post on the list]
On 02/25, Olga Pshenichnikova wrote:
No, it isn't empty, but I found the problem.
Problem was
Hi, guys!
> I sent in a patch (and I believe I CC'd you) that adds an option
> http.emptyAuth that can be used in this case. It should make its way to
> a future release.
Somehow I've missed your letter...
> The patch has been queued as 121061f6 (http: add option to try
> authentication
Matthieu Moy imag.fr> writes:
> diff.renames::
> - Tells Git to detect renames. If set to any boolean value, it
> - will enable basic rename detection. If set to "copies" or
> - "copy", it will detect copies, as well.
> + Whether and how Git detects renames. If set to
The description was misleading, since "set to any boolean value" include
"set to false", and diff.renames=false does not enable basic detection,
but actually disables it. Also, document that diff.renames only affects
Porcelain.
Signed-off-by: Matthieu Moy
---
Oops, trivial
Matthieu Moy writes:
> diff --git a/Documentation/diff-config.txt b/Documentation/diff-config.txt
> index 40e5de9..69389ae 100644
> --- a/Documentation/diff-config.txt
> +++ b/Documentation/diff-config.txt
> @@ -111,7 +111,7 @@ diff.renames::
> Whether and how Git
Matthieu Moy writes:
> The description was misleading, since "set to any boolean value" include
> "set to false", and diff.renames=false does not enable basic detection,
> but actually disables it. Also, document that diff.renames only affects
> Porcelain.
>
>
On Wed, Feb 24, 2016 at 11:11 PM, Jeff King wrote:
> On Thu, Feb 25, 2016 at 02:00:36AM -0500, Jeff King wrote:
>
>> I think something like this would work:
>> [...]
>> but it does not seem to pass with your patch (even after I fixed up the
>> weird "local" thing). I think the
Stefan Beller writes:
> +int parse_submodule_update_strategy(const char *value,
> + struct submodule_update_strategy *dst)
> +{
> + free((void*)dst->command);
free((void *)dst->command);
"git tbdiff" is quite handy; it didn't spot any other lossage
Stefan Beller writes:
> @@ -1135,11 +1135,11 @@ static int pp_collect_finished(struct
> parallel_processes *pp)
> strbuf_addbuf(>buffered_output,
> >children[i].err);
> strbuf_reset(>children[i].err);
> } else {
> -
Felipe Gonçalves Assis writes:
> Matthieu Moy imag.fr> writes:
>
>> diff.renames::
>> -Tells Git to detect renames. If set to any boolean value, it
>> -will enable basic rename detection. If set to "copies" or
>> -"copy", it will detect copies, as well.
On Thu, Feb 25, 2016 at 10:06 AM, Junio C Hamano wrote:
> Stefan Beller writes:
>
>> +int parse_submodule_update_strategy(const char *value,
>> + struct submodule_update_strategy *dst)
>> +{
>> + free((void*)dst->command);
>
>
On Wed, Feb 24, 2016 at 11:11 PM, Jeff King wrote:
> static int clone_submodule(const char *path, const char *gitdir, const char
> *url,
>const char *depth, const char *reference, int
> quiet)
> {
> @@ -145,7 +166,7 @@ static int
Am 25.02.2016 um 15:21 schrieb Jeff King:
> +munge () {
> + printf "$3" | dd of="$1" bs=1 conv=notrunc seek=$2
> +}
Instead of adding another call of dd, would it be an option to insert
the following patch at the front of this series and then use
test_overwrite_bytes?
8<
From:
Signed-off-by: Ramsay Jones
---
Hi David,
No, you are not having flashbacks - you forgot to make the
register_ref_storage_backend() function static. ;-)
BTW, I still have two symbols showing as exported but not used, namely:
$ diff nsc psc1
...
On Thu, Feb 25, 2016 at 11:27 AM, David Turner wrote:
> On Thu, 2016-02-25 at 19:57 +0700, Duy Nguyen wrote:
>> A couple of build warnings I found, haven't really read the code yet.
>> These two can easily be fixed
>>
>> refs/lmdb-backend.c: In function
Signed-off-by: Ramsay Jones
---
Hi Jeff,
If you need to re-roll your 'jk/epipe-in-async' branch, could you
please squash this into the relevant patch. (ie. "write_or_die:
handle EPIPE in async threads", 24-02-2016).
Thanks!
ATB,
Ramsay Jones
run-command.c | 4
I thought it would be better in the api docs, since it's a design
decision that all backends should follow.
On Thu, 2016-02-25 at 15:05 -0500, David Turner wrote:
> Add some comments on ref transaction semantics to refs.h
>
> Signed-off-by: David Turner
> ---
> refs.h
From: Jacob Keller
Since 2.4, apache will fail to load unless mod_unixd is loaded in order
to drop privileges.
Signed-off-by: Jacob Keller
---
I am not sure why this wasn't there already, but I am unable to run
httpd 2.4.18 without it, on Fedora
From: Jacob Keller
Due to the way that the git-submodule code works, it clears all local
git environment variables before entering submodules. This is normally
a good thing since we want to clear settings such as GIT_WORKTREE and
other variables which would affect the
Add some comments on ref transaction semantics to refs.h
Signed-off-by: David Turner
---
refs.h | 12
1 file changed, 12 insertions(+)
diff --git a/refs.h b/refs.h
index c0964f5..9b3eaf3 100644
--- a/refs.h
+++ b/refs.h
@@ -112,6 +112,11 @@ extern int
On Wed, 2016-02-24 at 16:51 -0800, Junio C Hamano wrote:
> Junio C Hamano writes:
>
> > ...
> > You can of course standardize on signed int, but because this is a
> > collection of flag bits, there is no reason not to choose unsigned.
> >
> > I _think_ I can fix everything up
Signed-off-by: Ramsay Jones
---
Hi Stefan,
If you need to re-roll (err, one of your) 'sb/submodule-parallel-update'
branches, could you please squash this into the relevant patch.
(ie. "git submodule update: have a dedicated helper for cloning", 23-02-2016).
On Thu, 2016-02-25 at 19:28 +, Ramsay Jones wrote:
> Signed-off-by: Ramsay Jones
> ---
>
> Hi David,
>
> No, you are not having flashbacks - you forgot to make the
> register_ref_storage_backend() function static. ;-)
Oops! Must have lost that in all of the
Matthieu Moy writes:
> This is currently a wrapper around init_grep_defaults(), but will allow
> adding more initialization in further patches.
>
> Signed-off-by: Matthieu Moy
> ---
> builtin/log.c | 15 ++-
> 1 file changed, 10
On Thu, 2016-02-25 at 00:08 +, Ramsay Jones wrote:
> > Ramsay Jones (1):
> > refs: reduce the visibility of do_for_each_ref()
>
> Ah, sorry if it wasn't clear, but there is no need to keep this
> as a separate patch - it should simply be squashed into the relevant
> patch in your series.
>
Ramsay Jones writes:
> Signed-off-by: Ramsay Jones
> ---
>
> Hi Jeff,
>
> If you need to re-roll your 'jk/epipe-in-async' branch, could you
> please squash this into the relevant patch. (ie. "write_or_die:
> handle EPIPE in async
On Thu, Feb 25, 2016 at 9:54 AM, Alter Depp wrote:
> I would like to do a shallow clone of a submodule like this:
> $ git submodule add --branch master --single-branch --depth 5 repo dir
> but it doesn't work. I think '--single-branch' is not yet implemented for
> submodules.
>
On Thu, 2016-02-25 at 19:57 +0700, Duy Nguyen wrote:
> A couple of build warnings I found, haven't really read the code yet.
> These two can easily be fixed
>
> refs/lmdb-backend.c: In function 'lmdb_read_raw_ref':
> refs/lmdb-backend.c:554:16: warning: unused variable 'err' [-Wunused
>
Jacob Keller writes:
> On Wed, Feb 24, 2016 at 11:11 PM, Jeff King wrote:
>> static int clone_submodule(const char *path, const char *gitdir, const char
>> *url,
>>const char *depth, const char *reference, int
>> quiet)
>> {
Pranit Bauva writes:
> From c273a02fc9cab9305cedf6e37422e257a1cc3b1e Mon Sep 17 00:00:00 2001
> From: Pranit Bauva
> Date: Fri, 26 Feb 2016 07:14:18 +0530
> Subject: [PATCH/RFC] git-commit: add a commit.verbose config variable
These should not
On Thu, Feb 25, 2016 at 12:32 PM, Junio C Hamano wrote:
> Jacob Keller writes:
>
>> On Wed, Feb 24, 2016 at 11:11 PM, Jeff King wrote:
>>> static int clone_submodule(const char *path, const char *gitdir, const
>>> char *url,
>>>
David Turner writes:
> Is there some standard workflow here? I just rebased your version of
> my series (bd412fa) on top of the prior commit in pu (9db66d9), fixing
> the few conflicts. (I think there is in general something I'm missing
> about how to maintain a patch
>From c273a02fc9cab9305cedf6e37422e257a1cc3b1e Mon Sep 17 00:00:00 2001
From: Pranit Bauva
Date: Fri, 26 Feb 2016 07:14:18 +0530
Subject: [PATCH/RFC] git-commit: add a commit.verbose config variable
Since many people always run the command with this option, and would
On Thu, Feb 25, 2016 at 1:27 PM, Matthieu Moy
wrote:
>
>> +commit.verbose::
>> + A boolean to specify whether to always include the verbose option
>
> Boolean is usually written with a capital letter.
I disagree here, ("grep -riI boolean" suggestes to only
On Thu, Feb 25, 2016 at 12:31:12PM -0800, Junio C Hamano wrote:
> Johannes Sixt writes:
>
> > Am 25.02.2016 um 15:21 schrieb Jeff King:
> >> +munge () {
> >> + printf "$3" | dd of="$1" bs=1 conv=notrunc seek=$2
> >> +}
> >
> > Instead of adding another call of dd, would it be an
On Thu, Feb 25, 2016 at 12:20:12PM -0800, Junio C Hamano wrote:
> Ramsay Jones writes:
>
> > Signed-off-by: Ramsay Jones
> > ---
> >
> > Hi Jeff,
> >
> > If you need to re-roll your 'jk/epipe-in-async' branch, could you
> > please
David Turner writes:
> I thought it would be better in the api docs, since it's a design
> decision that all backends should follow.
Makes sense; as this describes an already available API, it
shouldn't have to wait for the remainder of your series and can just
go to
On Thu, Feb 25, 2016 at 10:16 AM, Junio C Hamano wrote:
> Stefan Beller writes:
>
>> @@ -1135,11 +1135,11 @@ static int pp_collect_finished(struct
>> parallel_processes *pp)
>> strbuf_addbuf(>buffered_output,
>> >children[i].err);
>>
On Thu, Feb 25, 2016 at 11:42 AM, Ramsay Jones
wrote:
>
> Signed-off-by: Ramsay Jones
> ---
>
> Hi Stefan,
>
> If you need to re-roll (err, one of your) 'sb/submodule-parallel-update'
> branches, could you please squash this into the
On Fri, Feb 26, 2016 at 2:27 AM, David Turner wrote:
> but -Wshadow produces a ton of complaints on the rest of git's
> code. We should probably fix those.
I know, but what I wrote was meant for new code only (e.g. make
refs/lmdb-backend.o CFLAGS=-Wshadow is clean). I
Johannes Sixt writes:
> Am 25.02.2016 um 15:21 schrieb Jeff King:
>> +munge () {
>> +printf "$3" | dd of="$1" bs=1 conv=notrunc seek=$2
>> +}
>
> Instead of adding another call of dd, would it be an option to insert
> the following patch at the front of this series and then
On Thu, 2016-02-25 at 12:34 -0800, Junio C Hamano wrote:
> David Turner writes:
>
> > I thought it would be better in the api docs, since it's a design
> > decision that all backends should follow.
>
> Makes sense; as this describes an already available API, it
>
On Thu, Feb 25, 2016 at 10:57:11AM -0800, Jacob Keller wrote:
> From: Jacob Keller
>
> Since 2.4, apache will fail to load unless mod_unixd is loaded in order
> to drop privileges.
>
> Signed-off-by: Jacob Keller
> ---
>
> I am not sure why
Remarks on v1 applied:
* document that diff.renames applies only to porcelain
* use <<- instead of << in tests
* rename git_diff_ui_default_config to init_diff_ui_defaults
* f() -> f(void)
Interdiff follows:
diff --git a/Documentation/diff-config.txt b/Documentation/diff-config.txt
index
The description was misleading, since "set to any boolean value" include
"set to false", and diff.renames=false does not enable basic detection,
but actually disables it. Also, document that diff.renames only affects
Porcelain.
Signed-off-by: Matthieu Moy
---
The underlying machinery is well-tested, but the configuration option
itself was tested only in t3400-rebase.sh.
Signed-off-by: Matthieu Moy
---
t/t4001-diff-rename.sh | 61 +-
1 file changed, 60 insertions(+), 1 deletion(-)
Signed-off-by: Martin Mosegaard Amdisen
---
templates/hooks--update.sample | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/templates/hooks--update.sample b/templates/hooks--update.sample
index d847583..80ba941 100755
---
From: Lars Schneider
We assume Git developers have a reasonably modern compiler and recommend
them to enable the DEVELOPER makefile knob to ensure their patches are
clear of all compiler warnings the Git core project cares about.
Enable the DEVELOPER makefile knob in
"the stupid content tracker" was true in the early days of Git, but
hardly applicable these days. "fast, scalable, distributed" describes
Git more accuralety.
Also, "stupid" can be seen as offensive by some people. Let's not use it
in the very first words of the README.
The new formulation is
This allows repository browsers like GitHub to display the content of
the file nicely formatted.
Signed-off-by: Matthieu Moy
---
README => README.md | 7 ++-
t/t7001-mv.sh | 2 +-
2 files changed, 3 insertions(+), 6 deletions(-)
rename README => README.md (93%)
Minor tweaks after discussion on v1 (for those who missed it, this
series makes README render nicely on GitHub and tries to present
important information early).
The result is here:
https://github.com/moy/git/tree/git-readme#readme
Changes since v1:
* Visible on the rendered page: resurect
The documentation available on git-scm.com is nicely formatted. It's
better to point users to it than to the source code of the
documentation.
Signed-off-by: Matthieu Moy
---
README.md | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/README.md
The explanations about why the name was chosen are secondary compared to
the description and link to the documentation.
Some consider these explanations as good computer scientists joke, but
other see it as needlessly offensive vocabulary.
This patch preserves the historical joke, but gives it
Signed-off-by: Matthieu Moy
---
README.md | 19 +--
1 file changed, 13 insertions(+), 6 deletions(-)
diff --git a/README.md b/README.md
index 600779c..e54f9e7 100644
--- a/README.md
+++ b/README.md
@@ -21,17 +21,17 @@ License version 2 (some parts of it are
Jeff King writes:
> On Tue, Feb 23, 2016 at 06:44:58PM +0100, Matthieu Moy wrote:
>
>> diff --git a/Documentation/diff-config.txt b/Documentation/diff-config.txt
>> index 1acd203..fdf5a79 100644
>> --- a/Documentation/diff-config.txt
>> +++ b/Documentation/diff-config.txt
>> @@
Rename detection is a very convenient feature, and new users shouldn't
have to dig in the documentation to benefit from it.
Potential objections to activating rename detection are that it
sometimes fail, and it is sometimes slow. But rename detection is
already activated by default in several
Signed-off-by: Matthieu Moy
---
t/t4001-diff-rename.sh | 66 ++
1 file changed, 35 insertions(+), 31 deletions(-)
diff --git a/t/t4001-diff-rename.sh b/t/t4001-diff-rename.sh
index 2f327b7..06b8828 100755
---
This is currently a wrapper around init_grep_defaults(), but will allow
adding more initialization in further patches.
Signed-off-by: Matthieu Moy
---
builtin/log.c | 15 ++-
1 file changed, 10 insertions(+), 5 deletions(-)
diff --git a/builtin/log.c
The warning was important before the 2.0 transition, and remained
important for a while after, so that new users get push.default
explicitly in their configuration and do not experience inconsistent
behavior if they ever used an older version of Git.
The warning has been there since version 1.8.0
Junio and Peff both lean towards removing the message completely, and
I think I'm convinced. We would have to do this in the future anyway.
While we're there, improve the manual for git push as suggested by
Philip Oakley.
Matthieu Moy (2):
push: remove "push.default is unset" warning message
The default behavior is well documented already in git-config(1), but
git-push(1) itself did not mention it at all. For users willing to learn
how "git push" works but not how to configure it, this makes the
documentation cumbersome to read.
Make the git-push(1) page self-contained by adding a
On 02/25, Olga Pshenichnikova wrote:
> Hello,
> we use git in our project.
> What can be cause for further confusing behavior?
>
> git@ip5server:~$ git status
> On branch master
> Untracked files:
> (use "git add ..." to include in what will be committed)
>
>
On 02/25/2016 09:42 AM, larsxschnei...@gmail.com wrote:
> From: Lars Schneider
>
> We assume Git developers have a reasonably modern compiler and recommend
> them to enable the DEVELOPER makefile knob to ensure their patches are
> clear of all compiler warnings the Git
Use the argv_array in the child_process structure, to avoid having to
manually maintain an array size.
Signed-off-by: Michael Procter
---
upload-pack.c | 25 +++--
1 file changed, 11 insertions(+), 14 deletions(-)
diff --git a/upload-pack.c
On Wed, Feb 24, 2016 at 04:38:11PM -0700, Bill Okara wrote:
> Hi,
>
> I noticed the following 'git mv' issue with:
> git version 2.6.4
>
>
> If there are identical files in different subfolders, 'git mv' the
> root folder (and/or each file individually) will mess up the file path
> mapping.
A couple of build warnings I found, haven't really read the code yet.
These two can easily be fixed
refs/lmdb-backend.c: In function 'lmdb_read_raw_ref':
refs/lmdb-backend.c:554:16: warning: unused variable 'err' [-Wunused-variable]
struct strbuf err = STRBUF_INIT;
^
* Don't capitalize error strings
* Report true paths of affected files
Signed-off-by: Michael Haggerty
---
refs/files-backend.c | 7 ---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/refs/files-backend.c b/refs/files-backend.c
index 2cb402d..ed29b3b
This is the standard nomenclature.
Signed-off-by: Michael Haggerty
---
refs/files-backend.c | 8
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/refs/files-backend.c b/refs/files-backend.c
index bd25ae2..543fd8e 100644
--- a/refs/files-backend.c
+++
When deleting/pruning references, remove any directories that are made
empty by the deletion of loose references or of reflogs. Otherwise such
empty directories can survive forever and accumulate over time. (Even
'pack-refs', which is smart enough to remove the parent directories of
loose
Besides shortening the code, this saves an unnecessary call to
safe_create_leading_directories_const() in almost all cases.
Signed-off-by: Michael Haggerty
---
refs/files-backend.c | 76 ++--
1 file changed, 32 insertions(+),
Add a new "flags" parameter that tells the function whether to remove
empty parent directories of the loose reference file, of the reflog
file, or both. The new functionality is not yet used.
Signed-off-by: Michael Haggerty
---
refs/files-backend.c | 24
Now log_ref_write_1() doesn't do anything, so inline it.
Signed-off-by: Michael Haggerty
---
refs/files-backend.c | 29 +++--
1 file changed, 11 insertions(+), 18 deletions(-)
diff --git a/refs/files-backend.c b/refs/files-backend.c
index
It is simpler to derive the path to the file that must be deleted from
"lock->ref_name" than from the lock_file object.
Signed-off-by: Michael Haggerty
---
refs/files-backend.c | 5 +
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/refs/files-backend.c
This re-roll addresses a few minor points that were brought up about v1 [1]:
* "safe_create_leading_directories(): set errno on SCLD_EXISTS":
* Set errno to ENOTDIR rather than EEXIST.
* "raceproof_create_file(): new function":
* Improve comments.
* "rename_tmp_log(): use
Instead of coding the retry loop inline, use raceproof_create_file() to
make lock acquisition safe against directory creation/deletion races.
Signed-off-by: Michael Haggerty
---
refs/files-backend.c | 47 +++
1 file changed, 19
Instead of writing the name of the reflog file into a strbuf that is
supplied by the caller but not needed there, write it into a local
temporary buffer and remove the strbuf parameter entirely.
And while we're adjusting the function signature, reorder the arguments
to move the input parameters
Instead of looking on the filesystem inside ".git/refs/remotes/origin",
use "git for-each-ref" to check for leftover references under the
remote's old name.
Signed-off-by: Michael Haggerty
---
t/t5505-remote.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff
It was hardly doing anything anymore.
Signed-off-by: Michael Haggerty
---
refs/files-backend.c | 25 +++--
1 file changed, 7 insertions(+), 18 deletions(-)
diff --git a/refs/files-backend.c b/refs/files-backend.c
index 7e825bd..b137171 100644
---
Add a function that tries to create a file and any containing
directories in a way that is robust against races with other processes
that might be cleaning up empty directories at the same time.
The actual file creation is done by a callback function, which, if it
fails, should set errno to
Change log_ref_setup() to use raceproof_create_file() to create the new
logfile. This makes it more robust against a race against another
process that might be trying to clean up empty directories while we are
trying to create a new logfile.
This also means that it will only call
It's unnecessary to pass a strbuf holding the reflog path up and down
the call stack now that it is hardly needed by the callers. Remove the
places where log_ref_write_1() uses it, in preparation for making it
internal to log_ref_setup().
Signed-off-by: Michael Haggerty
---
The behavior of this function (especially how it handles errors) is
quite different depending on whether we are willing to create the reflog
vs. whether we are only trying to open an existing reflog. So separate
the code paths.
This also simplifies the next steps.
Signed-off-by: Michael Haggerty
Theoretically, free() is allowed to change errno. So preserve the errno
from safe_create_leading_directories() across the call to free().
Signed-off-by: Michael Haggerty
---
sha1_file.c | 4
1 file changed, 4 insertions(+)
diff --git a/sha1_file.c b/sha1_file.c
index
“pattern” and “exclude” are two structs defined in attr.c and dir.h
respectively. Each contains a field named “flags” of type int, that
takes on values from the set of positive integers {1, 4, 8, 16}
enumerated through the macro EXC_FLAG_*.
That the most significant bit (used to store the sign)
On Wed, Feb 24, 2016 at 10:48:27AM -0800, Junio C Hamano wrote:
> >> We do not check if the offset of individual objects are within the
> >> corresponding .pack file, either, and nth_packed_object_offset()
> >> does return the data read from .idx file that is not checked for
> >> sanity.
This series teaches Git to detect a few problems with corrupted .idx
files, and adds tests for some more cases. There's conceptually some
overlap with t5300, but I don't think it was covering any of these cases
explicitly.
There are two real bugs that could cause segfaults or bus errors via
A v2 pack index file can specify an offset within a packfile
of up to 2^64-1 bytes. On a system with a signed 64-bit
off_t, we can represent only up to 2^63-1. This means that a
corrupted .idx file can end up with a negative offset in the
pack code. Our bounds-checking use_pack function looks for
"refname" has already been checked by check_refname_format(), so it
cannot have consecutive slashes.
Signed-off-by: Michael Haggerty
---
refs/files-backend.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/refs/files-backend.c
1 - 100 of 207 matches
Mail list logo