Re: Help using git subtree

2013-07-30 Thread Gabriel Jover
Al 30/07/13 11:58, En/na Fredrik Gustafsson ha escrit: Git subtree is very convenient to get all the sub-projects into the main-project directory tree and to send back sub-project commits to the corresponding repository. But I don't understand the work flow very well. I haven't used subtree tha

Re: [PATCH 0/3] Remove sq_quote_print() in favor of *_buf

2013-07-30 Thread Ramkumar Ramachandra
Junio C Hamano wrote: > Having said all that, the patch texts all look OK, so I'll queue > them with updated log messages. It was the usual me reacting to > unjustified value judgement made in log messages and cover letters. Thanks. I'll look at how the log messages are different in the queued v

Re: [PATCH v3 3/5] submodule.c: add .gitmodules staging helper functions

2013-07-30 Thread Jens Lehmann
Am 30.07.2013 23:37, schrieb Junio C Hamano: > Jens Lehmann writes: > >> +int is_staging_gitmodules_ok() > > Will tweak this to: > > int is_staging_gitmodules_ok(void) > > and fix this as well: > >> +int is_staging_gitmodules_ok(); >> +void stage_updated_gitmodules(void); > > > before

Re: [PATCH v3 5/5] rm: delete .gitmodules entry of submodules removed from the work tree

2013-07-30 Thread Jens Lehmann
Am 30.07.2013 22:15, schrieb Fredrik Gustafsson: > On Tue, Jul 30, 2013 at 09:51:51PM +0200, Jens Lehmann wrote: >> +/* >> + * Try to remove the "submodule." section from .gitmodules where the >> given >> + * path is configured. Return 0 only if a .gitmodules file was found, a >> section >> + * w

Re: [PATCH] sha1_file: introduce close_one_pack() to close packs on fd pressure

2013-07-30 Thread Brandon Casey
On Tue, Jul 30, 2013 at 12:52 PM, Jeff King wrote: > On Tue, Jul 30, 2013 at 08:39:48AM -0700, Junio C Hamano wrote: > >> Brandon Casey writes: >> >> > From: Brandon Casey >> > >> > When the number of open packs exceeds pack_max_fds, unuse_one_window() >> > is called repeatedly to attempt to rel

Re: [PATCH] tag: Use OPT_BOOL instead of OPT_BOOLEAN to allow one action multiple times

2013-07-30 Thread Junio C Hamano
Stefan Beller writes: > Here is just another idea: > if (cmdmode == 'v') > This may be hard to read, (What is 'v'? I cannot remember > all the alphabet ;)) So maybe we could have an enum instead of > the last parameter? > OPT_CMDMODE( short, long, variable, description, enum) I actually

Re: [PATCH] tag: Use OPT_BOOL instead of OPT_BOOLEAN to allow one action multiple times

2013-07-30 Thread Junio C Hamano
Stefan Beller writes: > Your approach seems more like what we really want, however I'd have > some points: > * Is it a good idea to have so many different OPT_MODE or >OPTION_MODE defines? In my attempts I tried to reuse existing >OPTION_s to not pollute the parsing infrastructure with m

Re: [PATCH v3 3/5] submodule.c: add .gitmodules staging helper functions

2013-07-30 Thread Junio C Hamano
Jens Lehmann writes: > +int is_staging_gitmodules_ok() Will tweak this to: int is_staging_gitmodules_ok(void) and fix this as well: > +int is_staging_gitmodules_ok(); > +void stage_updated_gitmodules(void); before queuing. Thanks. -- To unsubscribe from this list: send the line "un

Re: [PATCH] tag: Use OPT_BOOL instead of OPT_BOOLEAN to allow one action multiple times

2013-07-30 Thread Stefan Beller
On 07/30/13 21:24, Junio C Hamano wrote: > > ... and then "git tag" may become like so. > > builtin/tag.c | 27 --- > 1 file changed, 12 insertions(+), 15 deletions(-) > > diff --git a/builtin/tag.c b/builtin/tag.c > index af3af3f..d8ae5aa 100644 > --- a/builtin/tag.c >

Re: [PATCH] tag: Use OPT_BOOL instead of OPT_BOOLEAN to allow one action multiple times

2013-07-30 Thread Stefan Beller
On 07/30/13 21:24, Junio C Hamano wrote: > Stefan Beller writes: > >> As of b04ba2bb (parse-options: deprecate OPT_BOOLEAN, 2011-09-27), >> the OPT_BOOLEAN was deprecated. >> While I am going to replace the OPT_BOOLEAN by the proposed OPT_BOOL or >> the OPT_COUNTUP to keep existing behavior, this

Re: [PATCH 5/3] revert most of the http_options() change

2013-07-30 Thread Junio C Hamano
"Kyle J. McKay" writes: > And now all the t5200-url-normalize tests pass again. > > FYI, I couldn't get the patches to apply against next or pu without > some minor tweaks that were just conflict resolutions having to do > with git_config_with_options changing its signature. Thanks. I built the

Re: [PATCH v3 5/5] rm: delete .gitmodules entry of submodules removed from the work tree

2013-07-30 Thread Fredrik Gustafsson
On Tue, Jul 30, 2013 at 09:51:51PM +0200, Jens Lehmann wrote: > +/* > + * Try to remove the "submodule." section from .gitmodules where the > given > + * path is configured. Return 0 only if a .gitmodules file was found, a > section > + * with the correct path= setting was found and we could remo

Re: [PATCH] sha1_file: introduce close_one_pack() to close packs on fd pressure

2013-07-30 Thread Jeff King
On Tue, Jul 30, 2013 at 08:39:48AM -0700, Junio C Hamano wrote: > Brandon Casey writes: > > > From: Brandon Casey > > > > When the number of open packs exceeds pack_max_fds, unuse_one_window() > > is called repeatedly to attempt to release the least-recently-used > > pack windows, which, as a s

[PATCH v3 5/5] rm: delete .gitmodules entry of submodules removed from the work tree

2013-07-30 Thread Jens Lehmann
Currently using "git rm" on a submodule removes the submodule's work tree from that of the superproject and the gitlink from the index. But the submodule's section in .gitmodules is left untouched, which is a leftover of the now removed submodule and might irritate users (as opposed to the setting

[PATCH v3 4/5] Teach mv to update the path entry in .gitmodules for moved submodules

2013-07-30 Thread Jens Lehmann
Currently using "git mv" on a submodule moves the submodule's work tree in that of the superproject. But the submodule's path setting in .gitmodules is left untouched, which is now inconsistent with the work tree and makes git commands that rely on the proper path -> name mapping (like status and d

[PATCH v3 3/5] submodule.c: add .gitmodules staging helper functions

2013-07-30 Thread Jens Lehmann
Add the new is_staging_gitmodules_ok() and stage_updated_gitmodules() functions to submodule.c. The first makes it possible for call sites to see if the .gitmodules file did contain any unstaged modifications they would accidentally stage in addition to those they intend to stage themselves. The se

[PATCH v3 2/5] Teach mv to move submodules using a gitfile

2013-07-30 Thread Jens Lehmann
When moving a submodule which uses a gitfile to point to the git directory stored in .git/modules/ of the superproject two changes must be made to make the submodule work: the .git file and the core.worktree setting must be adjusted to point from work tree to git directory and back. Achieve that b

[PATCH v3 1/5] Teach mv to move submodules together with their work trees

2013-07-30 Thread Jens Lehmann
Currently the attempt to use "git mv" on a submodule errors out with: fatal: source directory is empty, source=, destination= The reason is that mv searches for the submodule with a trailing slash in the index, which it doesn't find (because it is stored without a trailing slash). As it doesn't f

[PATCH v3 0/5] Teach mv to move submodules

2013-07-30 Thread Jens Lehmann
Here is my third iteration of this series. Changes to v2 are: - I resolved the conflict with Duy's pathspec series by replacing the use of common_prefix() with relative_path(). - I separated the functions checking for modified unstaged .gitmodules and staging the changes to that file into an

Re: [PATCH 5/3] revert most of the http_options() change

2013-07-30 Thread Kyle J. McKay
On Jul 30, 2013, at 12:14, Kyle J. McKay wrote: On Jul 29, 2013, at 19:13, Junio C Hamano wrote: With the previous preparation step, the earlier 1bb6 (config: add support for http..* settings, 2013-07-21) that introduced many repeated changes: -if (!strcmp("http.key", var)) {

Re: [PATCH] tag: Use OPT_BOOL instead of OPT_BOOLEAN to allow one action multiple times

2013-07-30 Thread Junio C Hamano
Stefan Beller writes: > As of b04ba2bb (parse-options: deprecate OPT_BOOLEAN, 2011-09-27), > the OPT_BOOLEAN was deprecated. > While I am going to replace the OPT_BOOLEAN by the proposed OPT_BOOL or > the OPT_COUNTUP to keep existing behavior, this commit is actually a > bug fix! > > In line 499

Re: [PATCH v2] imap-send: use Apple's Security framework for base64 encoding

2013-07-30 Thread David Aguilar
On Tue, Jul 30, 2013 at 8:54 AM, Junio C Hamano wrote: > David Aguilar writes: > >> From: Jeremy Huddleston >> >> Use Apple's supported functions for base64 encoding instead >> of the deprecated OpenSSL functions. >> >> Signed-off-by: Jeremy Huddleston >> Signed-off-by: David Aguilar >> --- >>

Re: [PATCH 3/3] config: --get-urlmatch

2013-07-30 Thread Kyle J. McKay
On Jul 29, 2013, at 15:49, Junio C Hamano wrote: "git config --get-urlmatch $section[.$variable] $url" is a way to learn what the configured value for $section.$variable is for the given URL, using the logic introduced by the http..config topic. In addition to $section.$variable, entries in the

Re: [PATCH 5/3] revert most of the http_options() change

2013-07-30 Thread Kyle J. McKay
On Jul 29, 2013, at 19:13, Junio C Hamano wrote: With the previous preparation step, the earlier 1bb6 (config: add support for http..* settings, 2013-07-21) that introduced many repeated changes: -if (!strcmp("http.key", var)) { +if (!strcmp("key", key)) { + if (m

[PATCH] tag: Use OPT_BOOL instead of OPT_BOOLEAN to allow one action multiple times

2013-07-30 Thread Stefan Beller
As of b04ba2bb (parse-options: deprecate OPT_BOOLEAN, 2011-09-27), the OPT_BOOLEAN was deprecated. While I am going to replace the OPT_BOOLEAN by the proposed OPT_BOOL or the OPT_COUNTUP to keep existing behavior, this commit is actually a bug fix! In line 499 we have: if (list + delete +

Re: ANNOUNCE: git-integration -- Easily manage integration branches

2013-07-30 Thread John Keeping
On Tue, Jul 30, 2013 at 09:45:49AM -0700, Junio C Hamano wrote: > John Keeping writes: > > > I wrote this script a few months ago and have been using it pretty much > > daily since then, so I figure it's time to see if anyone else finds it > > useful... > > > > git-integration [1] is a script to

Re: ANNOUNCE: git-integration -- Easily manage integration branches

2013-07-30 Thread Junio C Hamano
John Keeping writes: > I wrote this script a few months ago and have been using it pretty much > daily since then, so I figure it's time to see if anyone else finds it > useful... > > git-integration [1] is a script to help manage integration branches in > Git. By defining a base point and a set

Re: [PATCH] Specify UK English for the documentation source files.

2013-07-30 Thread Junio C Hamano
Marc Branchaud writes: > This will hopefully avoid questions over which spelling and grammar should > be used. Translators are of course free to create localizations for other > English dialects. > > Signed-off-by: Marc Branchaud > --- > > Although I'm Canadian I figured en_CA would be a little

Re: [PATCH v2] imap-send: use Apple's Security framework for base64 encoding

2013-07-30 Thread Junio C Hamano
David Aguilar writes: > From: Jeremy Huddleston > > Use Apple's supported functions for base64 encoding instead > of the deprecated OpenSSL functions. > > Signed-off-by: Jeremy Huddleston > Signed-off-by: David Aguilar > --- > This version moves the tricky #ifdefs into git-compat-util.h Nice.

Re: [PATCH] Specify UK English for the documentation source files.

2013-07-30 Thread Fredrik Gustafsson
On Tue, Jul 30, 2013 at 11:11:54AM -0400, Marc Branchaud wrote: > This will hopefully avoid questions over which spelling and grammar should > be used. Translators are of course free to create localizations for other > English dialects. > > Signed-off-by: Marc Branchaud > --- > > Although I'm C

ANNOUNCE: git-integration -- Easily manage integration branches

2013-07-30 Thread John Keeping
I wrote this script a few months ago and have been using it pretty much daily since then, so I figure it's time to see if anyone else finds it useful... git-integration [1] is a script to help manage integration branches in Git. By defining a base point and a set of branches to be merged to form

Re: [PATCH] sha1_file: introduce close_one_pack() to close packs on fd pressure

2013-07-30 Thread Junio C Hamano
Brandon Casey writes: > From: Brandon Casey > > When the number of open packs exceeds pack_max_fds, unuse_one_window() > is called repeatedly to attempt to release the least-recently-used > pack windows, which, as a side-effect, will also close a pack file > after closing its last open window.

Re: [PATCH 0/3] Remove sq_quote_print() in favor of *_buf

2013-07-30 Thread Junio C Hamano
Junio C Hamano writes: > Ramkumar Ramachandra writes: > >> While going through the for-each-ref-pretty series that Duy and I were >> developing, I noticed that this cleanup was independent and good >> as-it-is. >> >> So here it is. > > You always can first allocate a piece of memory and write in

[PATCH] Specify UK English for the documentation source files.

2013-07-30 Thread Marc Branchaud
This will hopefully avoid questions over which spelling and grammar should be used. Translators are of course free to create localizations for other English dialects. Signed-off-by: Marc Branchaud --- Although I'm Canadian I figured en_CA would be a little too parochial. I don't have a strong

Re: [PATCH] Documentation: fix typos in man pages

2013-07-30 Thread Junio C Hamano
Marc Branchaud writes: > I personally don't have a lot of time to investigate the nuances of English. > However, I desperately hope this list can avoid any linguistic flame wars. > In that spirit, I suggest that anyone posting an orthographic patch (i.e. for > something that isn't an obvious spel

Re: [PATCH 0/3] Remove sq_quote_print() in favor of *_buf

2013-07-30 Thread Junio C Hamano
Ramkumar Ramachandra writes: > While going through the for-each-ref-pretty series that Duy and I were > developing, I noticed that this cleanup was independent and good > as-it-is. > > So here it is. You always can first allocate a piece of memory and write into it instead of writing things out

Re: [PATCH] Documentation: fix typos in man pages

2013-07-30 Thread Marc Branchaud
On 13-07-29 05:15 PM, Øystein Walle wrote: > Signed-off-by: Øystein Walle > --- > I thought I'd take part in the typo fixing frenzy :) > > I have some other potential typos lines up. Right now the docs refer to both > 'filesystem' and 'file system', as well as both 'testsuite' and 'test suite'.

Re: [PATCH] contrib/subtree: Fix make install target

2013-07-30 Thread Junio C Hamano
Michal Sojka writes: > If the libexec directory doesn't exist, git-subtree gets installed as > $prefix/share/libexec/git-core file. This patch creates the directory > before installing git-subtree file into it. > > Signed-off-by: Michal Sojka > --- Will queue, as it is obviously correct. Thank

Re: [PATCH 3/3] config: --get-urlmatch

2013-07-30 Thread Junio C Hamano
Jeff King writes: > Ah, I missed that you could leave "key" empty. Yes, the general syntax is git config [--] --get-urlmatch [.] and giving without a specific would list all the variables in the section that apply to . This is why we should do documentation at some point before pub

Re: [PATCH] editor: use canonicalized absolute path

2013-07-30 Thread Junio C Hamano
Duy Nguyen writes: > The idea is the same, but my patch is a bit different (use of realpath > instead of real_path, I didn't remember git has real_path). I'm fine > with Ram being the author. Thanks, both of you, for clarification. >> Compared to not being able to edit, it may be a small price

Re: [PATCH] editor: use canonicalized absolute path

2013-07-30 Thread Duy Nguyen
On Mon, Jul 29, 2013 at 07:56:58AM -0700, Junio C Hamano wrote: > > diff --git a/editor.c b/editor.c > > index 27bdecd..0abbd8d 100644 > > --- a/editor.c > > +++ b/editor.c > > @@ -37,7 +37,7 @@ int launch_editor(const char *path, struct strbuf > > *buffer, const char *const *en > > re

Re: Help using git subtree

2013-07-30 Thread Fredrik Gustafsson
On Tue, Jul 30, 2013 at 11:32:22AM +0200, Gabriel Jover wrote: > Dear all, > > I am trying to avoid using git submodules and thus I am testing if > git subtree fit my needs. > I have a set of sub-projects linked to a main-project. Just out of curiosity, why are you trying to avoid submodules? >

Help using git subtree

2013-07-30 Thread Gabriel Jover
Dear all, I am trying to avoid using git submodules and thus I am testing if git subtree fit my needs. I have a set of sub-projects linked to a main-project. Git subtree is very convenient to get all the sub-projects into the main-project directory tree and to send back sub-project commits t

[PATCH 1/3] for-each-ref, quote: convert *_quote_print -> *_quote_buf

2013-07-30 Thread Ramkumar Ramachandra
From: Nguyễn Thái Ngọc Duy for-each-ref.c:print_value() currently prints values to stdout immediately using {sq|perl|python|tcl}_quote_print, giving us no opportunity to do any further processing. In preparation for getting print_value() to accept an additional strbuf argument to write to, conve

[PATCH 3/3] quote: remove sq_quote_print()

2013-07-30 Thread Ramkumar Ramachandra
Remove sq_quote_print() since it has no callers. A nicer alternative sq_quote_buf() exists: its callers aren't forced to print immediately. For historical context, sq_quote_print() was first introduced in 575ba9d6 (GIT_TRACE: show which built-in/external commands are executed, 2006-06-25) for the

[PATCH 2/3] tar-tree: remove dependency on sq_quote_print()

2013-07-30 Thread Ramkumar Ramachandra
Currently, there is exactly one caller of sq_quote_print(), namely cmd_tar_tree(). In the interest of removing sq_quote_print() and simplification, replace it with an equivalent call to sq_quote_argv(). No functional changes intended. Signed-off-by: Ramkumar Ramachandra Signed-off-by: Nguyễn Thá

[PATCH 0/3] Remove sq_quote_print() in favor of *_buf

2013-07-30 Thread Ramkumar Ramachandra
Hi, While going through the for-each-ref-pretty series that Duy and I were developing, I noticed that this cleanup was independent and good as-it-is. So here it is. Nguyễn Thái Ngọc Duy (1): for-each-ref, quote: convert *_quote_print -> *_quote_buf Ramkumar Ramachandra (2): tar-tree: remove

[PATCH] contrib/subtree: Fix make install target

2013-07-30 Thread Michal Sojka
If the libexec directory doesn't exist, git-subtree gets installed as $prefix/share/libexec/git-core file. This patch creates the directory before installing git-subtree file into it. Signed-off-by: Michal Sojka --- contrib/subtree/Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/con

Re: [PATCH 3/3] config: --get-urlmatch

2013-07-30 Thread Jeff King
On Mon, Jul 29, 2013 at 06:33:43PM -0700, Junio C Hamano wrote: > Jeff King writes: > > >> +struct urlmatch_item { > >> + size_t max_matched_len; > >> + char user_matched; > >> + char value_is_null; > >> + struct strbuf value; > >> +}; > > > > I think you ultimately want such a string_list f

Re: [PATCH] sha1_file: introduce close_one_pack() to close packs on fd pressure

2013-07-30 Thread Eric Sunshine
On Tue, Jul 30, 2013 at 12:05 AM, Brandon Casey wrote: > When the number of open packs exceeds pack_max_fds, unuse_one_window() > is called repeatedly to attempt to release the least-recently-used > pack windows, which, as a side-effect, will also close a pack file > after closing its last open wi