Re: git feature-branch

2014-07-25 Thread Sitaram Chamarty
On 07/25/2014 11:10 AM, Sheldon Els wrote: It is just a shell script yes, and a man page to make things a bit more discoverable for git help feature-branch. The brew command comes from homebrew, a popular OSX package manager. My platform of choice. You might want to at least add these

Re: `ab | (cd cd git apply -)' fails with v2.0.0

2014-07-25 Thread Michael J Gruber
Junio C Hamano venit, vidit, dixit 24.07.2014 19:19: Michael J Gruber g...@drmicha.warpmail.net writes: Steffen Nurpmeso venit, vidit, dixit 24.07.2014 15:29: Hello (again, psst, after a long time), it happened yesterday that i needed to do $ git diff HEAD:FILE COMMIT:SAME-FILE |

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

2014-07-25 Thread Michael J Gruber
Junio C Hamano venit, vidit, dixit 24.07.2014 23:30: Duy Nguyen pclo...@gmail.com writes: On Wed, Jul 23, 2014 at 8:48 PM, Michael J Gruber g...@drmicha.warpmail.net wrote: Nguyễn Thái Ngọc Duy venit, vidit, dixit 23.07.2014 13:43: + if (advice_checkout_to) + die(_(%s is

Re: [PATCH 5/7] enforce `xfuncname` precedence over `funcname`

2014-07-25 Thread Matthieu Moy
Tanay Abhra tanay...@gmail.com writes: On 7/25/2014 2:52 AM, Ramsay Jones wrote: However, I think it you could create a list of pointer to hash-table entry, string-list index pairs in the config_set and use that to do the iteration. A bit ugly, but it should work. Thanks for the advice,

Re: [PATCH] git-svn: Initialize SVN::Client with svn config instead of, auth for git svn branch.

2014-07-25 Thread Monard Vong
Thanks for your reply, I updated commit message and subject, hoping it would be clearer. However I messed up message-id so it appear as a new message and not in the current thread. Sorry, still learning. Le 24/07/2014 00:33, Eric Wong a écrit : Monard Vong travelingsou...@gmail.com wrote:

[PATCH 0/4] Consolidate ref parsing code

2014-07-25 Thread Nguyễn Thái Ngọc Duy
On Thu, Jul 24, 2014 at 4:16 AM, Junio C Hamano gits...@pobox.com wrote: - three places now knows what a textual symref looks like (i.e. begins with ref:, zero or more whitespaces, the target ref and then zero or more trailing whitespaces). Perhaps we need to consolidate the

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

2014-07-25 Thread Nguyễn Thái Ngọc Duy
In the beginning, we had resolve_ref() that returns a buffer owned by this function. Then we started to move away from that direction because the buffer could be overwritten by the next resolve_ref() call and introduced two new functions: resolve_ref_unsafe() and resolve_refdup(). The static

[PATCH 4/4] refs.c: rewrite resolve_gitlink_ref() to use parse_ref()

2014-07-25 Thread Nguyễn Thái Ngọc Duy
resolve_gitlink_ref_recursive() is less strict than the old resolve_ref_unsafe() (which is now parse_ref()). It also has another random limit 128 bytes for symrefs. This brings MAXREFLEN check to resolve_ref* family. It looks like an arbitrary limit though (added in 0ebde32 (Add

[PATCH 3/4] refs.c: move ref parsing code out of resolve_ref()

2014-07-25 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com --- cache.h | 11 refs.c | 204 ++-- 2 files changed, 120 insertions(+), 95 deletions(-) diff --git a/cache.h b/cache.h index 5ffbafb..40a63d9 100644 --- a/cache.h +++

[PATCH 1/4] strbuf.c: keep errno in strbuf_read_file()

2014-07-25 Thread Nguyễn Thái Ngọc Duy
This function is used to replaced some code in the next patch that does this (i.e. keep the errno when read() fails) Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com --- strbuf.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/strbuf.c b/strbuf.c index

MDaemon Notification -- Attachment Removed

2014-07-25 Thread Postmaster
? ? ? ??, ??? ???: From : nore...@vger.kernel.org To: git@vger.kernel.org Subject : Returned mail: Data format error Message-ID: ?? ???: - mail.zip (mail.doc

Re: `ab | (cd cd git apply -)' fails with v2.0.0

2014-07-25 Thread Steffen Nurpmeso
Hello and good morning, Michael J Gruber g...@drmicha.warpmail.net wrote: |Junio C Hamano venit, vidit, dixit 24.07.2014 19:19: | Michael J Gruber g...@drmicha.warpmail.net writes: | Steffen Nurpmeso venit, vidit, dixit 24.07.2014 15:29: | Hello (again, psst, after a long time), | | it

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

2014-07-25 Thread Duy Nguyen
On Wed, Jul 23, 2014 at 9:17 PM, Karsten Blees karsten.bl...@gmail.com wrote: With the version in pu, three tests fail. t7001 is fixed with a newer 'cp'. The other two are unrelated (introduced by nd/multiple-work-trees topic). * t1501-worktree: failed 1 As of 5bbcb072 setup.c: support

Hello, how are you?

2014-07-25 Thread tel...@telmar.com.tr
Good afternoon, dear! Are you tired of being alone? You'll know how dreams come true All what you need is here Visit our website, this is something very special! http://ta.gg/6sk -- To unsubscribe from this list: send the line unsubscribe git in the body of a message to majord...@vger.kernel.org

[PATCH v2 2/6] add line number and file name info to `config_set`

2014-07-25 Thread Tanay Abhra
Store file name and line number for each key-value pair in the cache during parsing of the configuration files. Signed-off-by: Tanay Abhra tanay...@gmail.com --- config.c | 19 ++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/config.c b/config.c index

[PATCH v2 1/6] config.c: fix accuracy of line number in errors

2014-07-25 Thread Tanay Abhra
From: Matthieu Moy matthieu@grenoble-inp.fr If a callback returns a negative value to `git_config*()` family, they call `die()` while printing the line number and the file name. Currently the printed line number is off by one, thus printing the wrong line number. Make `linenr` point to the

[PATCH v2 0/6] Rewrite `git_config()` using config-set API

2014-07-25 Thread Tanay Abhra
[PATCH V2]: All the suggestions in [2] incorporated. git_config() now follows correct parsing order. Reordered the patches. Removed xfuncname patch as it was unnecssary. This series builds on the top of 1d2856f (ta/config-set) in pu or topic[1] in the mailing list with name git

[PATCH v2 4/6] add a test for semantic errors in config files

2014-07-25 Thread Tanay Abhra
Semantic errors (for example, for alias.* variables NULL values are not allowed) in configuration files cause a die printing the line number and file name of the offending value. Add a test documenting that such errors cause a die printing the accurate line number and file name. Signed-off-by:

[PATCH v2 3/6] rewrite git_config() to use the config-set API

2014-07-25 Thread Tanay Abhra
Of all the functions in `git_config*()` family, `git_config()` has the most invocations in the whole code base. Each `git_config()` invocation causes config file rereads which can be avoided using the config-set API. Use the config-set API to rewrite `git_config()` to use the config caching layer

[PATCH v2 6/6] Add tests for `git_config_get_string()`

2014-07-25 Thread Tanay Abhra
Add tests for `git_config_get_string()`, check whether it dies printing the line number and the file name if a NULL value is retrieved for the given key. Signed-off-by: Tanay Abhra tanay...@gmail.com --- t/t1308-config-set.sh | 9 + test-config.c | 10 ++ 2 files

[PATCH v2 5/6] config: add `git_die_config()` to the config-set API

2014-07-25 Thread Tanay Abhra
Add `git_die_config` that dies printing the line number and the file name of the highest priority value for the configuration variable `key`. It has usage in non-callback based config value retrieval where we can raise an error and die if there is a semantic error. For example, if

[RFC PATCH 3/3] commit: advertize config --global --edit on guessed identity

2014-07-25 Thread Matthieu Moy
When the user has no user-wide configuration file, it's faster to use the newly introduced config file template than to run two commands to set user.name and user.email. Advise this to the user. The old advice is kept if the user already has a configuration file since the template feature would

[RFC PATCH 1/3] config --global --edit: create a template file if needed

2014-07-25 Thread Matthieu Moy
When the user has no ~/.gitconfig file, git config --global --edit used to launch an editor on an nonexistant file name. Instead, create a file with a default content before launching the editor. The template contains only commented-out entries, to save a few keystrokes for the user. If the

[RFC PATCH 2/3] home_config_path: allow NULL xdg parameter

2014-07-25 Thread Matthieu Moy
This allows a caller to requst the global config file without requesting the XDG one. Signed-off-by: Matthieu Moy matthieu@imag.fr --- This is actually not needed, but I wrote this for a previous version, and it seems sensible anyway. path.c | 10 ++ 1 file changed, 6 insertions(+),

Re: [RFC PATCH 2/3] home_config_path: allow NULL xdg parameter

2014-07-25 Thread Tanay Abhra
On 7/25/2014 7:14 PM, Matthieu Moy wrote: This allows a caller to requst the global config file without requesting nit s/requst/request/ -- 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: [PATCH v2 3/6] rewrite git_config() to use the config-set API

2014-07-25 Thread Matthieu Moy
Tanay Abhra tanay...@gmail.com writes: +struct config_set_element { + struct hashmap_entry ent; + char *key; + struct string_list value_list; +}; + +struct configset_list_item { + struct config_set_element *e; + int value_index; +}; I originally wondered why you had

Re: [PATCH v2 5/6] config: add `git_die_config()` to the config-set API

2014-07-25 Thread Matthieu Moy
Tanay Abhra tanay...@gmail.com writes: --- a/config.c +++ b/config.c @@ -1403,11 +1403,12 @@ const struct string_list *git_configset_get_value_multi(struct config_set *cs, c int git_configset_get_string_const(struct config_set *cs, const char *key, const char **dest) { - const

Re: [PATCH v2 3/6] rewrite git_config() to use the config-set API

2014-07-25 Thread Tanay Abhra
On 7/25/2014 7:28 PM, Matthieu Moy wrote: Tanay Abhra tanay...@gmail.com writes: +struct config_set_element { +struct hashmap_entry ent; +char *key; +struct string_list value_list; +}; + +struct configset_list_item { +struct config_set_element *e; +int

Re: [PATCH v2 5/6] config: add `git_die_config()` to the config-set API

2014-07-25 Thread Tanay Abhra
On 7/25/2014 7:33 PM, Matthieu Moy wrote: Tanay Abhra tanay...@gmail.com writes: --- a/config.c +++ b/config.c @@ -1403,11 +1403,12 @@ const struct string_list *git_configset_get_value_multi(struct config_set *cs, c int git_configset_get_string_const(struct config_set *cs, const

Re: [RFC PATCH 1/3] config --global --edit: create a template file if needed

2014-07-25 Thread Eric Sunshine
On Fri, Jul 25, 2014 at 9:44 AM, Matthieu Moy matthieu@imag.fr wrote: When the user has no ~/.gitconfig file, git config --global --edit used to launch an editor on an nonexistant file name. Instead, create a file with a default content before launching the editor. The template contains

Re: [PATCH 1/4] strbuf.c: keep errno in strbuf_read_file()

2014-07-25 Thread Eric Sunshine
On Fri, Jul 25, 2014 at 6:43 AM, Nguyễn Thái Ngọc Duy pclo...@gmail.com wrote: This function is used to replaced some code in the next patch that s/replaced/replace/ does this (i.e. keep the errno when read() fails) Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com --- strbuf.c | 7

Re: [RFC PATCH 3/3] commit: advertize config --global --edit on guessed identity

2014-07-25 Thread Eric Sunshine
On Fri, Jul 25, 2014 at 9:44 AM, Matthieu Moy matthieu@imag.fr wrote: commit: advertize config --global --edit on guessed identity s/advertize/advertise/ When the user has no user-wide configuration file, it's faster to use the newly introduced config file template than to run two

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

2014-07-25 Thread Eric Sunshine
On Fri, Jul 25, 2014 at 6:43 AM, Nguyễn Thái Ngọc Duy pclo...@gmail.com wrote: In the beginning, we had resolve_ref() that returns a buffer owned by this function. Then we started to move away from that direction because the buffer could be overwritten by the next resolve_ref() call and

Re: [RFC PATCH 1/3] config --global --edit: create a template file if needed

2014-07-25 Thread Matthieu Moy
Eric Sunshine sunsh...@sunshineco.com writes: +static char *default_user_config() +{ + struct strbuf buf = STRBUF_INIT; + strbuf_addf(buf, + _(# This is Git's user-wide configuration file.\n + [core]\n + # Please, adapt

Re: [PATCH 3/4] refs.c: move ref parsing code out of resolve_ref()

2014-07-25 Thread Ronnie Sahlberg
Nice. On Fri, Jul 25, 2014 at 3:43 AM, Nguyễn Thái Ngọc Duy pclo...@gmail.com wrote: Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com --- cache.h | 11 refs.c | 204 ++-- 2 files changed, 120 insertions(+), 95

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

2014-07-25 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 4/5] refs.c: update rename_ref to use a transaction

2014-07-25 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 5/5] refs.c: rollback the lockfile before we die() in repack_without_refs

2014-07-25 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 a5053bf..619725a 100644 --- a/refs.c +++ b/refs.c @@ -2570,8 +2570,10 @@ int repack_without_refs(const char **refnames, int n, struct strbuf

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

2014-07-25 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. Signed-off-by: Ronnie Sahlberg sahlb...@google.com --- refs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/refs.c b/refs.c index 6c55032..2ea85a8 100644 ---

[PATCH 0/5] ref-transactions-rename

2014-07-25 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 3/5] refs.c: use packed refs when deleting refs during a transaction

2014-07-25 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

Re: [PATCH 5/7] enforce `xfuncname` precedence over `funcname`

2014-07-25 Thread Junio C Hamano
Matthieu Moy matthieu@grenoble-inp.fr writes: Tanay Abhra tanay...@gmail.com writes: On 7/25/2014 2:52 AM, Ramsay Jones wrote: However, I think it you could create a list of pointer to hash-table entry, string-list index pairs in the config_set and use that to do the iteration. A bit

Re: [PATCH v2 5/6] config: add `git_die_config()` to the config-set API

2014-07-25 Thread Junio C Hamano
Tanay Abhra tanay...@gmail.com writes: On 7/25/2014 7:33 PM, Matthieu Moy wrote: Tanay Abhra tanay...@gmail.com writes: --- a/config.c +++ b/config.c @@ -1403,11 +1403,12 @@ const struct string_list *git_configset_get_value_multi(struct config_set *cs, c int

Re: [RFC PATCH 1/3] config --global --edit: create a template file if needed

2014-07-25 Thread Junio C Hamano
Matthieu Moy matthieu@imag.fr writes: When the user has no ~/.gitconfig file, git config --global --edit used to launch an editor on an nonexistant file name. Instead, create a file with a default content before launching the editor. The template contains only commented-out entries, to

Re: [PATCH 5/7] enforce `xfuncname` precedence over `funcname`

2014-07-25 Thread Matthieu Moy
Junio C Hamano gits...@pobox.com writes: Matthieu Moy matthieu@grenoble-inp.fr writes: Tanay Abhra tanay...@gmail.com writes: On 7/25/2014 2:52 AM, Ramsay Jones wrote: However, I think it you could create a list of pointer to hash-table entry, string-list index pairs in the config_set

Re: [RFC PATCH 1/3] config --global --edit: create a template file if needed

2014-07-25 Thread Eric Sunshine
On Fri, Jul 25, 2014 at 12:01 PM, Matthieu Moy matthieu@grenoble-inp.fr wrote: Eric Sunshine sunsh...@sunshineco.com writes: +static char *default_user_config() +{ + struct strbuf buf = STRBUF_INIT; + strbuf_addf(buf, + _(# This is Git's user-wide

Re: [RFC PATCH 1/3] config --global --edit: create a template file if needed

2014-07-25 Thread Matthieu Moy
Junio C Hamano gits...@pobox.com writes: Probably a good idea; I do not think of any possible interactions we have to worry about with the configuration file init-db creates with possible templating. The feature should trigger only for --global, so it shouldn't interfer with .git/config and

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

2014-07-25 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 efa4f0d..5696d18 100644 --- a/refs.c +++ b/refs.c @@ -2534,7 +2534,7 @@ static int curate_packed_ref_fn(struct ref_entry

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

2014-07-25 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 2/5] refs.c: write updates to packed refs when a transaction has more than one ref

2014-07-25 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 0/5] use packed refs for ref-transactions

2014-07-25 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

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

2014-07-25 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 | 70 +++- 1 file changed, 39 insertions(+), 31

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

2014-07-25 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

Re: [RFC PATCH 1/3] config --global --edit: create a template file if needed

2014-07-25 Thread Junio C Hamano
Matthieu Moy matthieu@grenoble-inp.fr writes: Eric Sunshine sunsh...@sunshineco.com writes: +static char *default_user_config() +{ + struct strbuf buf = STRBUF_INIT; + strbuf_addf(buf, + _(# This is Git's user-wide configuration file.\n +

[PATCH v2 2/3] home_config_path: allow NULL xdg parameter

2014-07-25 Thread Matthieu Moy
This allows a caller to request the global config file without requesting the XDG one. Signed-off-by: Matthieu Moy matthieu@imag.fr --- path.c | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/path.c b/path.c index 3afcdb4..f68df0c 100644 --- a/path.c +++

[PATCH v2 1/3] config --global --edit: create a template file if needed

2014-07-25 Thread Matthieu Moy
When the user has no ~/.gitconfig file, git config --global --edit used to launch an editor on an nonexistant file name. Instead, create a file with a default content before launching the editor. The template contains only commented-out entries, to save a few keystrokes for the user. If the

[PATCH v2 3/3] commit: advertise config --global --edit on guessed identity

2014-07-25 Thread Matthieu Moy
When the user has no user-wide configuration file, it's faster to use the newly introduced config file template than to run two commands to set user.name and user.email. Advise this to the user. The old advice is kept if the user already has a configuration file since the template feature would

Re: [RFC PATCH 2/3] home_config_path: allow NULL xdg parameter

2014-07-25 Thread Junio C Hamano
Matthieu Moy matthieu@imag.fr writes: This allows a caller to requst the global config file without requesting the XDG one. Signed-off-by: Matthieu Moy matthieu@imag.fr --- This is actually not needed, but I wrote this for a previous version, and it seems sensible anyway. I was

Re: [RFC PATCH 2/3] home_config_path: allow NULL xdg parameter

2014-07-25 Thread Matthieu Moy
Junio C Hamano gits...@pobox.com writes: Matthieu Moy matthieu@imag.fr writes: This allows a caller to requst the global config file without requesting the XDG one. Signed-off-by: Matthieu Moy matthieu@imag.fr --- This is actually not needed, but I wrote this for a previous

Re: [PATCH 5/7] enforce `xfuncname` precedence over `funcname`

2014-07-25 Thread Junio C Hamano
Matthieu Moy matthieu@grenoble-inp.fr writes: I'd just replace list with array and use Documentation/technical/api-allocation-growing.txt. But I can't think of a better way. Presumably this array will reflect the order the source file told us about the keys and their values; I wonder

Re: [PATCH v2 1/3] config --global --edit: create a template file if needed

2014-07-25 Thread Junio C Hamano
Matthieu Moy matthieu@imag.fr writes: When the user has no ~/.gitconfig file, git config --global --edit used to launch an editor on an nonexistant file name. Instead, create a file with a default content before launching the editor. The template contains only commented-out entries, to

Re: [PATCH v2 2/3] home_config_path: allow NULL xdg parameter

2014-07-25 Thread Junio C Hamano
Matthieu Moy matthieu@imag.fr writes: This allows a caller to request the global config file without requesting the XDG one. Signed-off-by: Matthieu Moy matthieu@imag.fr --- Will rephrase A caller can ask only for XDG location by passing global=NULL. Allow it to ask only

[PATCH v3 1/3] config --global --edit: create a template file if needed

2014-07-25 Thread Matthieu Moy
When the user has no ~/.gitconfig file, git config --global --edit used to launch an editor on an nonexistant file name. Instead, create a file with a default content before launching the editor. The template contains only commented-out entries, to save a few keystrokes for the user. If the

[PATCH v3 2/3] home_config_paths(): let the caller ignore xdg path

2014-07-25 Thread Matthieu Moy
The caller can signal that it is not interested in learning the location of $HOME/.gitconfig by passing global=NULL, but there is no way to decline the path to the configuration file based on $XDG_CONFIG_HOME. Allow the caller to pass xdg=NULL to signal that it is not interested in the XDG

[PATCH v3 3/3] commit: advertise config --global --edit on guessed identity

2014-07-25 Thread Matthieu Moy
When the user has no user-wide configuration file, it's faster to use the newly introduced config file template than to run two commands to set user.name and user.email. Advise this to the user. The old advice is kept if the user already has a configuration file since the template feature would

Re: [PATCH v3 1/3] config --global --edit: create a template file if needed

2014-07-25 Thread Junio C Hamano
Thanks; will queue the patches from this iteration. -- 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 http://vger.kernel.org/majordomo-info.html

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

2014-07-25 Thread Jonathan Nieder
Ronnie Sahlberg wrote: Add a new flag REFLOG_EMAIL_IS_COMMITTER to _update_reflog to tell it that what we pass in as email is already the fully baked committer string we can use as-is. With and without the new flag, the 'email' argument has two different meanings: * with the new flag, it

Re: [PATCH v3 3/3] commit: advertise config --global --edit on guessed identity

2014-07-25 Thread Junio C Hamano
Matthieu Moy matthieu@imag.fr writes: +static const char *implicit_ident_advice() { Style: static const char *implicit_ident_advice(void) { No need to resend. Thanks. -- To unsubscribe from this list: send the line unsubscribe git in the body of a message to majord...@vger.kernel.org

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

2014-07-25 Thread Jonathan Nieder
Ronnie Sahlberg wrote: --- a/refs.c +++ b/refs.c @@ -2214,7 +2214,7 @@ static struct ref_lock *lock_ref_sha1_basic(const char *refname, */ goto retry; else - unable_to_lock_index_die(ref_file, errno); +

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

2014-07-25 Thread Jonathan Nieder
Ronnie Sahlberg wrote: 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

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

2014-07-25 Thread Jonathan Nieder
Ronnie Sahlberg wrote: Change refs.c to use a single transaction to copy/rename both the refs and its reflog. Yay! 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

Amending merge commits?

2014-07-25 Thread Besen, David
Hi folks, I think one of my coworkers has stumbled on a git bug -- if you amend a merge commit, and then pull, your amends are lost. Is this expected behavior? I've reproduced the problem in a script (attached).  I ran it against a couple of versions of git (1.7.1, 1.7.9, 1.8.4, 2.0.0) and

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

2014-07-25 Thread Junio C Hamano
Junio C Hamano gits...@pobox.com writes: Philip Oakley philipoak...@iee.org writes: which still makes me feel hesitant to promote this document without updating its contents, though. I hadn't viewed it as a 'promotion', rather it was simply ensuring access to the guide via the help

Re: Amending merge commits?

2014-07-25 Thread David Besen
Besen, David david.besen at hp.com writes: Hi folks, I think one of my coworkers has stumbled on a git bug -- if you amend a merge commit, and then pull, your amends are lost. Is this expected behavior? I've reproduced the problem in a script (attached).  I ran it against a

Re: Amending merge commits?

2014-07-25 Thread Jonathan Nieder
Besen, David wrote: I think one of my coworkers has stumbled on a git bug -- if you amend a merge commit, and then pull, your amends are lost. This is how pull --rebase works. It turns your single-parent commits into a sequence of patches on top of upstream and completely ignores your merge

RE: Amending merge commits?

2014-07-25 Thread Besen, David
Ah thanks, I'll RTFM better in the future. - Dave -Original Message- From: Jonathan Nieder [mailto:jrnie...@gmail.com] Sent: Friday, July 25, 2014 4:19 PM To: Besen, David Cc: git@vger.kernel.org Subject: Re: Amending merge commits? Besen, David wrote: I think one of my coworkers has

Re: Amending merge commits?

2014-07-25 Thread Jonathan Nieder
David Besen wrote: Jonathan Nieder wrote: This is how pull --rebase works. It turns your single-parent commits into a sequence of patches on top of upstream and completely ignores your merge commits. There is a --rebase=preserve option that makes a halfhearted attempt to preserve your

Re: [PATCH 3/4] refs.c: move ref parsing code out of resolve_ref()

2014-07-25 Thread Duy Nguyen
On Fri, Jul 25, 2014 at 11:12 PM, Ronnie Sahlberg sahlb...@google.com wrote: diff --git a/refs.c b/refs.c index bec2bb1..2769f20 100644 --- a/refs.c +++ b/refs.c @@ -1533,6 +1533,105 @@ static int handle_missing_loose_ref(const char *refname, } } +int parse_ref(const char