Hi Brian,
On Mon, Nov 05, 2018 at 08:56:52PM +, brian m. carlson wrote:
> In a272b9e70a ("urlmatch: allow globbing for the URL host part",
> 2017-01-31), we added support for wildcard matching for URLs when
> reading from .git/config. Now it's possible to specify an option like
> http.http://
On Mon, Sep 24, 2018 at 11:32:23PM +0200, SZEDER Gábor wrote:
> On Mon, Sep 24, 2018 at 02:15:30PM -0700, Derrick Stolee via GitGitGadget
> wrote:
> > From: Derrick Stolee
> >
> > The index v4 format has been available since 2012 with 9d22778
> > "reach-cache.c: write prefix-compressed names in
> Hi Patrick,
>
> libgit2 tasks are welcome! Feel free to bring your ideas
> along. Also, Peff could add some to the task list if they are
> appropriate for others to participate on.
That's nice. I don't want to populate the list with too much
libgit2 specific things, but we do have a summary a
On Wed, Nov 01, 2017 at 04:36:24PM +, Thomas Gummerer wrote:
> Hi,
>
> Bloomberg is hosting an Open Source Weekend in London on the 11th
> & 12th November 2017 to contribute to the Git project. We have
> also confirmed that Peff will be amongst the mentors on hand to
> guide attendees through
which the command is being run.
Fix the shortcoming by storing the prefix previous to the call to
`cd_to_toplevel` and then subsequently using `git rev-parse --prefix` to
correctly resolve the pathspec. Add a test to catch future breakage of
this usecase.
Signed-off-by: Patrick Steinhardt
On Tue, Apr 04, 2017 at 11:16:56AM +0200, Patrick Steinhardt wrote:
> Previous to commit 5d8f084a5 (pathspec: simpler logic to prefix original
> pathspec elements, 2017-01-04), we were always using the computed
> `match` variable to perform pathspec matching whenever
> `PATHSPEC_PREFI
On Mon, Apr 03, 2017 at 09:26:48AM -0700, Brandon Williams wrote:
> On 04/03, Patrick Steinhardt wrote:
> > Previous to commit 5d8f084a5 (pathspec: simpler logic to prefix original
> > pathspec elements, 2017-01-04), we were always using the computed
> > `match` variabl
y to other commands, it
will result in a warning regarding deprecated empty pathspecs. By always
adding the prefix magic, we will end up with at least the string
":(prefix:0)" and thus avoid the warning.
Signed-off-by: Patrick Steinhardt
---
This is the second version of [1]. It fixes a bu
xes interactive add.
Signed-off-by: Patrick Steinhardt
---
pathspec.c | 6 +++---
t/t3701-add-interactive.sh | 20
2 files changed, 23 insertions(+), 3 deletions(-)
diff --git a/pathspec.c b/pathspec.c
index 303efda83..3193e45a6 100644
--- a/pathspec.c
+++ b/path
or our generated HTML pages.
So fix the issue by simply dropping quotes inside of section headers,
which is currently only done for the term "Complete Rewrites".
Signed-off-by: Patrick Steinhardt
---
The obvious other route here would be to fix how the stylesheets
handle quoting inside
Signed-off-by: Patrick Steinhardt
---
Documentation/gitdiffcore.txt | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Documentation/gitdiffcore.txt b/Documentation/gitdiffcore.txt
index 46bc6d077..cf009a187 100644
--- a/Documentation/gitdiffcore.txt
+++ b/Documentation
In commit 07e7dbf0d (gc: default aggressive depth to 50, 2016-08-11),
the default aggressive depth of git-gc has been changed to 50. While
git-config(1) has been updated to represent the new default value,
git-gc(1) still mentions the old value. This patch fixes it.
Signed-off-by: Patrick
-off-by: Patrick Steinhardt
---
builtin/worktree.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/builtin/worktree.c b/builtin/worktree.c
index 9a97e37a3..831fe058a 100644
--- a/builtin/worktree.c
+++ b/builtin/worktree.c
@@ -125,9 +125,9 @@ static int prune(int ac, const
On Tue, Jan 31, 2017 at 02:45:40PM -0800, Junio C Hamano wrote:
> * ps/urlmatch-wildcard (2017-01-31) 5 commits
> . urlmatch: allow globbing for the URL host part
> . urlmatch: include host in urlmatch ranking
> . urlmatch: split host and port fields in `struct url_info`
> . urlmatch: enable no
had an embarassing bug because a variable
was not properly initialized in all cases, leading to undefined
behavior. I also verified that the patches work on top of
4e59582ff (Seventh batch for 2.12, 2017-01-23), where Junio
reported the test failures.
Regards
Patrick
Patrick Steinhardt (5
From: Patrick Steinhardt
The `url_normalize` function is used to validate and normalize URLs. As
such, it does not allow for some special characters to be part of the
URLs that are to be normalized. As we want to allow using globs in some
configuration keys making use of URLs, namely `http
From: Patrick Steinhardt
In order to be able to rank positive matches by `urlmatch`, we inspect
the path length and user part to decide whether a match is better than
another match. As all other parts are matched exactly between both URLs,
this is the correct thing to do right now.
In the
From: Patrick Steinhardt
Signed-off-by: Patrick Steinhardt
---
.mailmap | 1 +
1 file changed, 1 insertion(+)
diff --git a/.mailmap b/.mailmap
index 9c87a3840..ea59205b9 100644
--- a/.mailmap
+++ b/.mailmap
@@ -177,6 +177,7 @@ Paolo Bonzini
Pascal Obry
Pascal Obry
Pat Notz
+Patrick
From: Patrick Steinhardt
The `url_info` structure contains information about a normalized URL
with the URL's components being represented by different fields. The
host and port part though are to be accessed by the same `host` field,
so that getting the host and/or port separately becomes
From: Patrick Steinhardt
The URL matching function computes for two URLs whether they match not.
The match is performed by splitting up the URL into different parts and
then doing an exact comparison with the to-be-matched URL.
The main user of `urlmatch` is the configuration subsystem. It
On Mon, Jan 30, 2017 at 02:52:00PM -0800, Junio C Hamano wrote:
> Junio C Hamano writes:
>
> > Patrick Steinhardt writes:
> >
> >> - I realized that with my patches, "ranking" of URLs was broken.
> >>Previously, we've always taken the lo
m.proxy"; sets "http.proxy" for all direct
subdomains of "https://example.com";, e.g. "https://foo.example.com";, but
not "https://foo.bar.example.com";.
Signed-off-by: Patrick Steinhardt
Helped-by: Junio
subsequently called by `url_normalize`
with `allow_globs=0`.
As of now, this function is not used with globbing enabled. A caller
will be added in the following commit.
Signed-off-by: Patrick Steinhardt
---
urlmatch.c | 14 --
1 file changed, 12 insertions(+), 2 deletions(-)
diff --git
introduce wild cards for the domain
part. When doing this, though, it does not make sense anymore to only
compare the path lengths. Instead, we also want to compare the domain
lengths to determine which of both URLs matches the host part more
closely.
Signed-off-by: Patrick Steinhardt
---
t/t1300-repo
This change makes it
easier later on to treat host and port differently when introducing
globs for domains.
Signed-off-by: Patrick Steinhardt
---
urlmatch.c | 16
urlmatch.h | 9 +
2 files changed, 17 insertions(+), 8 deletions(-)
diff --git a/urlmatch.c b/urlmatch.c
-rules
are actually honored correctly. The tests are part of patches
4 and 5.
You can find the interdiff below.
Regards
Patrick
[1]:
http://public-inbox.org/git/20170125095648.4116-1-patrick.steinha...@elego.de/T/#t
Patrick Steinhardt (5):
mailmap: add Patrick Steinhardt's work address
Signed-off-by: Patrick Steinhardt
---
.mailmap | 1 +
1 file changed, 1 insertion(+)
diff --git a/.mailmap b/.mailmap
index 9c87a3840..ea59205b9 100644
--- a/.mailmap
+++ b/.mailmap
@@ -177,6 +177,7 @@ Paolo Bonzini
Pascal Obry
Pascal Obry
Pat Notz
+Patrick Steinhardt
Paul
On Thu, Jan 26, 2017 at 12:43:31PM -0800, Junio C Hamano wrote:
> Patrick Steinhardt writes:
>
> > The URL matching function computes for two URLs whether they match not.
> > The match is performed by splitting up the URL into different parts and
> > then doing an exact c
On Tue, Jan 24, 2017 at 05:52:39PM -, Philip Oakley wrote:
> From: "Patrick Steinhardt"
>
> a quick comment on the documentation part ..
>
> > The URL matching function computes for two URLs whether they match not.
> > The match is performed by splitting u
This change makes it
easier later on to treat host and port differently when introducing
globs for domains.
Signed-off-by: Patrick Steinhardt
---
urlmatch.c | 16
urlmatch.h | 9 +
2 files changed, 17 insertions(+), 8 deletions(-)
diff --git a/urlmatch.c b/urlmatch.c
example adding a configuration
key `http.https://*.example.com.proxy` will match all subdomains of
`https://example.com`.
Signed-off-by: Patrick Steinhardt
---
Documentation/config.txt | 5 -
t/t1300-repo-config.sh | 36
urlmatch.c | 38
Signed-off-by: Patrick Steinhardt
---
.mailmap | 1 +
1 file changed, 1 insertion(+)
diff --git a/.mailmap b/.mailmap
index 9c87a3840..ea59205b9 100644
--- a/.mailmap
+++ b/.mailmap
@@ -177,6 +177,7 @@ Paolo Bonzini
Pascal Obry
Pascal Obry
Pat Notz
+Patrick Steinhardt
Paul
subsequently called by `url_normalize`
with `allow_globs=0`.
As of now, this function is not used with globbing enabled. A caller
will be added in the following commit.
Signed-off-by: Patrick Steinhardt
---
urlmatch.c | 14 --
1 file changed, 12 insertions(+), 2 deletions(-)
diff --git
can find the interdiff below.
Regards
Patrick
[1]:
http://public-inbox.org/git/20170124170031.18069-1-patrick.steinha...@elego.de/T/#u
Patrick Steinhardt (4):
mailmap: add Patrick Steinhardt's work address
urlmatch: enable normalization of URLs with globs
urlmatch: split host and
lude an interdiff as too much has changed between
the two versions.
Regards
Patrick
Patrick Steinhardt (4):
mailmap: add Patrick Steinhardt's work address
urlmatch: enable normalization of URLs with globs
urlmatch: split host and port fields in `struct url_info`
urlmatch: allow globb
example adding a configuration
key `http.https://*.example.com.proxy` will match all subdomains of
`https://example.com`.
Signed-off-by: Patrick Steinhardt
---
Documentation/config.txt | 5 -
t/t1300-repo-config.sh | 36
urlmatch.c | 38
subsequently called by `url_normalize`
with `allow_globs=0`.
As of now, this function is not used with globbing enabled. A caller
will be added in the following commit.
Signed-off-by: Patrick Steinhardt
---
urlmatch.c | 14 --
1 file changed, 12 insertions(+), 2 deletions(-)
diff --git
This change makes it
easier later on to treat host and port differently when introducing
globs for domains.
Signed-off-by: Patrick Steinhardt
---
urlmatch.c | 16
urlmatch.h | 9 +
2 files changed, 17 insertions(+), 8 deletions(-)
diff --git a/urlmatch.c b/urlmatch.c
Signed-off-by: Patrick Steinhardt
---
.mailmap | 1 +
1 file changed, 1 insertion(+)
diff --git a/.mailmap b/.mailmap
index 9c87a3840..ea59205b9 100644
--- a/.mailmap
+++ b/.mailmap
@@ -177,6 +177,7 @@ Paolo Bonzini
Pascal Obry
Pascal Obry
Pat Notz
+Patrick Steinhardt
Paul
On Mon, Jan 23, 2017 at 11:53:43AM -0800, Junio C Hamano wrote:
> Patrick Steinhardt writes:
>
> > This patch is mostly a request for comments. The use case is to
> > be able to configure an HTTP proxy for all subdomains of a
> > certain domain where there are hundreds
Signed-off-by: Patrick Steinhardt
---
.mailmap | 1 +
1 file changed, 1 insertion(+)
diff --git a/.mailmap b/.mailmap
index 9c87a3840..ea59205b9 100644
--- a/.mailmap
+++ b/.mailmap
@@ -177,6 +177,7 @@ Paolo Bonzini
Pascal Obry
Pascal Obry
Pat Notz
+Patrick Steinhardt
Paul
n
exact matches.
Signed-off-by: Patrick Steinhardt
---
Documentation/config.txt | 6 -
t/t1300-repo-config.sh | 31 ++
urlmatch.c | 57 ++--
3 files changed, 81 insertions(+), 13 deletions(-)
diff --git a/Documenta
an be
by having the '?' prefix. Older clients will barf when trying to
normalize the URL as '?' is not in the set of allowed characters
for a URL, and for newer clients there will be no change in
behavior for previously configured `http..*` keys.
Regards
Patrick Steinhardt
Pat
reside at
"$GIT_COMMON_DIR/index".
Fix the typo to point to "$GIT_COMMON_DIR/info/" instead.
Signed-off-by: Patrick Steinhardt
---
Documentation/gitrepository-layout.txt | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Documentation/gitreposito
worktree", "git checkout" attempts to protect users from confusion
>by refusing to check out a branch that is already checked out in
>another worktree. However, this also prevented checking out a
>branch, which is designated as the primary branch of a bare
On Tue, Jun 28, 2016 at 02:13:49PM -0700, Junio C Hamano wrote:
> Matthieu Moy writes:
>
> > It is "interesting" if you mean "matches real-life use-case", as it
> > corresponds to the case where the user killed the editor (as reported by
> > Daniel Hahler indeed, "Abort with ":cq", which will mak
the issue by trying to re-apply the autostash in `die_abort`.
This will also handle the case where the autostash does not apply
cleanly anymore by recording it in a user-visible stash.
Reported-by: Daniel Hahler
Signed-off-by: Patrick Steinhardt
---
The original bug-report can be found at [1
the issue by trying to re-apply the autostash in `die_abort`.
This will also handle the case where the autostash does not apply
cleanly anymore by recording it in a user-visible stash.
Reported-by: Daniel Hahler
Signed-off-by: Patrick Steinhardt
---
git-rebase--interactive.sh | 1 +
t/t3420
On Sat, Apr 09, 2016 at 01:39:05PM -0400, Jeff King wrote:
> On Sat, Apr 09, 2016 at 09:02:38AM +0200, Tom G. Christensen wrote:
>
> > I've finished testing 2.8.1 and I found one more case where a null is being
> > printed and causing a segfault. This happens even on Solaris 8 and 9.
> > The faill
leak by also releasing allocated memory related
to the first file.
Helped-by: Johannes Schindelin
Signed-off-by: Patrick Steinhardt
---
xdiff/xmerge.c | 9 +++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/xdiff/xmerge.c b/xdiff/xmerge.c
index d98f430..f338ad6 100644
--- a
On Tue, Feb 23, 2016 at 11:09:50AM +0100, Johannes Schindelin wrote:
> Hi Patrick,
>
> On Tue, 23 Feb 2016, Patrick Steinhardt wrote:
>
> > When building the script for the second file that is to be merged
> > we have already allocated memory for data structures relat
leak by also releasing allocated memory related
to the first file.
Signed-off-by: Patrick Steinhardt
---
xdiff/xmerge.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/xdiff/xmerge.c b/xdiff/xmerge.c
index d98f430..d04eb46 100644
--- a/xdiff/xmerge.c
+++ b/xdiff/xmerge.c
@@ -654,6 +654,8
error
message but continue the program as usual.
Signed-off-by: Patrick Steinhardt
---
branch.c | 50 --
branch.h | 3 ++-
t/t3200-branch.sh | 9 -
3 files changed, 46 insertions(+), 16 deletions(-)
diff --git a
-off-by: Patrick Steinhardt
---
builtin/branch.c| 6 +++---
builtin/clone.c | 8
builtin/init-db.c | 20 ++--
builtin/remote.c| 32
builtin/submodule--helper.c | 4 ++--
cache.h
Signed-off-by: Patrick Steinhardt
---
builtin/branch.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/builtin/branch.c b/builtin/branch.c
index 0978287..c043cfc 100644
--- a/builtin/branch.c
+++ b/builtin/branch.c
@@ -570,7 +570,6 @@ static const char edit_description
.
Fix this by dying with an error message when we cannot unset the
configuration.
Signed-off-by: Patrick Steinhardt
---
builtin/branch.c | 4 ++--
t/t3200-branch.sh | 7 +++
2 files changed, 9 insertions(+), 2 deletions(-)
diff --git a/builtin/branch.c b/builtin/branch.c
index 3f6c825
When calling `git_config_set` to set 'core.precomposeunicode' we
ignore the return value of the function, which may indicate that
we were unable to write the value back to disk. As the function
is only called by init-db we can and should die when an error
occurs.
Signed-off-by: Patrick
files to disk.
Signed-off-by: Patrick Steinhardt
---
builtin/clone.c | 8
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/builtin/clone.c b/builtin/clone.c
index bcba080..164038a 100644
--- a/builtin/clone.c
+++ b/builtin/clone.c
@@ -786,12 +786,12 @@ static void
this may lead us to
fail when trying to continue the sequence the error can be fatal.
Fix this by dying immediately when we are unable to write back
any replay option.
Signed-off-by: Patrick Steinhardt
---
sequencer.c | 22 +++---
1 file changed, 11 insertions(+), 11 deletions
When manipulating remotes we try to set various configuration
values without checking if the values were persisted correctly,
possibly leaving the remote in an inconsistent state.
Fix this issue by dying early and notifying the user about the
error.
Signed-off-by: Patrick Steinhardt
he program.
Signed-off-by: Patrick Steinhardt
---
builtin/submodule--helper.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/builtin/submodule--helper.c b/builtin/submodule--helper.c
index f4c3eff..c7e1ea2 100644
--- a/builtin/submodule--helper.c
+++ b/builtin/submodule--helper.c
some code may rely on the actual return values for
`git_config_set` we still require the ability to invoke these
functions without aborting. Rename the existing `git_config_set`
functions to `git_config_set_gently` to keep them available for
those callers.
Signed-off-by: Patrick Steinhardt
unable to write the configuration files to disk.
Signed-off-by: Patrick Steinhardt
---
builtin/init-db.c | 20 ++--
1 file changed, 10 insertions(+), 10 deletions(-)
diff --git a/builtin/init-db.c b/builtin/init-db.c
index 07229d6..ef19048 100644
--- a/builtin/init-db.c
+++ b
-off-by: Patrick Steinhardt
---
builtin/remote.c | 11 ++-
t/t5505-remote.sh | 9 +
2 files changed, 15 insertions(+), 5 deletions(-)
diff --git a/builtin/remote.c b/builtin/remote.c
index 2b2ff9b..8b78c3d 100644
--- a/builtin/remote.c
+++ b/builtin/remote.c
@@ -1583,11 +1583,12
have been set without
notifying the user.
Fix this issue by dying early on configuration error.
Signed-off-by: Patrick Steinhardt
---
builtin/remote.c | 26 +-
1 file changed, 9 insertions(+), 17 deletions(-)
diff --git a/builtin/remote.c b/builtin/remote.c
index 8b78c3d
ure to
the user.
Signed-off-by: Patrick Steinhardt
---
submodule.c | 8 +++-
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/submodule.c b/submodule.c
index b83939c..589a82c 100644
--- a/submodule.c
+++ b/submodule.c
@@ -1087,11 +1087,9 @@ void connect_work_tree_and_git_dir(
. These wrappers are temporary only to ease the transition
to let `git_config_set` die by default. They will be removed
later on when `git_config_set` itself has been replaced by
`git_config_set_gently`.
Signed-off-by: Patrick Steinhardt
---
cache.h | 4
config.c | 27
die("core.precomposeunicode",
- precomposed_unicode ? "true" : "false");
+ git_config_set("core.precomposeunicode",
+ precomposed_unicode ? "true" : "false");
git_path_buf(&path, "%s&
On Tue, Feb 16, 2016 at 12:15:35PM -0500, Eric Sunshine wrote:
> On Tue, Feb 16, 2016 at 7:56 AM, Patrick Steinhardt wrote:
> > [...]
> > Junio pointed out that it might not always be the most sensible
> > thing to die when install_branch_config fails. After thinking
>
On Tue, Feb 16, 2016 at 03:07:55PM -0800, Junio C Hamano wrote:
> Patrick Steinhardt writes:
>
> > if (rebasing) {
> > strbuf_reset(&key);
> > strbuf_addf(&key, "branch.%s.rebase", local);
> > - git
On Wed, Feb 17, 2016 at 10:14:57AM +0100, Lars Schneider wrote:
>
> On 16 Feb 2016, at 13:56, Patrick Steinhardt wrote:
>
> > When calling `git_config_set` to set 'core.precomposeunicode' we
> > ignore the return value of the function, which may indicate that
local" as downstream to branch "remote"
* from remote "origin". Used by git branch --set-upstream.
- * Dies if unable to install branch config.
+ * Returns 0 on success.
*/
#define BRANCH_CONFIG_VERBOSE 01
-extern void install_branch_config(int flag, const char *l
unable to write the configuration files to disk.
Signed-off-by: Patrick Steinhardt
---
builtin/init-db.c | 20 ++--
1 file changed, 10 insertions(+), 10 deletions(-)
diff --git a/builtin/init-db.c b/builtin/init-db.c
index 07229d6..ef19048 100644
--- a/builtin/init-db.c
+++ b
ure to
the user.
Signed-off-by: Patrick Steinhardt
---
submodule.c | 8 +++-
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/submodule.c b/submodule.c
index b83939c..589a82c 100644
--- a/submodule.c
+++ b/submodule.c
@@ -1087,11 +1087,9 @@ void connect_work_tree_and_git_dir(
error
message but continue the program as usual.
Signed-off-by: Patrick Steinhardt
---
branch.c | 45 +++--
branch.h | 3 ++-
t/t3200-branch.sh | 9 -
3 files changed, 41 insertions(+), 16 deletions(-)
diff --git a/branch.c b
Signed-off-by: Patrick Steinhardt
---
builtin/branch.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/builtin/branch.c b/builtin/branch.c
index 0978287..c043cfc 100644
--- a/builtin/branch.c
+++ b/builtin/branch.c
@@ -570,7 +570,6 @@ static const char edit_description
this may lead us to
fail when trying to continue the sequence the error can be fatal.
Fix this by dying immediately when we are unable to write back
any replay option.
Signed-off-by: Patrick Steinhardt
---
sequencer.c | 22 +++---
1 file changed, 11 insertions(+), 11 deletions
he program.
Signed-off-by: Patrick Steinhardt
---
builtin/submodule--helper.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/builtin/submodule--helper.c b/builtin/submodule--helper.c
index f4c3eff..c7e1ea2 100644
--- a/builtin/submodule--helper.c
+++ b/builtin/submodule--helper.c
files to disk.
Signed-off-by: Patrick Steinhardt
---
builtin/clone.c | 8
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/builtin/clone.c b/builtin/clone.c
index bcba080..164038a 100644
--- a/builtin/clone.c
+++ b/builtin/clone.c
@@ -786,12 +786,12 @@ static void
-off-by: Patrick Steinhardt
---
builtin/remote.c | 11 ++-
t/t5505-remote.sh | 9 +
2 files changed, 15 insertions(+), 5 deletions(-)
diff --git a/builtin/remote.c b/builtin/remote.c
index 2b2ff9b..8b78c3d 100644
--- a/builtin/remote.c
+++ b/builtin/remote.c
@@ -1583,11 +1583,12
some code may rely on the actual return values for
`git_config_set` we still require the ability to invoke these
functions without aborting. Rename the existing `git_config_set`
functions to `git_config_set_gently` to keep them available for
those callers.
Signed-off-by: Patrick Steinhardt
When manipulating remotes we try to set various configuration
values without checking if the values were persisted correctly,
possibly leaving the remote in an inconsistent state.
Fix this issue by dying early and notifying the user about the
error.
Signed-off-by: Patrick Steinhardt
. These wrappers are temporary only to ease the transition
to let `git_config_set` die by default. They will be removed
later on when `git_config_set` itself has been replaced by
`git_config_set_gently`.
Signed-off-by: Patrick Steinhardt
---
cache.h | 4
config.c | 27
-off-by: Patrick Steinhardt
---
builtin/branch.c| 6 +++---
builtin/clone.c | 8
builtin/init-db.c | 20 ++--
builtin/remote.c| 32
builtin/submodule--helper.c | 4 ++--
cache.h
have been set without
notifying the user.
Fix this issue by dying early on configuration error.
Signed-off-by: Patrick Steinhardt
---
builtin/remote.c | 26 +-
1 file changed, 9 insertions(+), 17 deletions(-)
diff --git a/builtin/remote.c b/builtin/remote.c
index 8b78c3d
When calling `git_config_set` to set 'core.precomposeunicode' we
ignore the return value of the function, which may indicate that
we were unable to write the value back to disk. As the function
is only called by init-db we can and should die when an error
occurs.
Signed-off-by: Patrick
.
Fix this by dying with an error message when we cannot unset the
configuration.
Signed-off-by: Patrick Steinhardt
---
builtin/branch.c | 4 ++--
t/t3200-branch.sh | 7 +++
2 files changed, 9 insertions(+), 2 deletions(-)
diff --git a/builtin/branch.c b/builtin/branch.c
index 3f6c825
On Tue, Feb 02, 2016 at 01:45:50PM -0500, Eric Sunshine wrote:
> On Tue, Feb 2, 2016 at 6:51 AM, Patrick Steinhardt wrote:
> > When setting the 'core.worktree' option for a newly cloned
> > submodule we ignore the return value of `git_config_set_in_file`.
> > As
On Mon, Feb 08, 2016 at 02:42:32PM +0100, Patrick Steinhardt wrote:
> On Tue, Feb 02, 2016 at 12:49:26PM -0800, Junio C Hamano wrote:
> > Patrick Steinhardt writes:
> >
> > > The setup_tracking function calls install_branch_config, which
> > > may fail writing
On Tue, Feb 02, 2016 at 12:49:26PM -0800, Junio C Hamano wrote:
> Patrick Steinhardt writes:
>
> > The setup_tracking function calls install_branch_config, which
> > may fail writing the configuration due to a locked configuration
> > file or other error conditions. setu
On Tue, Feb 02, 2016 at 12:58:42PM -0800, Junio C Hamano wrote:
> Patrick Steinhardt writes:
>
> > Patrick Steinhardt (15):
> > config: introduce set_or_die wrappers
> > branch: die on error in setting up tracking branch
> > branch: die on config error when u
On Tue, Feb 02, 2016 at 12:51:48PM +0100, Patrick Steinhardt wrote:
> When invoking `git-remote --set-url` we do not check the return
> value when writing the actual new URL to the configuration file,
> pretending to the user that the configuration has been set while
> it was in fact n
unable to write the configuration files to disk.
Signed-off-by: Patrick Steinhardt
---
builtin/init-db.c | 20 ++--
1 file changed, 10 insertions(+), 10 deletions(-)
diff --git a/builtin/init-db.c b/builtin/init-db.c
index 07229d6..ef19048 100644
--- a/builtin/init-db.c
+++ b
When manipulating remotes we try to set various configuration
values without checking if the values were persisted correctly,
possibly leaving the remote in an inconsistent state.
Fix this issue by dying early and notifying the user about the
error.
Signed-off-by: Patrick Steinhardt
have been set without
notifying the user.
Fix this issue by dying early on configuration error.
Signed-off-by: Patrick Steinhardt
---
builtin/remote.c | 26 +-
1 file changed, 9 insertions(+), 17 deletions(-)
diff --git a/builtin/remote.c b/builtin/remote.c
index 8b78c3d
some code may rely on the actual return values for
`git_config_set` we still require the ability to invoke these
functions without aborting. Rename the existing `git_config_set`
functions to `git_config_set_gently` to keep them available for
those callers.
Signed-off-by: Patrick Steinhardt
-off-by: Patrick Steinhardt
---
branch.c| 6 +++---
builtin/branch.c| 6 +++---
builtin/clone.c | 8
builtin/init-db.c | 20 ++--
builtin/remote.c| 32
builtin/submodule
When calling `git_config_set` to set 'core.precomposeunicode' we
ignore the return value of the function, which may indicate that
we were unable to write the value back to disk. As the function
is only called by init-db we can and should die when an error
occurs.
Signed-off-by: Patrick
this may lead us to
fail when trying to continue the sequence the error can be fatal.
Fix this by dying immediately when we are unable to write back
any replay option.
Signed-off-by: Patrick Steinhardt
---
sequencer.c | 22 +++---
1 file changed, 11 insertions(+), 11 deletions
files to disk.
Signed-off-by: Patrick Steinhardt
---
builtin/clone.c | 8
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/builtin/clone.c b/builtin/clone.c
index 81e238f..f2a2f9a 100644
--- a/builtin/clone.c
+++ b/builtin/clone.c
@@ -786,12 +786,12 @@ static void
1 - 100 of 190 matches
Mail list logo