Re: Virtual Git Contributor Summit

2019-07-06 Thread Rohit Ashiwal
Hi Philip

On 2019-07-05 14:09 UTC Philip Oakley  wrote:
>
> Will there also be an opportunity for a listen/read -only mode for those
> of us on the lower reaches of the contributor list? I'd certainly like
> to at least keep up with progress.

+1

It'd really be a nice addition if contributors, like us (the new ones),
can get a nice audio feed.

Best
Rohit



[PATCH] ci/lib.sh: update a comment about installed P4 and Git-LFS versions

2019-07-06 Thread SZEDER Gábor
A comment 'ci/lib.sh' claims that the "OS X build installs the latest
available versions" of P4 and Git-LFS, but since 02373e56bd (ci: don't
update Homebrew, 2019-07-03) that's no longer the case, as it will
install the versions which were recorded in the image's Homebrew
database when the image was created.

Update this comment accordingly.

Signed-off-by: SZEDER Gábor 
---
 ci/lib.sh | 6 --
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/ci/lib.sh b/ci/lib.sh
index 288a5b3884..0c7171a173 100755
--- a/ci/lib.sh
+++ b/ci/lib.sh
@@ -163,8 +163,10 @@ linux-clang|linux-gcc)
export GIT_TEST_HTTPD=YesPlease
 
# The Linux build installs the defined dependency versions below.
-   # The OS X build installs the latest available versions. Keep that
-   # in mind when you encounter a broken OS X build!
+   # The OS X build installs much more recent versions, whichever
+   # were recorded in the Homebrew database upon creating the OS X
+   # image.
+   # Keep that in mind when you encounter a broken OS X build!
export LINUX_P4_VERSION="16.2"
export LINUX_GIT_LFS_VERSION="1.5.2"
 
-- 
2.22.0.667.g5c3548c1fe



[PATCH v1.1] ci/lib.sh: update a comment about installed P4 and Git-LFS versions

2019-07-06 Thread SZEDER Gábor
A comment in 'ci/lib.sh' claims that the "OS X build installs the
latest available versions" of P4 and Git-LFS, but since 02373e56bd
(ci: don't update Homebrew, 2019-07-03) that's no longer the case, as
it will install the versions which were recorded in the image's
Homebrew database when the image was created.

Update this comment accordingly.

Signed-off-by: SZEDER Gábor 
---

Sigh...  Same patch as before, but corrected a grammar error in the
commit message.

 ci/lib.sh | 6 --
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/ci/lib.sh b/ci/lib.sh
index 288a5b3884..0c7171a173 100755
--- a/ci/lib.sh
+++ b/ci/lib.sh
@@ -163,8 +163,10 @@ linux-clang|linux-gcc)
export GIT_TEST_HTTPD=YesPlease
 
# The Linux build installs the defined dependency versions below.
-   # The OS X build installs the latest available versions. Keep that
-   # in mind when you encounter a broken OS X build!
+   # The OS X build installs much more recent versions, whichever
+   # were recorded in the Homebrew database upon creating the OS X
+   # image.
+   # Keep that in mind when you encounter a broken OS X build!
export LINUX_P4_VERSION="16.2"
export LINUX_GIT_LFS_VERSION="1.5.2"
 
-- 
2.22.0.667.g5c3548c1fe



Hi, This is Clara

2019-07-06 Thread Clara Duran


Are you there ?. 
Can I have a word with you privately?


[GSoC] Blogging with Rohit

2019-07-06 Thread Rohit Ashiwal
Hi Everyone!

Here is the update about the last week[1]. I'm about to complete all
the code needed to support --committer-date-is-author-date for the
interactive rebase. Also, I'll be sending one more patch about the
flag that I implemented last week, "--ignore-whitespace", also for
the rebase -i.

Thanks
Rohit

[1]: https://rashiwal.me/2019/a-lie/



[PATCH v1] builtin/merge.c - cleanup of code in for-cycle that tests strategies

2019-07-06 Thread Edmundo Carmona Antoranz
Previous code was a little convoluted to follow logic
New code is shorter and logic is easier to follow

- Easier to see what happens when merge is successful
and how --no-commit affects result
- Simpler to see that for-cycle will stop when merge_was_ok is set
- Easier to spot what logic will run through best_strategy
- Easier to see that in case of ret being 2, cycle will continue
- Keep a single break case (when automerge succedes and a revision will
  be created)
- Put together closing actions when automerge succedes if a revision
  will be created

Signed-off-by: Edmundo Carmona Antoranz 
---
 builtin/merge.c | 51 ++---
 1 file changed, 19 insertions(+), 32 deletions(-)

diff --git a/builtin/merge.c b/builtin/merge.c
index 6e99aead46..94f2713bea 100644
--- a/builtin/merge.c
+++ b/builtin/merge.c
@@ -1586,7 +1586,7 @@ int cmd_merge(int argc, const char **argv, const char 
*prefix)
save_state(&stash))
oidclr(&stash);
 
-   for (i = 0; i < use_strategies_nr; i++) {
+   for (i = 0; !merge_was_ok && i < use_strategies_nr; i++) {
int ret;
if (i) {
printf(_("Rewinding the tree to pristine...\n"));
@@ -1604,40 +1604,26 @@ int cmd_merge(int argc, const char **argv, const char 
*prefix)
ret = try_merge_strategy(use_strategies[i]->name,
 common, remoteheads,
 head_commit);
-   if (!option_commit && !ret) {
-   merge_was_ok = 1;
-   /*
-* This is necessary here just to avoid writing
-* the tree, but later we will *not* exit with
-* status code 1 because merge_was_ok is set.
-*/
-   ret = 1;
-   }
-
-   if (ret) {
-   /*
-* The backend exits with 1 when conflicts are
-* left to be resolved, with 2 when it does not
-* handle the given merge at all.
-*/
-   if (ret == 1) {
-   int cnt = evaluate_result();
-
-   if (best_cnt <= 0 || cnt <= best_cnt) {
-   best_strategy = use_strategies[i]->name;
-   best_cnt = cnt;
+   /*
+* The backend exits with 1 when conflicts are
+* left to be resolved, with 2 when it does not
+* handle the given merge at all.
+*/
+   if (ret < 2) {
+   if (!ret) {
+   if (option_commit) {
+   /* Automerge succeeded. */
+   automerge_was_ok = 1;
+   break;
}
+   merge_was_ok = 1;
+   }
+   int cnt = evaluate_result();
+   if (best_cnt <= 0 || cnt <= best_cnt) {
+   best_strategy = use_strategies[i]->name;
+   best_cnt = cnt;
}
-   if (merge_was_ok)
-   break;
-   else
-   continue;
}
-
-   /* Automerge succeeded. */
-   write_tree_trivial(&result_tree);
-   automerge_was_ok = 1;
-   break;
}
 
/*
@@ -1645,6 +1631,7 @@ int cmd_merge(int argc, const char **argv, const char 
*prefix)
 * auto resolved the merge cleanly.
 */
if (automerge_was_ok) {
+   write_tree_trivial(&result_tree);
ret = finish_automerge(head_commit, head_subsumed,
   common, remoteheads,
   &result_tree, wt_strategy);
-- 
2.20.1



Re: [PATCH v1] builtin/merge.c - cleanup of code in for-cycle that tests strategies

2019-07-06 Thread Edmundo Carmona Antoranz
On Sat, Jul 6, 2019 at 6:00 PM Edmundo Carmona Antoranz
 wrote:
> @@ -1645,6 +1631,7 @@ int cmd_merge(int argc, const char **argv, const char 
> *prefix)
>  * auto resolved the merge cleanly.
>  */
> if (automerge_was_ok) {
> +   write_tree_trivial(&result_tree);
> ret = finish_automerge(head_commit, head_subsumed,
>common, remoteheads,
>&result_tree, wt_strategy);

I realized later that the call to write_tree_trivial could be included
in finish_automerge. Will include this change on v2 of the patch (if
there's a v2, depending on feedback).


[PATCH] credential: add nocache option to the credentials API

2019-07-06 Thread Masaya Suzuki
The credentials API calls credentials helpers in order. If a
username/password pair is returned the helpers and if it's used for
authentication successfully, it's announced to the helpers and they can
store it for later use.

Some credentials are valid only for the limited time and should not be
cached. In this case, because the credential is announced to all helpers
and they can independently decide whether they will cache it or not,
those short-lived credentials can be cached.

This change adds an option that a credential helper can specify that the
credential returned by the helper should not be cached. If this is
specified, even after the credential is used successfully, it won't be
announced to other helpers for store.

Signed-off-by: Masaya Suzuki 
---
 Documentation/technical/api-credentials.txt | 4 +++-
 credential.c| 4 +++-
 credential.h| 3 ++-
 t/t0300-credentials.sh  | 9 +
 4 files changed, 17 insertions(+), 3 deletions(-)

diff --git a/Documentation/technical/api-credentials.txt 
b/Documentation/technical/api-credentials.txt
index 75368f26ca..3db5841b40 100644
--- a/Documentation/technical/api-credentials.txt
+++ b/Documentation/technical/api-credentials.txt
@@ -251,7 +251,9 @@ even no values at all if it has nothing useful to provide. 
Any provided
 attributes will overwrite those already known about by Git.  If a helper
 outputs a `quit` attribute with a value of `true` or `1`, no further
 helpers will be consulted, nor will the user be prompted (if no
-credential has been provided, the operation will then fail).
+credential has been provided, the operation will then fail). If a helper 
outputs
+a `nocache` attribute with a value of `true` or `1`, `credential_approve` will
+not be called even after the credential is used for authentication sucessfully.
 
 For a `store` or `erase` operation, the helper's output is ignored.
 If it fails to perform the requested operation, it may complain to
diff --git a/credential.c b/credential.c
index 62be651b03..db7b351447 100644
--- a/credential.c
+++ b/credential.c
@@ -179,6 +179,8 @@ int credential_read(struct credential *c, FILE *fp)
credential_from_url(c, value);
} else if (!strcmp(key, "quit")) {
c->quit = !!git_config_bool("quit", value);
+   } else if (!strcmp(key, "nocache")) {
+   c->no_cache= !!git_config_bool("nocache", value);
}
/*
 * Ignore other lines; we don't know what they mean, but
@@ -296,7 +298,7 @@ void credential_approve(struct credential *c)
 {
int i;
 
-   if (c->approved)
+   if (c->approved || c->no_cache)
return;
if (!c->username || !c->password)
return;
diff --git a/credential.h b/credential.h
index 6b0cd16be2..be0f35d841 100644
--- a/credential.h
+++ b/credential.h
@@ -8,7 +8,8 @@ struct credential {
unsigned approved:1,
 configured:1,
 quit:1,
-use_http_path:1;
+use_http_path:1,
+no_cache:1;
 
char *username;
char *password;
diff --git a/t/t0300-credentials.sh b/t/t0300-credentials.sh
index 82eaaea0f4..ad06f6fe11 100755
--- a/t/t0300-credentials.sh
+++ b/t/t0300-credentials.sh
@@ -118,6 +118,15 @@ test_expect_success 'do not bother storing password-less 
credential' '
EOF
 '
 
+test_expect_success 'credential_approve does not call helpers for nocache' '
+   check approve useless <<-\EOF
+   username=foo
+   password=bar
+   nocache=1
+   --
+   --
+   EOF
+'
 
 test_expect_success 'credential_reject calls all helpers' '
check reject useless "verbatim one two" <<-\EOF
-- 
2.22.0.410.gd8fdbe21b5-goog