[RFC PATCH] hashmap API: introduce for_each_hashmap_entry() helper macro

2016-03-19 Thread Alexander Kuleshov
. It encapsulates loop over a hashmap, some related variables and makes bypass of a hashmap more readable. This patch has not functioal changes, so behaviour still the same as before. Signed-off-by: Alexander Kuleshov <kuleshovm...@gmail.com> --- Documentation/technical/api-hashmap.t

[PATCH] help.c: strip suffix only if the STRIP_EXTENSION defined

2016-03-19 Thread Alexander Kuleshov
We stripping extension in the list_commands_in_dir() to get commands without '.exe' suffix. Let's do it only if STRIP_EXTENSION is defined to not spend time for unnecessary strip_suffix() call in this case. Signed-off-by: Alexander Kuleshov <kuleshovm...@gmail.com> --- help.c | 5 +++--

[PATCH v2] hashmap API: introduce for_each_hashmap_entry() helper macro

2016-03-19 Thread Alexander Kuleshov
. It encapsulates loop over a hashmap and makes bypass of a hashmap more readable. This patch has not functioal changes, so behaviour still the same as before. Signed-off-by: Alexander Kuleshov <kuleshovm...@gmail.com> --- Documentation/technical/api-hashmap.txt | 5 + builtin/desc

Re: [PATCH] help.c: strip suffix only if the STRIP_EXTENSION defined

2016-03-19 Thread Alexander Kuleshov
Hello Jeff, On Wed, Mar 16, 2016 at 11:31 PM, Jeff King wrote: > This is billed as an optimization in the commit message, but these two > pieces of code are not the same. The original always strips ".exe", > whether or not STRIP_EXTENSION is defined, and whether or not it is >

Re: [PATCH] help.c: strip suffix only if the STRIP_EXTENSION defined

2016-03-19 Thread Alexander Kuleshov
On Wed, Mar 16, 2016 at 8:47 PM, Duy Nguyen <pclo...@gmail.com> wrote: > On Wed, Mar 16, 2016 at 9:27 PM, Alexander Kuleshov > <kuleshovm...@gmail.com> wrote: >> We stripping extension in the list_commands_in_dir() to get >> commands without '.exe' suffix. Let's

Re: [RFC PATCH] hashmap API: introduce for_each_hashmap_entry() helper macro

2016-03-18 Thread Alexander Kuleshov
Hello Junio, On Thu, Mar 17, 2016 at 12:09 AM, Junio C Hamano <gits...@pobox.com> wrote: > Alexander Kuleshov <kuleshovm...@gmail.com> writes: > >> diff --git a/hashmap.h b/hashmap.h >> index ab7958a..b8b158c 100644 >> --- a/hashmap.h >> +++ b/hashmap.h

[PATCH v3] submodule-config: use hashmap_iter_first()

2016-03-16 Thread Alexander Kuleshov
The hashmap API provides hashmap_iter_first() helper for initialion and getting the first entry of a hashmap. Let's use it instead of doing initialization manually and then get the first entry. There are no functional changes, just cleanup. Signed-off-by: Alexander Kuleshov <kulesh

[PATCH v2] submodule-config: use hashmap_iter_first()

2016-03-15 Thread Alexander Kuleshov
from the for simplification. Signed-off-by: Alexander Kuleshov <kuleshovm...@gmail.com> Reviewed-by: Stefan Beller <sbel...@google.com> --- Changelog: added missed Signof-off-by and function name fixed in the commit message. submodule-config.c | 3 +-- 1 file changed, 1 ins

Re: [PATCH] submodule-config: use hashmap_iter_init()

2016-03-15 Thread Alexander Kuleshov
On Wed, Mar 16, 2016 at 1:08 AM, Stefan Beller wrote: > The change looks correct to me. But as Eric said, the commit message > needs work and a sign off. With that, > Reviewed-by: Stefan Beller Ah, yes, forgot to pass `-s` to commit command. Sorry for

[PATCH] submodule-config: use hashmap_iter_init()

2016-03-15 Thread Alexander Kuleshov
from the for simplification. --- submodule-config.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/submodule-config.c b/submodule-config.c index b82d1fb..8ac5031 100644 --- a/submodule-config.c +++ b/submodule-config.c @@ -405,8 +405,7 @@ static const struct submodule

[PATCH] environment.c: introduce DECLARE_GIT_GETTER helper macro

2016-02-27 Thread Alexander Kuleshov
-by: Alexander Kuleshov <kuleshovm...@gmail.com> --- environment.c | 49 ++--- 1 file changed, 14 insertions(+), 35 deletions(-) diff --git a/environment.c b/environment.c index 6dec9d0..f10fc7a 100644 --- a/environment.c +++ b/environment.c @@ -126,6 +

Re: [PATCH] environment.c: introduce SETUP_GIT_ENV helper macro

2016-02-27 Thread Alexander Kuleshov
Hello Junio, On Sun, Feb 28, 2016 at 12:50 AM, Junio C Hamano wrote: > Junio C Hamano writes: > > >> Please don't. A macro that hides "return" makes things harder to >> follow, not easier. I will consider it next time. > Having said that, I do think a

[PATCH] environment.c: introduce SETUP_GIT_ENV helper macro

2016-02-27 Thread Alexander Kuleshov
The environment.c contans a couple of functions which are consist from the following pattern: if (!env) setup_git_env(); return env; Let's move this to the SETUP_GIT_ENV helper macro to prevent code duplication in these functions. Signed-off-by: Alexander

[PATCH v2] git.c: simplify stripping extension of a file in handle_builtin()

2016-02-21 Thread Alexander Kuleshov
. Signed-off-by: Alexander Kuleshov <kuleshovm...@gmail.com> Helped-by: Jeff King <p...@peff.net> --- Changelog: v2: typos fixed in commit message. git-compat-util.h | 4 git.c | 26 +++--- 2 files changed, 15 insertions(+), 15 deletions(-) diff

[PATCH] git.c: simplify striping extension of a file in handle_builtin()

2016-02-20 Thread Alexander Kuleshov
. Signed-off-by: Alexander Kuleshov <kuleshovm...@gmail.com> Helped-by: Jeff King <p...@peff.net> --- git-compat-util.h | 4 git.c | 26 +++--- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/git-compat-util.h b/git-compat-util.h i

Re: [PATCH] git-compat-util.h: move extension stripping from handle_builtin()

2016-02-20 Thread Alexander Kuleshov
Hello Jeff, On 02-20-16, Jeff King wrote: > On Sat, Feb 20, 2016 at 02:10:58PM +0600, Alexander Kuleshov wrote: > > I'm not convinced that moving the functions inline into git-compat-util > is actually cleaner. We've expanded the interface that is visible to the > whole code bas

[PATCH] git-compat-util.h: move extension stripping from handle_builtin()

2016-02-20 Thread Alexander Kuleshov
The handle_builtin() starts from striping of command extension if STRIP_EXTENSION is enabled. As this is an OS dependent, let's move to the git-compat-util.h as all similar functions to do handle_builtin() more cleaner. --- git-compat-util.h | 18 ++ git.c | 13

[PATCH] exec_cmd.c: use find_last_dir_sep() for code simplification

2016-02-19 Thread Alexander Kuleshov
We are trying to extract dirname from argv0 in the git_extract_argv0_path(). But in the same time, the provides find_last_dir_sep() to get dirname from a given path. Let's use it instead of loop for the code simplification. Signed-off-by: Alexander Kuleshov <kuleshovm...@gmail.

Re: [PATCH] commit: add commit.signoff config option

2015-06-25 Thread Alexander Kuleshov
On 06/25, cmarc...@gmail.com wrote: From: Caio Marcelo de Oliveira Filho cmarc...@gmail.com In projects that use Signed-off-by, it's convenient to include that line in the commit by default. The commit.signoff config option allows to add that line in all commits automatically. Document

Re: [PATCH] format-patch: introduce format.outputDirectory configuration

2015-06-19 Thread Alexander Kuleshov
Hello Jeff and Junio, Thank you for feedback and help. I think also I need to add yet another test which tests case when configuration option is set and -o passed. I'll make changes and resend the patch. Thank you. 2015-06-19 10:14 GMT+06:00 Jeff King p...@peff.net: On Thu, Jun 18, 2015 at

Re: [PATCH] format-patch: introduce format.outputDirectory configuration

2015-06-19 Thread Alexander Kuleshov
2015-06-19 3:46 GMT+06:00 Junio C Hamano gits...@pobox.com: I agree with later -o should override an earlier one, but I do not necessarily agree with '-o -' should be --stdout, for a simple reason that -o foo is not --stdout foo. Perhaps something like this to replace builtin/ part of

Re: [PATCH] format-patch: introduce format.outputDirectory configuration

2015-06-19 Thread Alexander Kuleshov
I thought I made that if we did not see '-o dir' on the command line, initialize output_directory to what we read from the config before we make a call to set_outdir(). What I am missing? Puzzled... FWIW, IIRC, the patch you are responding to passed the test you added. Ok, Now we have:

Re: [PATCH] format-patch: introduce format.outputDirectory configuration

2015-06-19 Thread Alexander Kuleshov
Ah, you mean to put this check before. Just tested it and many tests are broken. Will look on it now 2015-06-19 23:19 GMT+06:00 Alexander Kuleshov kuleshovm...@gmail.com: I thought I made that if we did not see '-o dir' on the command line, initialize output_directory to what we read from

[PATCH v2] format-patch: introduce format.outputDirectory configuration

2015-06-19 Thread Alexander Kuleshov
line option. Signed-off-by: Alexander Kuleshov kuleshovm...@gmail.com --- Documentation/config.txt | 4 Documentation/git-format-patch.txt | 6 +- builtin/log.c | 8 t/t4014-format-patch.sh| 18 ++ 4 files changed, 35

[PATCH] format-patch: introduce format.outputDirectory configuration

2015-06-18 Thread Alexander Kuleshov
line option. Signed-off-by: Alexander Kuleshov kuleshovm...@gmail.com --- Documentation/config.txt | 4 builtin/log.c| 14 -- t/t4014-format-patch.sh | 9 + 3 files changed, 25 insertions(+), 2 deletions(-) diff --git a/Documentation/config.txt b

[PATCH] clean: describe --dry-run option in a more clear way in the usage string

2015-05-04 Thread Alexander Kuleshov
Signed-off-by: Alexander Kuleshov kuleshovm...@gmail.com --- builtin/clean.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/builtin/clean.c b/builtin/clean.c index 17a1c13..01aae96 100644 --- a/builtin/clean.c +++ b/builtin/clean.c @@ -891,7 +891,7 @@ int cmd_clean(int argc

[PATCH RFC] add: Do not open editor if patch is empty

2015-04-26 Thread Alexander Kuleshov
If we'll run 'git add -e path' on a path which has no difference with the current index, empty editor will open. This patch prevents this behaviour and checks that patch is not empty before an editor with patch will be opened. Signed-off-by: Alexander Kuleshov kuleshovm...@gmail.com --- builtin

Re: [PATCH RFC] init-db: introduce new -c/--config option

2015-03-25 Thread Alexander Kuleshov
Hello All, I'm not sure about two things: 1. Is there any way to do this with the current git? At least i didn't find how to do it, so decided to write this patch. If there is already ability to do the same without this patch, please let me know. 2. Now current patch overwrite the value of the

[PATCH RFC] init-db: introduce new -c/--config option

2015-03-25 Thread Alexander Kuleshov
of this option is to get rid of the manual editing of the config. Signed-off-by: Alexander Kuleshov kuleshovm...@gmail.com --- Documentation/git-init.txt | 11 ++- builtin/init-db.c | 33 +++-- t/t0001-init.sh| 16 3 files changed, 57

Re: [PATCH RFC 1/3] add: add new --exclude option to git add

2015-03-16 Thread Alexander Kuleshov
Isn't the problem one of how are users to discover such magic. Yes it was main reason. -- 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

[PATCH RFC 1/3] add: add new --exclude option to git add

2015-03-15 Thread Alexander Kuleshov
line in addition to which found in the ignore files. Signed-off-by: Alexander Kuleshov kuleshovm...@gmail.com --- builtin/add.c | 20 1 file changed, 20 insertions(+) diff --git a/builtin/add.c b/builtin/add.c index 3390933..5c602a6 100644 --- a/builtin/add.c +++ b/builtin

[PATCH 3/3] t3700-add: added test for --exclude option

2015-03-15 Thread Alexander Kuleshov
Signed-off-by: Alexander Kuleshov kuleshovm...@gmail.com --- t/t3700-add.sh | 7 +++ 1 file changed, 7 insertions(+) diff --git a/t/t3700-add.sh b/t/t3700-add.sh index f7ff1f5..c52a5d0 100755 --- a/t/t3700-add.sh +++ b/t/t3700-add.sh @@ -81,6 +81,13 @@ test_expect_success '.gitignore

[PATCH 2/3] Documentation/git-add.txt: describe --exclude option

2015-03-15 Thread Alexander Kuleshov
Signed-off-by: Alexander Kuleshov kuleshovm...@gmail.com --- Documentation/git-add.txt | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Documentation/git-add.txt b/Documentation/git-add.txt index f2eb907..4bc156a 100644 --- a/Documentation/git-add.txt +++ b/Documentation

Re: [PATCH] git.c: two memory leak fixes

2015-03-15 Thread Alexander Kuleshov
Hello Junio, This is technically correct, but do we really care about it? Yes, as i saw handle_alias called once, and we no need to care about it. I think it is wrong to free alias_string after passing it to split_cmdline() and while you still need to use the new_argv. Yes, right. sorry for

Re: [PATCH RFC 1/3] add: add new --exclude option to git add

2015-03-15 Thread Alexander Kuleshov
Hello All, s /no/not/ ?? Thank you Philip. 2015-03-15 23:51 GMT+06:00 Torsten Bögershausen tbo...@web.de: On 2015-03-15 14.49, Alexander Kuleshov wrote: Thanks for working on Git, some minor remarks/suggestions inline. This patch introduces new --exclude option for the git add command

[PATCH 2/3 v2] Documentation/git-add.txt: describe --exclude option

2015-03-15 Thread Alexander Kuleshov
Helped-by: Eric Sunshine sunsh...@sunshineco.com Signed-off-by: Alexander Kuleshov kuleshovm...@gmail.com --- Documentation/git-add.txt | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Documentation/git-add.txt b/Documentation/git-add.txt index f2eb907..fee97ed 100644

[PATCH 3/3 v2] t3700-add: added test for --exclude option

2015-03-15 Thread Alexander Kuleshov
Signed-off-by: Alexander Kuleshov kuleshovm...@gmail.com --- t/t3700-add.sh | 18 ++ 1 file changed, 18 insertions(+) diff --git a/t/t3700-add.sh b/t/t3700-add.sh index f7ff1f5..6f71c67 100755 --- a/t/t3700-add.sh +++ b/t/t3700-add.sh @@ -332,4 +332,22 @@ test_expect_success 'git

[PATCH 1/3 v2] add: introduce new --exclude option

2015-03-15 Thread Alexander Kuleshov
-by: Philip Oakley philipoak...@iee.org Signed-off-by: Alexander Kuleshov kuleshovm...@gmail.com --- builtin/add.c | 12 1 file changed, 12 insertions(+) diff --git a/builtin/add.c b/builtin/add.c index 3390933..e165fbc 100644 --- a/builtin/add.c +++ b/builtin/add.c @@ -244,6 +244,8

[PATCH] git.c: two memory leak fixes

2015-03-14 Thread Alexander Kuleshov
variable in the alias_lookup function, need to free it. Signed-off-by: Alexander Kuleshov kuleshovm...@gmail.com --- git.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/git.c b/git.c index 086fac1..501e5bd 100644 --- a/git.c +++ b/git.c @@ -252,6 +252,7 @@ static int handle_alias(int *argcp

[PATCH 3/3] Documentation/git-hash-object.txt: add verbose option for hash-object

2015-03-02 Thread Alexander Kuleshov
Signed-off-by: Alexander Kuleshov kuleshovm...@gmail.com --- Documentation/git-hash-object.txt | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Documentation/git-hash-object.txt b/Documentation/git-hash-object.txt index 02c1f12..efec7c6 100644 --- a/Documentation/git

[PATCH] git: make was_alias and done_help non-static

2015-03-02 Thread Alexander Kuleshov
-by: Alexander Kuleshov kuleshovm...@gmail.com Helped-by: Eric Sunshine sunsh...@sunshineco.com --- git.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/git.c b/git.c index 1780233..96723b8 100644 --- a/git.c +++ b/git.c @@ -619,6 +619,7 @@ int main(int argc, char **av

[PATCH 1/3] hash-object: add -v/--verbose option

2015-03-02 Thread Alexander Kuleshov
e69de29bb2d1d6434b8b29ae775ad8c2e48c5391test Signed-off-by: Alexander Kuleshov kuleshovm...@gmail.com --- builtin/hash-object.c | 15 +-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/builtin/hash-object.c b/builtin/hash-object.c index 207b90c..97961ee 100644

[PATCH 2/3] t1007-hash-object: add tests for verbose hash-object

2015-03-02 Thread Alexander Kuleshov
Signed-off-by: Alexander Kuleshov kuleshovm...@gmail.com --- t/t1007-hash-object.sh | 11 +++ 1 file changed, 11 insertions(+) diff --git a/t/t1007-hash-object.sh b/t/t1007-hash-object.sh index f83df8e..fa957bf 100755 --- a/t/t1007-hash-object.sh +++ b/t/t1007-hash-object.sh @@ -201,4

[PATCH] git: make was_alias non-static

2015-02-28 Thread Alexander Kuleshov
'was_alias' variable does not need to store it's value each iteration in the loop, anyway this variable changes it's value with run_argv. So it does not need to be static. Signed-off-by: Alexander Kuleshov kuleshovm...@gmail.com --- git.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion

[PATCH] Git.pm: two minor typo fixes

2015-02-18 Thread Alexander Kuleshov
Signed-off-by: Alexander Kuleshov kuleshovm...@gmail.com --- perl/Git.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/perl/Git.pm b/perl/Git.pm index b5905ee..9026a7b 100644 --- a/perl/Git.pm +++ b/perl/Git.pm @@ -695,7 +695,7 @@ Retrieve the integer configuration

[PATCH] INSTALL: minor typo fix

2015-01-27 Thread Alexander Kuleshov
Signed-off-by: Alexander Kuleshov kuleshovm...@gmail.com --- INSTALL | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/INSTALL b/INSTALL index ffb071e..6f1c3d5 100644 --- a/INSTALL +++ b/INSTALL @@ -53,7 +53,7 @@ or As a caveat: a profile-optimized build takes a *lot* longer

[PATCH] Documentation/git-add.txt: add `add.ginore-errors` configuration variable

2015-01-26 Thread Alexander Kuleshov
'git add' supports not only `add.ignoreErrors`, but also `add.ignore-errors` configuration variable. Signed-off-by: Alexander Kuleshov kuleshovm...@gmail.com --- Documentation/git-add.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Documentation/git-add.txt b

Re: [PATCH 0/7] Coding style fixes.

2015-01-23 Thread Alexander Kuleshov
I made separate patch for every file. Please, let me know if need to squash it into one commit. 2015-01-23 17:06 GMT+06:00 Alexander Kuleshov kuleshovm...@gmail.com: This patch set contatins minor style fixes. CodingGuidelines contains rule that the star must side with variable name

[PATCH 0/7] Coding style fixes.

2015-01-23 Thread Alexander Kuleshov
This patch set contatins minor style fixes. CodingGuidelines contains rule that the star must side with variable name. Alexander Kuleshov (7): show-branch: minor style fix clone: minor style fix test-hashmap: minor style fix http-backend: minor style fix refs: minor style fix quote

[PATCH 3/7] test-hashmap: minor style fix

2015-01-23 Thread Alexander Kuleshov
Asterisk must be next with variable Signed-off-by: Alexander Kuleshov kuleshovm...@gmail.com --- test-hashmap.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test-hashmap.c b/test-hashmap.c index cc2891d..5f67120 100644 --- a/test-hashmap.c +++ b/test-hashmap.c

[PATCH 4/7] http-backend: minor style fix

2015-01-23 Thread Alexander Kuleshov
Asterisk must be next with variable Signed-off-by: Alexander Kuleshov kuleshovm...@gmail.com --- http-backend.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/http-backend.c b/http-backend.c index b6c0484..7b5670b 100644 --- a/http-backend.c +++ b/http-backend.c @@ -515,7

[PATCH 2/7] clone: minor style fix

2015-01-23 Thread Alexander Kuleshov
Asterisk must be next with variable Signed-off-by: Alexander Kuleshov kuleshovm...@gmail.com --- builtin/clone.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/builtin/clone.c b/builtin/clone.c index d262a4d..a1ca780 100644 --- a/builtin/clone.c +++ b/builtin/clone.c

[PATCH 5/7] refs: minor style fix

2015-01-23 Thread Alexander Kuleshov
Asterisk must be next with variable Signed-off-by: Alexander Kuleshov kuleshovm...@gmail.com --- refs.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/refs.h b/refs.h index 425ecf7..bd8afe2 100644 --- a/refs.h +++ b/refs.h @@ -86,7 +86,7 @@ extern int for_each_branch_ref

[PATCH 7/7] fast-import: minor style fix

2015-01-23 Thread Alexander Kuleshov
Asterisk must be next with variable Signed-off-by: Alexander Kuleshov kuleshovm...@gmail.com --- fast-import.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fast-import.c b/fast-import.c index 1b50923..fec67ca 100644 --- a/fast-import.c +++ b/fast-import.c @@ -3110,7

[PATCH 6/7] quote: minor style fix

2015-01-23 Thread Alexander Kuleshov
Asterisk must be next with variable Signed-off-by: Alexander Kuleshov kuleshovm...@gmail.com --- quote.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/quote.c b/quote.c index 7920e18..02e9a3c 100644 --- a/quote.c +++ b/quote.c @@ -42,7 +42,7 @@ void sq_quote_buf(struct

[PATCH 1/7] show-branch: minor style fix

2015-01-23 Thread Alexander Kuleshov
Asterisk must be next with variable Signed-off-by: Alexander Kuleshov kuleshovm...@gmail.com --- builtin/show-branch.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/builtin/show-branch.c b/builtin/show-branch.c index 3a7ec55..e7684c8 100644 --- a/builtin/show-branch.c +++ b

[PATCH] Makefile: do not compile git with debugging symbols by default

2015-01-22 Thread Alexander Kuleshov
Standard user has no need in debugging information. This patch adds DEBUG=1 option to compile git with debugging symbols and compile without it by default. Signed-off-by: Alexander Kuleshov kuleshovm...@gmail.com --- Makefile | 9 - 1 file changed, 8 insertions(+), 1 deletion(-) diff

[PATCH] parse-opts: add OPT_SUBCMD()

2015-01-22 Thread Alexander Kuleshov
OPT_SUBCMD can be used for parsing git commands which has not only short/long options, but subcomands. For example: git bundle (create, verify and etc...) or git remote (add, rename and etc...) Signed-off-by: Alexander Kuleshov kuleshovm...@gmail.com --- parse-options.c | 25

[PATCH] git-add--interactive: return from list_and_choose if there is zero candidates

2015-01-22 Thread Alexander Kuleshov
. Signed-off-by: Alexander Kuleshov kuleshovm...@gmail.com --- git-add--interactive.perl | 5 + 1 file changed, 5 insertions(+) diff --git a/git-add--interactive.perl b/git-add--interactive.perl index 94b988c..85b2fe7 100755 --- a/git-add--interactive.perl +++ b/git-add--interactive.perl

Re: [PATCH] Makefile: do not compile git with debugging symbols by default

2015-01-22 Thread Alexander Kuleshov
) $(QUIET_LINK)$(CC) $(ALL_CFLAGS) -o $@ $(ALL_LDFLAGS) git.o \ $(BUILTIN_OBJS) $(LIBS) ifneq ($(DEBUG),1) $(MAKE) strip endif Thank you. 2015-01-22 19:00 GMT+06:00 Jeff King p...@peff.net: On Thu, Jan 22, 2015 at 06:50:37PM +0600, Alexander Kuleshov wrote: Standard user has

Re: [PATCH] Makefile: do not compile git with debugging symbols by default

2015-01-22 Thread Alexander Kuleshov
Or even still -g as it now, because anyway debugging info will be removed with stripping 2015-01-22 22:51 GMT+06:00 Alexander Kuleshov kuleshovm...@gmail.com: Hello Jeff, Yes, main point is size of executable. I'm sorry, didn't see 'strip' target. What if we will strip git and other

[PATCH] i18n: bundle: mark git-bundle usage for translation

2015-01-21 Thread Alexander Kuleshov
Signed-off-by: Alexander Kuleshov kuleshovm...@gmail.com --- builtin/bundle.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/builtin/bundle.c b/builtin/bundle.c index 92a8a60..ca4a6a4 100644 --- a/builtin/bundle.c +++ b/builtin/bundle.c @@ -10,10 +10,10

[PATCH] git-add--interactive: print message if there are no untracked files

2015-01-21 Thread Alexander Kuleshov
If user selects 'add untracked' and there are no untracked files, Add untracked opens. But it does not make sense in this case, because there are no untracked files. So let's print message and exit from add untracked mode. Signed-off-by: Alexander Kuleshov kuleshovm...@gmail.com --- git-add

Re: [PATCH] i18n: bundle: mark git-bundle usage for translation

2015-01-21 Thread Alexander Kuleshov
Ok, understand. How to be with it? Resend after 2.3? Thank you. 2015-01-22 3:13 GMT+06:00 Junio C Hamano gits...@pobox.com: Thanks, but please hold this off until the 2.3 final is tagged. It is way too late for anything that is not a regression fix at this point in this cycle, and changes

Re: [PATCH] git-add--interactive: print message if there are no untracked files

2015-01-21 Thread Alexander Kuleshov
No i don't see any reasons why list_and_choose() shoud give a prompt without candidates. Will resed patch. Thank you. 2015-01-22 3:17 GMT+06:00 Junio C Hamano gits...@pobox.com: Junio C Hamano gits...@pobox.com writes: sub add_untracked_cmd { -my @add = list_and_choose({ PROMPT = 'Add

[PATCH 1/2] pack-bitmap: fix typo

2015-01-21 Thread Alexander Kuleshov
Signed-off-by: Alexander Kuleshov kuleshovm...@gmail.com --- pack-bitmap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pack-bitmap.c b/pack-bitmap.c index 0cd85f6..365f9d9 100644 --- a/pack-bitmap.c +++ b/pack-bitmap.c @@ -60,7 +60,7 @@ static struct bitmap_index

[PATCH 2/2] t/lib-terminal.sh: fix typo

2015-01-21 Thread Alexander Kuleshov
Signed-off-by: Alexander Kuleshov kuleshovm...@gmail.com --- t/lib-terminal.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/t/lib-terminal.sh b/t/lib-terminal.sh index 5184549..cd220e3 100644 --- a/t/lib-terminal.sh +++ b/t/lib-terminal.sh @@ -1,7 +1,7 @@ # Helpers

Re: [PATCH v2] Makefile: collect some Makefile variables instead of directly assignment

2015-01-21 Thread Alexander Kuleshov
Hello Junio, 2015-01-21 15:23 GMT+06:00 Junio C Hamano gits...@pobox.com: Alexander Kuleshov kuleshovm...@gmail.com writes: Some of Makefile variables as TEST_PROGRAMS_NEED_X and BUILTIN_OBJS filled directly by hand, let's collect it with the standard functions of 'make' util. I am

[PATCH v2] Makefile: collect some Makefile variables instead of directly assignment

2015-01-21 Thread Alexander Kuleshov
Some of Makefile variables as TEST_PROGRAMS_NEED_X and BUILTIN_OBJS filled directly by hand, let's collect it with the standard functions of 'make' util. Signed-off-by: Alexander Kuleshov kuleshovm...@gmail.com --- Makefile | 134 +-- 1

[PATCH 0/2] Fix typos in various places

2015-01-21 Thread Alexander Kuleshov
These patches provides two minor typo fixes in pack-bitmap.c and t/lib-terminal.sh Alexander Kuleshov (2): pack-bitmap: fix typo t/lib-terminal.sh: fix typo pack-bitmap.c | 2 +- t/lib-terminal.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) -- 2.3.0-rc1

[PATCH 0/2] Fix typos in various places

2015-01-21 Thread Alexander Kuleshov
These patches provides two minor typo fixes in pack-bitmap.c and t/lib-terminal.sh Alexander Kuleshov (2): pack-bitmap: fix typo t/lib-terminal.sh: fix typo pack-bitmap.c | 2 +- t/lib-terminal.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) -- 2.3.0-rc1

[PATCH] move MAXDEPTH definition to the cache.h

2015-01-20 Thread Alexander Kuleshov
There are a couple of source code files as abspath.c, lockfile.c and etc..., which defines MAXDEPTH macro. All of these definitions are the same, so let's move MAXDEPTH definition to the cache.h instead of directly declaration of this macro in all these files. Signed-off-by: Alexander Kuleshov

[PATCH] hash-object: add -t and --no-filters options to the hash-object synopsis

2015-01-20 Thread Alexander Kuleshov
Signed-off-by: Alexander Kuleshov kuleshovm...@gmail.com --- builtin/hash-object.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/builtin/hash-object.c b/builtin/hash-object.c index 207b90c..a8100a7 100644 --- a/builtin/hash-object.c +++ b/builtin/hash-object.c @@ -80,7 +80,7

[PATCH v2] Documentation/git-branch.txt: add long options to git branch synopsis

2015-01-17 Thread Alexander Kuleshov
Signed-off-by: Alexander Kuleshov kuleshovm...@gmail.com --- Documentation/git-branch.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Documentation/git-branch.txt b/Documentation/git-branch.txt index 311b336..722f865 100644 --- a/Documentation/git-branch.txt +++ b

[PATCH v2] branch: add support for --dry-run option

2015-01-17 Thread Alexander Kuleshov
branch -d -n a b c delete branch 'a' (261c0d1) delete branch 'b' (261c0d1) delete branch 'c' (261c0d1) Signed-off-by: Alexander Kuleshov kuleshovm...@gmail.com --- Documentation/git-branch.txt | 11 +-- builtin/branch.c | 13 + 2 files changed, 22 insertions

[PATCH] branch: add support for --dry-run option

2015-01-16 Thread Alexander Kuleshov
branch -d -n a b c delete branch 'a' (261c0d1) delete branch 'b' (261c0d1) delete branch 'c' (261c0d1) Signed-off-by: Alexander Kuleshov kuleshovm...@gmail.com --- Documentation/git-branch.txt | 11 +-- builtin/branch.c | 13 + 2 files changed, 22 insertions

[PATCH] Documentation/git-branch.txt: add short option to git branch synopsis

2015-01-16 Thread Alexander Kuleshov
Signed-off-by: Alexander Kuleshov kuleshovm...@gmail.com --- Documentation/git-branch.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Documentation/git-branch.txt b/Documentation/git-branch.txt index 311b336..722f865 100644 --- a/Documentation/git-branch.txt +++ b

Re: [PATCH v2] Documentation/init-db.txt: minor style and synopsys fixes

2015-01-15 Thread Alexander Kuleshov
Yes, right, how to do it better? Something like: Documentation, init-db/init:.? Or something else? Thank you 2015-01-15 22:50 GMT+06:00 Eric Sunshine sunsh...@sunshineco.com: On Thu, Jan 15, 2015 at 5:31 AM, Alexander Kuleshov kuleshovm...@gmail.com wrote: Subject: Documentation/init

[PATCH] stash: added short option '-p' to git stash usage synopsis

2015-01-15 Thread Alexander Kuleshov
Signed-off-by: Alexander Kuleshov kuleshovm...@gmail.com --- git-stash.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/git-stash.sh b/git-stash.sh index 6e30380..dc101f9 100755 --- a/git-stash.sh +++ b/git-stash.sh @@ -7,7 +7,7 @@ USAGE=list [options] or: $dashless drop

[PATCH] string-list: remove print_string_list from string-list's API

2015-01-15 Thread Alexander Kuleshov
print_string_list routine has no callers anywhere. Signed-off-by: Alexander Kuleshov kuleshovm...@gmail.com --- Documentation/technical/api-string-list.txt | 6 -- string-list.c | 10 -- string-list.h | 1 - 3 files

Re: [PATCH] string-list: remove print_string_list from string-list's API

2015-01-15 Thread Alexander Kuleshov
Maybe need to add comments for print_string_list, for preventing patches like this? 2015-01-15 23:56 GMT+06:00 Junio C Hamano gits...@pobox.com: On Thu, Jan 15, 2015 at 9:42 AM, Alexander Kuleshov kuleshovm...@gmail.com wrote: print_string_list routine has no callers anywhere. Signed-off

[PATCH 2/2] Documentation/git-init-db.txt: minor style fixes

2015-01-15 Thread Alexander Kuleshov
* line-wrap 'git init-db' synopsis * last possible argument '[directory]' was missed Signed-off-by: Alexander Kuleshov kuleshovm...@gmail.com --- Documentation/git-init-db.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Documentation/git-init-db.txt b/Documentation/git

[PATCH 1/2] Documentation/git-init.txt: minor style and synopsis fixes

2015-01-15 Thread Alexander Kuleshov
Signed-off-by: 0xAX kuleshovm...@gmail.com --- Documentation/git-init.txt | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Documentation/git-init.txt b/Documentation/git-init.txt index 369f889..f1f0599 100644 --- a/Documentation/git-init.txt +++

[PATCH v2] init-db: remove unused include

2015-01-15 Thread Alexander Kuleshov
cache.h removed, because it's already included at builtin.h Signed-off-by: Alexander Kuleshov kuleshovm...@gmail.com --- builtin/init-db.c | 1 - 1 file changed, 1 deletion(-) diff --git a/builtin/init-db.c b/builtin/init-db.c index 280454a..8edef87 100644 --- a/builtin/init-db.c +++ b/builtin

[PATCH v2] Documentation/init-db.txt: minor style and synopsys fixes

2015-01-15 Thread Alexander Kuleshov
This patch constists of two minor changes: * line-wrap 'git init-db' synopsis * last possible argument '[directory]' was missed Signed-off-by: Alexander Kuleshov kuleshovm...@gmail.com --- Documentation/git-init-db.txt | 5 +++-- Documentation/git-init.txt| 6 +++--- 2 files changed, 6

Re: [PATCH] init-db: remove unused #includes

2015-01-15 Thread Alexander Kuleshov
Hello Junio, yes right, missed system_path usage. But it's strange, code still compiles successfully without exec_cmd.h. -- 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

[PATCH] init-db: remove unused #includes

2015-01-14 Thread Alexander Kuleshov
to exec-dir to new function system_path()., 14 Jul 2008). So we no need in it anymore. Signed-off-by: Alexander Kuleshov kuleshovm...@gmail.com --- builtin/init-db.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/builtin/init-db.c b/builtin/init-db.c index 280454a..2978b36 100644 --- a/builtin

[PATCH] init-db: use OPT__QUIET macro instead OPT_BIT

2015-01-14 Thread Alexander Kuleshov
There is OPT__QUIET macro for easily -q/--quiet option defenition, let's use it instead OPT_BIT Signed-off-by: Alexander Kuleshov kuleshovm...@gmail.com --- builtin/init-db.c | 11 +-- 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/builtin/init-db.c b/builtin/init-db.c

[PATCH] diff: added '-q' option, short option for '--quiet'

2015-01-14 Thread Alexander Kuleshov
Signed-off-by: Alexander Kuleshov kuleshovm...@gmail.com --- Documentation/diff-options.txt | 1 + diff.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/Documentation/diff-options.txt b/Documentation/diff-options.txt index 2b15050..9160c90 100644

[PATCH] Documentation/init-db.txt: minor style and synopsys fixes

2015-01-14 Thread Alexander Kuleshov
This patch constists of two minor changes: * line-wrap 'git init-db' synopsis * last possible argument '[directory]' was missed Signed-off-by: Alexander Kuleshov kuleshovm...@gmail.com --- Documentation/git-init-db.txt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git

[PATCH] bash completion: allow git stash store options completion

2015-01-13 Thread Alexander Kuleshov
This patch adds bash completion for git stash 'store' subcommand which apperead at bd514cad (stash: introduce 'git stash store', 18 Jun 2013) Signed-off-by: Alexander Kuleshov kuleshovm...@gmail.com --- contrib/completion/git-completion.bash | 5 - 1 file changed, 4 insertions(+), 1 deletion

[PATCH] stash: git stash create and git stash store added to git stash usage synopsys

2015-01-13 Thread Alexander Kuleshov
Signed-off-by: Alexander Kuleshov kuleshovm...@gmail.com --- git-stash.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/git-stash.sh b/git-stash.sh index 6846b18..6e30380 100755 --- a/git-stash.sh +++ b/git-stash.sh @@ -9,7 +9,9 @@ USAGE=list [options] or: $dashless

[PATCH] format-patch: print format-patch usage if there are no arguments

2015-01-13 Thread Alexander Kuleshov
Signed-off-by: Alexander Kuleshov kuleshovm...@gmail.com --- builtin/log.c | 4 1 file changed, 4 insertions(+) diff --git a/builtin/log.c b/builtin/log.c index ad3cfd8..4431b50 100644 --- a/builtin/log.c +++ b/builtin/log.c @@ -1246,6 +1246,10 @@ int cmd_format_patch(int argc, const char

[PATCH] stash clear: allow -v/--verbose to be passed

2015-01-13 Thread Alexander Kuleshov
/diff-relative-config' into pu Removed stash@{2}: WIP on stash-clear-verbose: 0ae1f56 Merge branch 'bp/diff-relative-config' into pu Removed stash@{3}: WIP on master: addfb21 Git 2.3.0-rc0 Signed-off-by: Alexander Kuleshov kuleshovm...@gmail.com --- Documentation/git-stash.txt | 4 ++-- git

Re: [PATCH] format-patch: print format-patch usage if there are no arguments

2015-01-13 Thread Alexander Kuleshov
Hello Junio, As some commands does it when they are executed without arguments, like git config, git blame and etc... 2015-01-14 0:43 GMT+06:00 Junio C Hamano gits...@pobox.com: Why? -- _ 0xAX -- To unsubscribe from this list: send the line unsubscribe git in the

[PATCH] git.c: prevent change of environment variables

2015-01-10 Thread Alexander Kuleshov
pager.c * 'git -c' calls git_config_push_parameter which will change $GIT_CONFIG_PARAMETERS variable Signed-off-by: Alexander Kuleshov kuleshovm...@gmail.com --- git.c | 9 - 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/git.c b/git.c index c9bec99..3e87f05 100644 --- a/git.c

[PATCH] cat-file: remove definition of already defined variables

2015-01-10 Thread Alexander Kuleshov
'enum object_type type' and 'unsigned long size' are already defined at the top of cat_one_file routine Signed-off-by: Alexander Kuleshov kuleshovm...@gmail.com --- builtin/cat-file.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/builtin/cat-file.c b/builtin/cat-file.c index 750b5a2

Re: [PATCH] git.c: prevent change of environment variables

2015-01-10 Thread Alexander Kuleshov
There is aliasing of git -c in t1300-repo-config.sh, but I see: die(alias '%s' changes environment variables\n You can use '!git' in the alias to do this., alias_command); at git.c, how to be here? Thank you. 2015-01-10 18:53 GMT+06:00 Alexander Kuleshov kuleshovm...@gmail.com

[PATCH] cat-file: remove unnecessary #include

2015-01-10 Thread Alexander Kuleshov
cache.h, so we no need to include it in the cat-file.c Signed-off-by: Alexander Kuleshov kuleshovm...@gmail.com --- builtin/cat-file.c | 1 - 1 file changed, 1 deletion(-) diff --git a/builtin/cat-file.c b/builtin/cat-file.c index 750b5a2..2e6aaa1 100644 --- a/builtin/cat-file.c +++ b/builtin

[PATCH] git.c: remove unused includes

2015-01-09 Thread Alexander Kuleshov
* cache.h and commit.h already included in builtin.h * quote.h was appeared in (6035d6aa GIT_TRACE: show which built-in/external commands are executed 25 Jun 2006) and sq_quote_print was removed at (82aae5c quote: remove sq_quote_print() Jul 30 2013) Signed-off-by: Alexander Kuleshov kuleshovm

  1   2   >