Re: [PATCH] git p4 test: fix failure in 9814-git-p4-rename.sh Was: Re: Test failure in t9814-git-p4-rename.sh - my environment or bad test?

2014-07-30 Thread Christoph Bonitz
On Thu, Jul 24, 2014 at 8:45 PM, Johannes Sixt j...@kdbg.org wrote: Am 23.07.2014 23:28, schrieb Christoph Bonitz: - test $src = file10 || test $src = file11 + test $src = file2 || test $src = file10 || test $src = file11 You can't test for alternatives in this way. It's already wrong in

Re: [PATCH] git p4 test: fix failure in 9814-git-p4-rename.sh Was: Re: Test failure in t9814-git-p4-rename.sh - my environment or bad test?

2014-07-30 Thread Christoph Bonitz
On Fri, Jul 25, 2014 at 12:05 AM, Junio C Hamano gits...@pobox.com wrote: Johannes Sixt j...@kdbg.org writes: I see a few other no-nos in the context of the changes, in particular, pipelines where git is not the last command; these would not catch failures in the git commands. But a fix for

Re: [PATCH v3 4/9] index-helper: new daemon for caching index and related stuff

2014-07-30 Thread Eric Sunshine
On Monday, July 28, 2014, Nguyễn Thái Ngọc Duy pclo...@gmail.com wrote: Instead of reading the index from disk and worrying about disk corruption, the index is cached in memory (memory bit-flips happen too, but hopefully less often). The result is faster read. The biggest gain is not having

Re: Amending merge commits?

2014-07-30 Thread Sergei Organov
Nico Williams n...@cryptonector.com writes: On Tue, Jul 29, 2014 at 4:58 AM, Sergei Organov o...@javad.com wrote: Nico Williams n...@cryptonector.com writes: That exception aside, keeping all local commits on top by always rebasing them onto the upstream is extremely useful: a) in simplifying

[PATCH] commit --amend: test specifies authorship but forgets to check

2014-07-30 Thread Fabian Ruch
The test case --amend option copies authorship specifies that the git-commit option `--amend` uses the authorship of the replaced commit for the new commit. Add the omitted check that this property actually holds. Signed-off-by: Fabian Ruch baf...@gmail.com --- Without the check, the test case

Re: [PATCH] utf8.c: fix strbuf_utf8_replace copying the last NUL to dst string

2014-07-30 Thread Duy Nguyen
On Tue, Jul 29, 2014 at 12:56:24PM -0700, Junio C Hamano wrote: Nguyễn Thái Ngọc Duy pclo...@gmail.com writes: When utf8_width(src) is called with *src == NULL (because the source string ends with an ansi sequence), I am not sure what you mean by because here. Do you mean somebody

Re: [PATCH v2 7/8] checkout: prefix --to argument properly when cwd is moved

2014-07-30 Thread Duy Nguyen
On Wed, Jul 30, 2014 at 3:51 AM, Junio C Hamano gits...@pobox.com wrote: Nguyễn Thái Ngọc Duy pclo...@gmail.com writes: Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com --- builtin/checkout.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/builtin/checkout.c

Re: [PATCH v3 4/9] index-helper: new daemon for caching index and related stuff

2014-07-30 Thread Duy Nguyen
On Wed, Jul 30, 2014 at 3:08 PM, Eric Sunshine sunsh...@sunshineco.com wrote: +static void share_index(struct index_state *istate, struct index_shm *is) +{ + void *new_mmap; + if (istate-mmap_size = 20 || + hashcmp(istate-sha1, + (unsigned char

Bug report about symlinks

2014-07-30 Thread NickKolok
Greetings from Russia, comrads! I've noticed something strange with git status when replacing a folder with symlink to another folder. There is a git repo with script with demo in the attachment. Yours sincerely, NickKolok aka Nikolay Avdeev. Доброго времени суток, товарищи! При замене папки

Kindly reply

2014-07-30 Thread carlos...@libero.it
My name is Carlos Ramirez I am lawyer here in Madrid Spain. I want to transfer an abandoned sum of 3.5 Millions USD to your account.50% will be for you. No risk involved. Contact me for more details. Kindly reply me back to my alternative email address ( carlos...@aol.com ) Regards

[PATCH v4 0/5] git_config callers rewritten with the new config cache API

2014-07-30 Thread Tanay Abhra
[PATCH v4]: Tiny style nits corrected. Patch 2/5 has been totally reworked. One thing to check is if the config variables I changed in the series are single valued or multi valued. Though I have tried to ascertain if the variable was single valued or not by reading the docs

[PATCH v4 4/5] branch.c: replace `git_config()` with `git_config_get_string()

2014-07-30 Thread Tanay Abhra
Use `git_config_get_string()` instead of `git_config()` to take advantage of the config-set API which provides a cleaner control flow. Signed-off-by: Tanay Abhra tanay...@gmail.com --- branch.c | 24 1 file changed, 4 insertions(+), 20 deletions(-) diff --git a/branch.c

[PATCH v4 2/5] notes.c: replace `git_config()` with `git_config_get_value_multi()`

2014-07-30 Thread Tanay Abhra
Use `git_config_get_value_multi()` instead of `git_config()` to take advantage of the config-set API which provides a cleaner control flow, also previously 'string_list_add_refs_by_glob()' was called even when the retrieved value was NULL, correct it while we are at it. Signed-off-by: Tanay Abhra

[PATCH v4 1/5] pager.c: replace `git_config()` with `git_config_get_value()`

2014-07-30 Thread Tanay Abhra
Use `git_config_get_value()` instead of `git_config()` to take advantage of the config-set API which provides a cleaner control flow. Signed-off-by: Tanay Abhra tanay...@gmail.com --- pager.c | 40 +--- 1 file changed, 13 insertions(+), 27 deletions(-) diff

[PATCH v4 5/5] alias.c: replace `git_config()` with `git_config_get_string()`

2014-07-30 Thread Tanay Abhra
Use `git_config_get_string()` instead of `git_config()` to take advantage of the config-set API which provides a cleaner control flow. Signed-off-by: Tanay Abhra tanay...@gmail.com --- alias.c | 25 ++--- 1 file changed, 6 insertions(+), 19 deletions(-) diff --git a/alias.c

[PATCH v4 3/5] imap-send.c: replace `git_config()` with `git_config_get_*()` family

2014-07-30 Thread Tanay Abhra
Use `git_config_get_*()` family instead of `git_config()` to take advantage of the config-set API which provides a cleaner control flow. Signed-off-by: Tanay Abhra tanay...@gmail.com --- imap-send.c | 61 +++-- 1 file changed, 27

Re: [PATCH v4 0/5] git_config callers rewritten with the new config cache API

2014-07-30 Thread Matthieu Moy
Tanay Abhra tanay...@gmail.com writes: [PATCH v4]: Tiny style nits corrected. Patch 2/5 has been totally reworked. One thing to check is if the config variables I changed in the series are single valued or multi valued. Though I have tried to ascertain if the variable was

Re: [PATCH v4 0/5] git_config callers rewritten with the new config cache API

2014-07-30 Thread Tanay Abhra
On 7/30/2014 7:16 PM, Matthieu Moy wrote: Tanay Abhra tanay...@gmail.com writes: [PATCH v4]: Tiny style nits corrected. Patch 2/5 has been totally reworked. One thing to check is if the config variables I changed in the series are single valued or multi valued. Though I have

Re: [PATCH v4 2/5] notes.c: replace `git_config()` with `git_config_get_value_multi()`

2014-07-30 Thread Matthieu Moy
Tanay Abhra tanay...@gmail.com writes: - git_config(notes_display_config, load_config_refs); + if (load_config_refs) { + values = git_config_get_value_multi(notes.displayref); + if (values) { + for (i = 0; i values-nr; i++) { +

Re: [PATCH v4 2/5] notes.c: replace `git_config()` with `git_config_get_value_multi()`

2014-07-30 Thread Tanay Abhra
On 7/30/2014 7:43 PM, Matthieu Moy wrote: Tanay Abhra tanay...@gmail.com writes: -git_config(notes_display_config, load_config_refs); +if (load_config_refs) { +values = git_config_get_value_multi(notes.displayref); +if (values) { +for

Re: [PATCH v4 4/5] branch.c: replace `git_config()` with `git_config_get_string()

2014-07-30 Thread Matthieu Moy
Tanay Abhra tanay...@gmail.com writes: int read_branch_desc(struct strbuf *buf, const char *branch_name) { - struct branch_desc_cb cb; + char *v = NULL; struct strbuf name = STRBUF_INIT; strbuf_addf(name, branch.%s.description, branch_name); - cb.config_name =

Re: [PATCH v4 2/5] notes.c: replace `git_config()` with `git_config_get_value_multi()`

2014-07-30 Thread Matthieu Moy
Tanay Abhra tanay...@gmail.com writes: On 7/30/2014 7:43 PM, Matthieu Moy wrote: Tanay Abhra tanay...@gmail.com writes: - git_config(notes_display_config, load_config_refs); + if (load_config_refs) { + values = git_config_get_value_multi(notes.displayref); + if

Re: [PATCH v4 0/5] git_config callers rewritten with the new config cache API

2014-07-30 Thread Matthieu Moy
Tanay Abhra tanay...@gmail.com writes: Yes you are right, there is a call to git_die_config() also in the series. I will add the info in the next reroll. If unsure, rebase your branch locally on the commit on which it is meant to apply, and check that it works for you. Also, any thoughts

Transaction patch series overview

2014-07-30 Thread Ronnie Sahlberg
List, please see here an overview and ordering of the ref transaction patch series. These series build on each other and needs to be applied in the order listed below. rs/ref-transaction-0 --- Early part of the ref transaction topic. * rs/ref-transaction-0:

Everyday contents (was Re: What's cooking in git.git (Jul 2014, #04; Tue, 22))

2014-07-30 Thread Junio C Hamano
Continued: this message only covers the third part (out of the four sections). | Integrator[[Integrator]] | | | A fairly central person acting as the integrator in a group | project receives changes made by others, reviews and integrates | them and publishes the result

Re: Amending merge commits?

2014-07-30 Thread Nico Williams
On Wed, Jul 30, 2014 at 3:42 AM, Sergei Organov o...@javad.com wrote: Nico Williams n...@cryptonector.com writes: Local merge commits mean that you either didn't rebase to keep all your local commits on top of the upstream, or that you have multiple upstreams (the example exception I gave).

Re: [PATCH 0/5] nd/multiple-work-trees follow-ups

2014-07-30 Thread Junio C Hamano
Nguyễn Thái Ngọc Duy pclo...@gmail.com writes: The series has entered 'next' so I can't replace patches any more. Besides the brown paper bag fixes, checkout now rejects if a branch is already checked out elsewhere. I do not think we would want to rush the entire series to 'master' before the

Re: [PATCH 3/5] checkout --to: no auto-detach if the ref is already checked out

2014-07-30 Thread Junio C Hamano
Michael J Gruber g...@drmicha.warpmail.net writes: As an error message that is completely sufficient. The advice messages are meant to teach the user about the normal parts of the toolchest to use in a situation of conflict, aren't they? Not really. They are to remind (to those who learned

Re: [PATCH] utf8.c: fix strbuf_utf8_replace copying the last NUL to dst string

2014-07-30 Thread Junio C Hamano
Duy Nguyen pclo...@gmail.com writes: it returns 0 and steps 'src' by one. Here it refers to utf8_width()? Who steps 'src' by one? utf8_width() steps 'src'. Ahh, did you mean *src == NUL, i.e. already at the end of the string? Yes.. I guess you have a better commit message prepared

Re: [PATCH v2] use a hashmap to make remotes faster

2014-07-30 Thread Junio C Hamano
Please don't do this: Content-Type: multipart/related; boundary=MIME delimiter for sendEmail-128858.688128279 -- 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

Re: Amending merge commits?

2014-07-30 Thread Sergei Organov
Nico Williams n...@cryptonector.com writes: On Wed, Jul 30, 2014 at 3:42 AM, Sergei Organov o...@javad.com wrote: Nico Williams n...@cryptonector.com writes: Local merge commits mean that you either didn't rebase to keep all your local commits on top of the upstream, or that you have multiple

Re: [PATCH 3/5] checkout --to: no auto-detach if the ref is already checked out

2014-07-30 Thread Junio C Hamano
Junio C Hamano gits...@pobox.com writes: Michael J Gruber g...@drmicha.warpmail.net writes: As an error message that is completely sufficient. The advice messages are meant to teach the user about the normal parts of the toolchest to use in a situation of conflict, aren't they? Not

Re: [PATCH] git p4 test: fix failure in 9814-git-p4-rename.sh Was: Re: Test failure in t9814-git-p4-rename.sh - my environment or bad test?

2014-07-30 Thread Junio C Hamano
Christoph Bonitz ml.christophbon...@gmail.com writes: Apart from your change and the word wrap adjustments suggested by Pete, would the following also make sense, to fix the other flaw Johannes pointed out? With regards to failing, git diff-tree should be idempotent. I think those are the two

Re: [PATCH 2/5] refs.c: write updates to packed refs when a transaction has more than one ref

2014-07-30 Thread Ronnie Sahlberg
On Tue, Jul 29, 2014 at 2:09 PM, Junio C Hamano gits...@pobox.com wrote: Ronnie Sahlberg sahlb...@google.com writes: + /* + * Always copy loose refs that are to be deleted to the packed refs. + * If we are updating multiple refs then copy all non symref refs + * to the

Re: [PATCH 2/5] refs.c: write updates to packed refs when a transaction has more than one ref

2014-07-30 Thread Ronnie Sahlberg
On Tue, Jul 29, 2014 at 2:11 PM, Junio C Hamano gits...@pobox.com wrote: Ronnie Sahlberg sahlb...@google.com writes: + packed = get_packed_refs(ref_cache);; s/;;/;/; ;-) Sorry, I couldn't resist the urge to type many semicolons ;-) Fixed, thanks! -- To unsubscribe from this

Re: [PATCH] imap-send: clarify CRAM-MD5 vs LOGIN documentation

2014-07-30 Thread Junio C Hamano
Tony Finch d...@dotat.at writes: Explicitly mention that leaving imap.authMethod unset makes git imap-send use the basic IMAP plaintext LOGIN command. --- Documentation/git-imap-send.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Documentation/git-imap-send.txt

Re: [PATCH v2 5/6] stash: default listing to --cc --simplify-combined-diff

2014-07-30 Thread Junio C Hamano
Junio C Hamano gits...@pobox.com writes: Jeff King p...@peff.net writes: When you list stashes, you can provide arbitrary git-log options to change the display. However, adding just -p does nothing, because each stash is actually a merge commit. This implementation detail is easy to

Re: [PATCH] commit --amend: test specifies authorship but forgets to check

2014-07-30 Thread Junio C Hamano
Fabian Ruch baf...@gmail.com writes: The test case --amend option copies authorship specifies that the git-commit option `--amend` uses the authorship of the replaced commit for the new commit. Add the omitted check that this property actually holds. Signed-off-by: Fabian Ruch

Re: [PATCH 2/4] refs.c: refactor resolve_ref_unsafe() to use strbuf internally

2014-07-30 Thread Junio C Hamano
Eric Sunshine sunsh...@sunshineco.com writes: char *resolve_refdup(const char *ref, unsigned char *sha1, int reading, int *flag) { - const char *ret = resolve_ref_unsafe(ref, sha1, reading, flag); - return ret ? xstrdup(ret) : NULL; + struct strbuf buf = STRBUF_INIT; +

[PATCH] remove duplicate entry from 2.1.0 release notes

2014-07-30 Thread Thomas Ackermann
Signed-off-by: Thomas Ackermann th.ac...@arcor.de --- Documentation/RelNotes/2.1.0.txt | 3 --- 1 file changed, 3 deletions(-) diff --git a/Documentation/RelNotes/2.1.0.txt b/Documentation/RelNotes/2.1.0.txt index be598ad..e958498 100644 --- a/Documentation/RelNotes/2.1.0.txt +++

[PATCH v2 5/5] refs.c: rollback the lockfile before we die() in repack_without_refs

2014-07-30 Thread Ronnie Sahlberg
Signed-off-by: Ronnie Sahlberg sahlb...@google.com --- refs.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/refs.c b/refs.c index 9c813f9..3e98ca1 100644 --- a/refs.c +++ b/refs.c @@ -2574,8 +2574,10 @@ int repack_without_refs(const char **refnames, int n, struct strbuf

[PATCH v2 1/5] refs.c: allow passing raw git_committer_info as email to _update_reflog

2014-07-30 Thread Ronnie Sahlberg
In many places in the code we do not have access to the individual fields in the committer data. Instead we might only have access to prebaked data such as what is returned by git_committer_info() containing a string that consists of email, timestamp, zone etc. This makes it inconvenient to use

[PATCH v2 4/5] refs.c: update rename_ref to use a transaction

2014-07-30 Thread Ronnie Sahlberg
Change refs.c to use a single transaction to copy/rename both the refs and its reflog. Since we are no longer using rename() to move the reflog file we no longer need to disallow rename_ref for refs with a symlink for its reflog so we can remove that test from the testsuite. Change the function

[PATCH v2 0/5] ref-transactions-rename

2014-07-30 Thread Ronnie Sahlberg
This patch series adds support for using transactions and atomic renames. It focuses on what needs to be done in order to support fully atomic and rollbackable renames that may or may not involve name conflicts. By performing the actual delete old/create new via a single operation to the packed

[PATCH v2 2/5] refs.c: return error instead of dying when locking fails during transaction

2014-07-30 Thread Ronnie Sahlberg
Change lock_ref_sha1_basic to return an error instead of dying when we fail to lock a file during a transaction. This function is only called from transaction_commit() and it knows how to handle these failures. Signed-off-by: Ronnie Sahlberg sahlb...@google.com --- refs.c | 7 +-- 1 file

[PATCH v2 3/5] refs.c: use packed refs when deleting refs during a transaction

2014-07-30 Thread Ronnie Sahlberg
Make the deletion of refs during a transaction more atomic. Start by first copying all loose refs we will be deleting to the packed refs file and then commit the packed refs file. Then re-lock the packed refs file to stop anyone else from modifying these refs and keep it locked until we are

[PATCH v2 2/5] refs.c: write updates to packed refs when a transaction has more than one ref

2014-07-30 Thread Ronnie Sahlberg
When we are updating more than one single ref, i.e. not a commit, then write the updated refs directly to the packed refs file instead of writing them as loose refs. Change clone to use a transaction instead of using the packed refs API. This changes the behavior of clone slightly. Previously

[PATCH v2 1/5] refs.c: move reflog updates into its own function

2014-07-30 Thread Ronnie Sahlberg
write_ref_sha1 tries to update the reflog while updating the ref. Move these reflog changes out into its own function so that we can do the same thing if we write a sha1 ref differently, for example by writing a ref to the packed refs file instead. Signed-off-by: Ronnie Sahlberg

[PATCH v2 3/5] remote.c: use a transaction for deleting refs

2014-07-30 Thread Ronnie Sahlberg
Transactions now use packed refs when deleting multiple refs so there is no need to do it manually from remote.c any more. Signed-off-by: Ronnie Sahlberg sahlb...@google.com --- builtin/remote.c | 69 +++- 1 file changed, 38 insertions(+), 31

[PATCH v2 0/5] use packed refs for ref-transactions

2014-07-30 Thread Ronnie Sahlberg
This is a small patch series that continues ontop of the ref-transactions-rename series I posted earlier today. This series expands the use of the packed refs file to make multi-ref updates much more atomic. Additionally it allows us to continue pushing external caller to use transactions instead

[PATCH v2 4/5] refs.c: make repack_without_refs static

2014-07-30 Thread Ronnie Sahlberg
Signed-off-by: Ronnie Sahlberg sahlb...@google.com --- refs.c | 2 +- refs.h | 3 --- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/refs.c b/refs.c index bacce94..fc445e8 100644 --- a/refs.c +++ b/refs.c @@ -2538,7 +2538,7 @@ static int curate_packed_ref_fn(struct ref_entry

[PATCH v2 5/5] refs.c: make the *_packed_refs functions static

2014-07-30 Thread Ronnie Sahlberg
We no longer need to expose the lock/add/commit/rollback functions for packed refs anymore so make them static and remove them from the public api. Signed-off-by: Ronnie Sahlberg sahlb...@google.com --- refs.c | 8 refs.h | 30 -- 2 files changed, 4

[ANNOUNCE] Git v2.0.4

2014-07-30 Thread Junio C Hamano
The latest maintenance release Git v2.0.4 is now available at the usual places. This is primarily to fix a regression of git diff-tree in v2.0.2. The tarballs are found at: https://www.kernel.org/pub/software/scm/git/ The following public repositories all have a copy of the 'v2.0.4' tag

Re: [PATCH v2 5/6] stash: default listing to --cc --simplify-combined-diff

2014-07-30 Thread Jeff King
On Wed, Jul 30, 2014 at 12:43:09PM -0700, Junio C Hamano wrote: git log --cc is one of the things I wanted for a long time to fix. When the user explicitly asks --cc, we currently ignore it, but because we know the user wants to view combined diff, we should turn -p on automatically. And

Re: stash-p broken?

2014-07-30 Thread Jeff King
On Tue, Jul 29, 2014 at 12:27:07PM -0700, Junio C Hamano wrote: Jeff King p...@peff.net writes: I think that is my point, though. The user is _not_ aware that the commit in question is a merge. They stashed some stuff, and now they want to see the result. I'd like to show them a vanilla

Re: [RFC/PATCH 3/2] stash: show combined diff with stash show

2014-07-30 Thread Jeff King
On Tue, Jul 29, 2014 at 11:13:37AM -0700, Junio C Hamano wrote: Jeff King p...@peff.net writes: ... People might be doing things like git stash show | git apply, and would want to ignore the index content ... FWIW, that is exactly how I use git stash show -p most of the time. Like I

Re: stash-p broken?

2014-07-30 Thread Jeff King
On Tue, Jul 29, 2014 at 11:23:16AM -0700, Junio C Hamano wrote: I see you added --simplify-combined-diffs to avoid breaking log, so that is not too bad, but I am still unsure what should happen when the first parent and the result is the same and only the second parent is different (i.e. you

Re: [RFC/PATCH 3/2] stash: show combined diff with stash show

2014-07-30 Thread Junio C Hamano
On Wed, Jul 30, 2014 at 5:17 PM, Jeff King p...@peff.net wrote: Like I said, I'm iffy on this part of the series for that reason. But I'm curious: what do you think should happen in such a use case when there are staged contents in the index? Right now we completely ignore them. I think

Re: [PATCH v3 4/9] index-helper: new daemon for caching index and related stuff

2014-07-30 Thread David Turner
On Mon, 2014-07-28 at 19:03 +0700, Nguyễn Thái Ngọc Duy wrote: +# Define HAVE_SHM if you platform support shm_* functions in librt. s/you/your/ +static void free_index_shm(struct index_shm *is) Does not actually free its argument; should be release_index_shm. -- To unsubscribe from this

Re: [PATCH v2 2/2] Make locked paths absolute when current directory is changed

2014-07-30 Thread Yue Lin Ho
Hi: 2014-07-23 19:55 GMT+08:00 Duy Nguyen pclo...@gmail.com: On Tue, Jul 22, 2014 at 12:04 AM, Junio C Hamano gits...@pobox.com wrote: Duy Nguyen pclo...@gmail.com writes: ​[snip]​ OK, we should center these efforts around the strbuf_getcwd() topic, basing the other topic on realpath()