[PATCH v5 0/2] path: implement common_dir handling in git_path_submodule()

2015-08-03 Thread Max Kirillov
Rebased to latest master, also merges cleanly to pu. Otherwise no changes. Max Kirillov (2): submodule refactor: use git_path_submodule() in add_submodule_odb() path: implement common_dir handling in git_path_submodule() cache.h | 1 + path.c

[PATCH v5 1/2] submodule refactor: use git_path_submodule() in add_submodule_odb()

2015-08-03 Thread Max Kirillov
Signed-off-by: Max Kirillov --- submodule.c | 28 ++-- 1 file changed, 10 insertions(+), 18 deletions(-) diff --git a/submodule.c b/submodule.c index 15e90d1..f6afe0a 100644 --- a/submodule.c +++ b/submodule.c @@ -122,43 +122,35 @@ void stage_updated_gitmodules(void

[PATCH v5 2/2] path: implement common_dir handling in git_path_submodule()

2015-08-03 Thread Max Kirillov
: Max Kirillov --- cache.h | 1 + path.c | 24 setup.c | 17 - t/t7410-submodule-checkout-to.sh | 10 ++ 4 files changed, 43 insertions(+), 9 deletions(-) diff --git a/cache.h

[PATCH v6 2/2] path: implement common_dir handling in git_path_submodule()

2015-08-04 Thread Max Kirillov
imilarly as for parent repository, but ignore the GIT_COMMON_DIR environment variable, because it would mean common directory for the parent repository and does not make sense for submodule. Also add test for functionality which uses this call. Signed-off-by: Max Kirillov --- cache.h

[PATCH v6 1/2] submodule refactor: use git_path_submodule() in add_submodule_odb()

2015-08-04 Thread Max Kirillov
ction whenever we need to change real location of submodule's repository content. Signed-off-by: Max Kirillov --- submodule.c | 28 ++-- 1 file changed, 10 insertions(+), 18 deletions(-) diff --git a/submodule.c b/submodule.c index 15e90d1..70d18ec 100644 --- a/submodu

[PATCH v6 0/2] path: implement common_dir handling in git_path_submodule()

2015-08-04 Thread Max Kirillov
parts of multiple-worktree repositories probably is a bigger task than just fix config file location. Max Kirillov (2): submodule refactor: use git_path_submodule() in add_submodule_odb() path: implement common_dir handling in git_path_submodule() cache.h | 1 + path.c

[PATCH v7 1/2] submodule refactor: use git_path_submodule() in add_submodule_odb()

2015-08-04 Thread Max Kirillov
will be possible to modify only that function whenever we need to change real location of submodule's repository content. Signed-off-by: Max Kirillov --- submodule.c | 28 ++-- 1 file changed, 10 insertions(+), 18 deletions(-) diff --git a/submodule.c b/submodu

[PATCH v7 0/2] path: implement common_dir handling in git_path_submodule()

2015-08-04 Thread Max Kirillov
Emphasized that 1/2 does not change behavior. Max Kirillov (2): submodule refactor: use git_path_submodule() in add_submodule_odb() path: implement common_dir handling in git_path_submodule() cache.h | 1 + path.c | 24

[PATCH v7 2/2] path: implement common_dir handling in git_path_submodule()

2015-08-04 Thread Max Kirillov
imilarly as for parent repository, but ignore the GIT_COMMON_DIR environment variable, because it would mean common directory for the parent repository and does not make sense for submodule. Also add test for functionality which uses this call. Signed-off-by: Max Kirillov --- cache.h

[PATCH v2] utf8.c: print warning about iconv errors

2015-08-14 Thread Max Kirillov
. Also add test script to assert that warning is actually printed and output is not changed, as expected. Signed-off-by: Max Kirillov --- Changes since v1: * rebase to recent changes * add handling runtime errors * add test * do not limit number of warnings - does not worth complicating the code

Re: What's cooking in git.git (Aug 2015, #06; Mon, 31)

2015-09-06 Thread Max Kirillov
Hi. On Mon, Aug 31, 2015 at 04:21:17PM -0700, Junio C Hamano wrote: > * mk/utf8-no-iconv-warn (2015-06-08) 1 commit > - utf8.c: print warning about disabled iconv > > Warn when a reencoding is requested in a build without iconv > support, as the end user is likely to get an unexpected result.

[PATCH v8 0/2] Submodule object path

2015-09-10 Thread Max Kirillov
* Rebased to recent master (v2.6.0-rc0). * Use git_pathdup_submodule() instead of git_path_submodule() * There are more conflicts in pu with [1], not sure what should I do about it. * Style fixes as Stefan suggested [1] http://thread.gmane.org/gmane.comp.version-control.git/276628 Max Kirillov

[PATCH v8 2/2] path: implement common_dir handling in git_pathdup_submodule()

2015-09-10 Thread Max Kirillov
imilarly as for parent repository, but ignore the GIT_COMMON_DIR environment variable, because it would mean common directory for the parent repository and does not make sense for submodule. Also add test for functionality which uses this call. Signed-off-by: Max Kirillov --- cache.h

[PATCH v8 1/2] submodule refactor: use git_pathdup_submodule() in add_submodule_odb()

2015-09-10 Thread Max Kirillov
en it will be possible to modify only that function whenever we need to change real location of submodule's repository content. Signed-off-by: Max Kirillov --- submodule.c | 30 -- 1 file changed, 12 insertions(+), 18 deletions(-) diff --git a/submodule.c b/submodu

[PATCH] strtoul_ui: actually report error in case of negative input

2015-09-13 Thread Max Kirillov
If s == "-1" and CPU is i386, then none of the checks is triggered, including the last "(unsigned int) ul != ul", because ul == 2**32 - 1, which fits into "unsigned int". Fix it by changing the last check to trigger earlier, as soon as it becomes bigger than INT_MAX

[PATCH v9 1/2] submodule refactor: use strbuf_git_path_submodule() in add_submodule_odb()

2015-09-13 Thread Max Kirillov
Then it will be possible to modify only that function whenever we need to change real location of submodule's repository content. Edited-by: Jeff King Signed-off-by: Max Kirillov --- submodule.c | 8 +--- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/submodule.c b/submodu

[PATCH v9 0/2] Submodule object path

2015-09-13 Thread Max Kirillov
Since v8: Use strbuf_git_path_submodule() as Jeff suggested Max Kirillov (2): submodule refactor: use strbuf_git_path_submodule() in add_submodule_odb() path: implement common_dir handling in git_pathdup_submodule() cache.h | 1 + path.c

[PATCH v9 2/2] path: implement common_dir handling in git_pathdup_submodule()

2015-09-13 Thread Max Kirillov
imilarly as for parent repository, but ignore the GIT_COMMON_DIR environment variable, because it would mean common directory for the parent repository and does not make sense for submodule. Also add test for functionality which uses this call. Signed-off-by: Max Kirillov --- cache.h

Re: [PATCH v8 1/2] submodule refactor: use git_pathdup_submodule() in add_submodule_odb()

2015-09-13 Thread Max Kirillov
On Fri, Sep 11, 2015 at 03:53:40AM -0400, Jeff King wrote: > > Now that we have strbuf_git_path_submodule(), is there any reason to > switch this away from a strbuf? > > That saves us a bunch of strlen calls, and it makes the diff way > shorter. My ulterior motive is that the result also conflict

Re: [PATCH v8 0/2] Submodule object path

2015-09-13 Thread Max Kirillov
On Thu, Sep 10, 2015 at 06:10:13PM -0700, Junio C Hamano wrote: > When I push the updated 'pu' out, could you please check I follow the pu merges. So far resolutions seem correct and all tests pass. If you don't mind re-resolving it as I send newer versions I will base them on master. Thank you.

Re: [PATCH] strtoul_ui: actually report error in case of negative input

2015-09-14 Thread Max Kirillov
On Mon, Sep 14, 2015 at 08:30:54AM +0200, Matthieu Moy wrote: >> Fix it by changing the last check to trigger earlier, as soon as it >> becomes bigger than INT_MAX. > > What if the value is actually greater than INT_MAX? The function is > returning an unsigned long (64 bits on 64bits architectures

Re: [PATCH] strtoul_ui: actually report error in case of negative input

2015-09-15 Thread Max Kirillov
On Tue, Sep 15, 2015 at 08:50:03AM +0200, Matthieu Moy wrote: > I think it would be better to just return a long to avoid needless > limitations, but changing the argument to "long" would interfer with > in-flight topics. Not worth the trouble. Sure. > > One potential issue with your patch is th

Re: [PATCH] clone --dissociate: avoid locking pack files

2015-09-30 Thread Max Kirillov
On Mon, Sep 28, 2015 at 09:44:57PM +0200, Johannes Schindelin wrote: > When `git clone` is asked to dissociate the repository from the > reference repository whose objects were used, it is quite possible that > the pack files need to be repacked. In that case, the pack files need to > be deleted th

[PATCH/RFC 0/2] close packs files when they are not needed

2015-09-30 Thread Max Kirillov
lly work for the current code. Trying now what I could do with lsof, just to be sure myself, but probably its use not appropriate for the project. Max Kirillov (2): sha1_file: close all pack files after running sha1_file: set packfile to O_CLOEXEC at open builtin/pack-objects.c | 2

[PATCH/RFC 1/2] sha1_file: close all pack files after running

2015-09-30 Thread Max Kirillov
packs after running builtin. Do not die() if the memory region is still used though, just print a warning, because failure to close a file should not prevent the currently running program from finishing its task. Signed-off-by: Max Kirillov --- cache.h | 1 + git.c | 2 ++ sha1_file.c

[PATCH/RFC 2/2] sha1_file: set packfile to O_CLOEXEC at open

2015-09-30 Thread Max Kirillov
-off-by: Max Kirillov --- builtin/pack-objects.c | 2 +- cache.h| 2 +- pack-bitmap.c | 2 +- sha1_file.c| 48 4 files changed, 31 insertions(+), 23 deletions(-) diff --git a/builtin/pack-objects.c b/builtin

Re: [PATCH] clone --dissociate: avoid locking pack files

2015-09-30 Thread Max Kirillov
On Wed, Sep 30, 2015 at 10:28:14PM +0300, Max Kirillov wrote: > On Mon, Sep 28, 2015 at 09:44:57PM +0200, Johannes Schindelin wrote: >> -if (option_dissociate) >> +if (option_dissociate) { >> +struct packed_git *p; >> + >> +fo

Re: [PATCH/RFC 1/2] sha1_file: close all pack files after running

2015-10-02 Thread Max Kirillov
On Fri, Oct 02, 2015 at 12:05:55PM +0200, Johannes Schindelin wrote: > Hi Max, > > On 2015-10-01 05:29, Max Kirillov wrote: >> When a builtin has done its job, but waits for pager or not waited >> by its caller and still hanging it keeps pack files opened. >> This c

Re: [PATCH/RFC 1/2] sha1_file: close all pack files after running

2015-10-02 Thread Max Kirillov
On Fri, Oct 02, 2015 at 12:13:40PM +0200, Johannes Schindelin wrote: > Hi Max, > > On 2015-10-02 12:05, Johannes Schindelin wrote: > > > On 2015-10-01 05:29, Max Kirillov wrote: >>> When a builtin has done its job, but waits for pager or not waited >>> by i

Re: [PATCH/RFC 1/2] sha1_file: close all pack files after running

2015-10-02 Thread Max Kirillov
On Fri, Oct 02, 2015 at 10:06:46PM +0300, Max Kirillov wrote: > for i in $(seq 1000) > t_git -c core.packedGitWindowSize=100 log It was 32-bit build. I cannot promise those exactly numbers will work, because I don not clearly understand what do they mean. With 100 commits the pack size w

Re: [PATCH/RFC 1/2] sha1_file: close all pack files after running

2015-10-04 Thread Max Kirillov
On Sun, Oct 04, 2015 at 04:53:30PM +0200, Johannes Schindelin wrote: > I guess then we would need two different patches for the > two different fixes, at least. > > So now I am unsure how to proceed: I do not want to step > on your toes, but I also want to see my use case fixed and > I want to mov

[PATCH] utf8.c: print warning about disabled iconv

2015-06-06 Thread Max Kirillov
into repository is incorrect and user is not aware about it. Show warning there is non-trivial reencoding requested. Show it only once during program run. Signed-off-by: Max Kirillov --- Hi. I have noticed there is some activity around the option, so it's not completely abandoned. Maybe

Re: [PATCH] utf8.c: print warning about disabled iconv

2015-06-08 Thread Max Kirillov
Hi. On Mon, Jun 08, 2015 at 09:16:16AM -0700, Junio C Hamano wrote: > Max Kirillov writes: >> This gives undesirable result that returned data or even >> data written into repository is incorrect and user is not >> aware about it. > > I do not necessarily agree with

Re: [PATCH v4 3/4] submodule: support running in multiple worktree setup

2016-07-26 Thread Max Kirillov
Hi. On Wed, Jul 20, 2016 at 07:24:18PM +0200, Nguyễn Thái Ngọc Duy wrote: > + - `remote.*` added by submodules may be per working directory as > + well, unless you are sure remotes from all possible submodules in > + history are consistent. ... > @@ -1114,7 +1114,7 @@ cmd_sync() >

[PATCH] mingw: consider that UNICODE_STRING::Length counts bytes

2016-12-17 Thread Max Kirillov
UNICODE_STRING::Length field means size of buffer in bytes[1], despite of buffer itself being array of wchar_t. Because of that terminating zero is placed twice as far. Fix it. [1] https://msdn.microsoft.com/en-us/library/windows/desktop/aa380518.aspx Signed-off-by: Max Kirillov --- Access

[PATCH] mingw: consider that UNICODE_STRING::Length counts bytes

2016-12-19 Thread Max Kirillov
UNICODE_STRING::Length field means size of buffer in bytes[1], despite of buffer itself being array of wchar_t. Because of that terminating zero is placed twice as far. Fix it. [1] https://msdn.microsoft.com/en-us/library/windows/desktop/aa380518.aspx Signed-off-by: Max Kirillov --- Access

Re: [PATCH] mingw: consider that UNICODE_STRING::Length counts bytes

2016-12-19 Thread Max Kirillov
On Mon, Dec 19, 2016 at 01:57:29PM -0800, Junio C Hamano wrote: > Max, I see this is a resend from a few days ago Sorry about resend. For some reason I don't get the list copy (might be some clever duplicate elimination in my forwardings), and marc.info seems to be slow to update, so I had no indi

[BUG/RFC] Git Gui: GIT_DIR leaks to spawned Git Bash

2017-01-16 Thread Max Kirillov
Hello. Apparently various GIT_* environment variables (most interesting is GIT_DIR but AFAIR there were more) leak to shell session launched from Git Gui's "Git Bash" menu item. Which can cause unexpected results if user navigates in that shell to some other repository (in can also include startin

Re: [BUG/RFC] Git Gui: GIT_DIR leaks to spawned Git Bash

2017-01-17 Thread Max Kirillov
On Tue, Jan 17, 2017 at 11:52:29AM +0100, Johannes Schindelin wrote: > Hi Max, > > On Tue, 17 Jan 2017, Max Kirillov wrote: > >> Apparently various GIT_* environment variables (most >> interesting is GIT_DIR but AFAIR there were more) leak to >> shell session lau

Re: [PATCH v3 1/6] worktree: new repo extension to manage worktree behaviors

2016-01-30 Thread Max Kirillov
On Tue, Jan 26, 2016 at 06:44:40PM +0700, Nguyễn Thái Ngọc Duy wrote: > +WORKTREE VERSIONS AND MIGRATION > +--- > +Multiple worktree is still an experimental feature and evolving. Every > +time the behavior is changed, the "worktree version" is stepped > +up. Worktree ve

Re: [PATCH v3 1/6] worktree: new repo extension to manage worktree behaviors

2016-01-30 Thread Max Kirillov
On Wed, Jan 27, 2016 at 02:12:52PM -0800, Junio C Hamano wrote: > More seriously, are we confident that the overall worktree support > is mature enough by now that once we add an experimental feature X > at version 1, we can promise to keep maintaining it forever at > version N for any positive int

Re: [PATCH v3 2/6] path.c: new (identical) list for worktree v1

2016-01-30 Thread Max Kirillov
On Tue, Jan 26, 2016 at 06:44:41PM +0700, Nguyễn Thái Ngọc Duy wrote: > Worktree v1 may have different .git file split than v0. Add support > code to change common file list based on extensions.worktree. The list > for now is identical to v0. In the end this turned out to be needed only for "commo

Re: [PATCH v3 5/6] config: select .git/common/config with --repo

2016-01-30 Thread Max Kirillov
On Tue, Jan 26, 2016 at 06:44:44PM +0700, Nguyễn Thái Ngọc Duy wrote: > This new option allows the user to write to or read from > .git/common/config in worktree v1. In worktree v0, --repo is an alias > of --local. Looks like by default a value is always set in a local config, which might be dange

Re: [PATCH v3 6/6] worktree add: switch to worktree version 1

2016-01-31 Thread Max Kirillov
On Tue, Jan 26, 2016 at 06:44:45PM +0700, Nguyễn Thái Ngọc Duy wrote: > + for (key_p = per_wortree_keys; *key_p; key_p++) { > + const char *key = *key_p; > + char *value = get_key(sb.buf, key); > + > + if (value) { > +

Re: [PATCH v3 6/6] worktree add: switch to worktree version 1

2016-02-01 Thread Max Kirillov
On Mon, Feb 01, 2016 at 01:05:05PM +0700, Duy Nguyen wrote: > On Mon, Feb 1, 2016 at 12:33 PM, Max Kirillov wrote: >> 1. For submodules (which must be left per-worktree) this >> approach is not going to work, because you don't know all >> variables in advance. You coul

[ANNOUNCE] git-push-update, tool to push with "server-side" merge or rebase

2016-03-28 Thread Max Kirillov
Hello. I would like to announce git-push-update, a tool which emulates server-side merge or rebase. The link: https://github.com/max630/git-push-update It is a bash script which fetches latest remote branch, creates temporary clone, performs there merge or rebase, pushes results to server. If du

Re: [ANNOUNCE] git-push-update, tool to push with "server-side" merge or rebase

2016-03-29 Thread Max Kirillov
On Tue, Mar 29, 2016 at 09:29:45PM -0400, Trevor Saunders wrote: > hm how? the workflow you use locally has basically nothingto do with how > pushes work. I work on several projects daily where everyone pushes to > trunk, but locally I use branches. You just need to fetch rebase then > either mer

Re: [PATCH v3 0/4] Fix locking issues on Windows with `git clone --dissociate`

2015-10-11 Thread Max Kirillov
On Tue, Oct 06, 2015 at 03:17:36PM +0200, Johannes Schindelin wrote: > This is version 3, adding that BUG! message if do_not_close was set. > > Max, I still hope that this patch series helps also your use case! Thanks, this mostly makes gone one of my commits. I only need to invoke the function a

Re: [Feature Request] git blame showing only revisions from git rev-list --first-parent

2015-10-18 Thread Max Kirillov
On Tue, Sep 15, 2015 at 06:05:39AM -0400, Jeff King wrote: > It seems like nobody is actually that interested in what "blame > --first-parent --reverse" does in the first place, though, and there's > no reason for its complexity to hold up vanilla --first-parent. So what > do you think of: ... > Co

[PATCH 0/2] blame: allow blame --reverse --first-parent when it makes sense

2015-10-20 Thread Max Kirillov
This enables --reverse --first-parent back. Max Kirillov (2): Add test to describe expectation of blame --reverse with branched history blame: allow blame --reverse --first-parent when it makes sense builtin/blame.c | 11 +-- t/t8009-blame-reverse.sh | 39

[PATCH 1/2] Add test to describe expectation of blame --reverse with branched history

2015-10-20 Thread Max Kirillov
containing the edit, but it was disabled in 95a4fb0eac, because incorrectly specified range could produce in unexpected and meaningless result. Add tests which describe ideal functionality with and without `--first-parent`. Signed-off-by: Max Kirillov --- t/t8009-blame-reverse.sh | 34

[PATCH 2/2] blame: allow blame --reverse --first-parent when it makes sense

2015-10-20 Thread Max Kirillov
appear as non-first parent of a commit along the first-parent chain. Since the check seems fragile, add test which makes sure that blame dies in both cases. Signed-off-by: Max Kirillov --- builtin/blame.c | 11 +-- t/t8009-blame-reverse.sh | 7 ++- 2 files changed, 15

[PATCH v2 2/2] blame: allow blame --reverse --first-parent when it makes sense

2015-10-21 Thread Max Kirillov
appear as non-first parent of a commit along the first-parent chain. Since the check seems fragile, add test which verifies that blame dies in both cases. Signed-off-by: Max Kirillov --- builtin/blame.c | 11 +-- t/t8009-blame-reverse.sh | 7 ++- 2 files changed, 15

[PATCH v2 1/2] Add test to describe expectation of blame --reverse with branched history

2015-10-21 Thread Max Kirillov
containing the edit, but it was disabled in 95a4fb0eac, because incorrectly specified range could produce in unexpected and meaningless result. Add tests which describe ideal functionality with and without `--first-parent`. Signed-off-by: Max Kirillov --- t/t8009-blame-reverse.sh | 34

[PATCH v2 0/2] blame: allow blame --reverse --first-parent when it makes sense

2015-10-21 Thread Max Kirillov
Fixed mistype in commit message. Max Kirillov (2): Add test to describe expectation of blame --reverse with branched history blame: allow blame --reverse --first-parent when it makes sense builtin/blame.c | 11 +-- t/t8009-blame-reverse.sh | 39

Re: [PATCH 2/2] blame: allow blame --reverse --first-parent when it makes sense

2015-10-21 Thread Max Kirillov
On Wed, Oct 21, 2015 at 12:29:12AM -0400, Eric Sunshine wrote: > On Wed, Oct 21, 2015 at 12:08 AM, Max Kirillov wrote: >> Do not die immediately when the two flags are specified. Instead >> check that the specified range is along first-parent chain. Explioit > > s/Exp

[PATCH v3 1/2] Add test to describe expectation of blame --reverse with branched history

2015-10-21 Thread Max Kirillov
containing the edit, but it was disabled in 95a4fb0eac, because incorrectly specified range could produce in unexpected and meaningless result. Add tests which describe ideal functionality with and without `--first-parent`. Signed-off-by: Max Kirillov --- t/t8009-blame-reverse.sh | 34

[PATCH v3 2/2] blame: allow blame --reverse --first-parent when it makes sense

2015-10-21 Thread Max Kirillov
appear as non-first parent of a commit along the first-parent chain. Since the check seems fragile, add test which verifies that blame dies in both cases. Signed-off-by: Max Kirillov --- builtin/blame.c | 11 +-- t/t8009-blame-reverse.sh | 7 ++- 2 files changed, 15

[PATCH v3 0/2] blame: allow blame --reverse --first-parent when it makes sense

2015-10-21 Thread Max Kirillov
Fix indentation. Max Kirillov (2): Add test to describe expectation of blame --reverse with branched history blame: allow blame --reverse --first-parent when it makes sense builtin/blame.c | 11 +-- t/t8009-blame-reverse.sh | 39

Re: [PATCH v2 1/2] Add test to describe expectation of blame --reverse with branched history

2015-10-22 Thread Max Kirillov
On Wed, Oct 21, 2015 at 09:19:45PM -0700, Junio C Hamano wrote: > Let me try. > > (1) for merges, an edge with '*' denotes the one to the first > parent. > (2) a commit that touches file.t are in capital > >c1---a3 > /* > // >A0---a1--*a2 > \

Re: [PATCH v2 2/2] blame: allow blame --reverse --first-parent when it makes sense

2015-10-22 Thread Max Kirillov
On Wed, Oct 21, 2015 at 09:25:37PM -0700, Junio C Hamano wrote: > Max Kirillov writes: > >> Do not die immediately when the two flags are specified. Instead >> check that the specified range is along first-parent chain. Exploit >> how prepare_revision_walk() handles fir

Re: [PATCH v2 1/2] Add test to describe expectation of blame --reverse with branched history

2015-10-22 Thread Max Kirillov
On Thu, Oct 22, 2015 at 05:37:21PM +0300, Max Kirillov wrote: > Yes. Though I would ... make the line of As straight. -- 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.

Re: [PATCH v2 2/2] blame: allow blame --reverse --first-parent when it makes sense

2015-10-25 Thread Max Kirillov
On Thu, Oct 22, 2015 at 12:11:23PM -0700, Junio C Hamano wrote: > Max Kirillov writes: >> On Wed, Oct 21, 2015 at 09:25:37PM -0700, Junio C Hamano wrote: >> >>> The logic you implemented feels solid to me, at least at a first >>> glance. What kind of gotchas are

[PATCH v4 0/4] blame: allow blame --reverse --first-parent when it makes sense

2015-10-25 Thread Max Kirillov
* Change aproach - instead of assuming children content build them explicitly, also accurately verifying that the specified range is along the first-parent chain * Fix error message Max Kirillov (4): Add test to describe expectation of blame --reverse with branched history blame

[PATCH v4 0/4] blame: allow blame --reverse --first-parent when it makes sense

2015-10-25 Thread Max Kirillov
Change aproach - instead of assuming children content build them explicitly, also accurately verifying that the specified range is along the first-parent chain Max Kirillov (3): Add test to describe expectation of blame --reverse with branched history blame: extract find_single_final

[PATCH v4 2/3] blame: extract find_single_final

2015-10-25 Thread Max Kirillov
Signed-off-by: Max Kirillov --- builtin/blame.c | 29 + 1 file changed, 17 insertions(+), 12 deletions(-) diff --git a/builtin/blame.c b/builtin/blame.c index 295ce92..38f6267 100644 --- a/builtin/blame.c +++ b/builtin/blame.c @@ -2401,16 +2401,11 @@ static struct

[PATCH v4 1/3] Add test to describe expectation of blame --reverse with branched history

2015-10-25 Thread Max Kirillov
containing the edit, but it was disabled in 95a4fb0eac, because incorrectly specified range could produce in unexpected and meaningless result. Add tests which describe ideal functionality with and without `--first-parent`. Signed-off-by: Max Kirillov --- t/t8009-blame-reverse.sh | 34

[PATCH v4 3/3] blame: allow blame --reverse --first-parent when it makes sense

2015-10-25 Thread Max Kirillov
ff-by: Max Kirillov --- builtin/blame.c | 32 ++-- t/t8009-blame-reverse.sh | 2 +- 2 files changed, 31 insertions(+), 3 deletions(-) diff --git a/builtin/blame.c b/builtin/blame.c index 38f6267..98b1810 100644 --- a/builtin/blame.c +++ b/builtin/blame.c @@ -2

[PATCH] blame: fix option name in error message

2015-10-25 Thread Max Kirillov
The option name used in blame's UI is `--reverse`. Signed-off-by: Max Kirillov --- builtin/blame.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/builtin/blame.c b/builtin/blame.c index 98b1810..f89bc9e 100644 --- a/builtin/blame.c +++ b/builtin/blame.c @@ -2697,7 +2

Re: [PATCH v4 0/4] blame: allow blame --reverse --first-parent when it makes sense

2015-10-25 Thread Max Kirillov
On Mon, Oct 26, 2015 at 07:26:54AM +0200, Max Kirillov wrote: > * Change aproach - instead of assuming children content build them explicitly, > also accurately verifying that the specified range is along the > first-parent chain > * Fix error message Sent by mistake, ignore this,

Re: [PATCH v4 1/3] Add test to describe expectation of blame --reverse with branched history

2015-10-25 Thread Max Kirillov
Sorry, forgot to fix the tests. Will send another batch some later. -- 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 v4 1/3] Add test to describe expectation of blame --reverse with branched history

2015-10-26 Thread Max Kirillov
On Sun, Oct 25, 2015 at 11:27:32PM -0700, Junio C Hamano wrote: > Max Kirillov writes: > >> If history contains merges from feature branches, `blame --reverse` >> reports not the commit when the line was actually edited, but head of >> the last merged branch which was

[PATCH v5 2/3] blame: extract find_single_final

2015-10-29 Thread Max Kirillov
Signed-off-by: Max Kirillov --- builtin/blame.c | 29 + 1 file changed, 17 insertions(+), 12 deletions(-) diff --git a/builtin/blame.c b/builtin/blame.c index 295ce92..38f6267 100644 --- a/builtin/blame.c +++ b/builtin/blame.c @@ -2401,16 +2401,11 @@ static struct

[PATCH v5 1/3] blame: test to describe use of blame --reverse --first-parent

2015-10-29 Thread Max Kirillov
test which describes the expected behavior of `blame --reverse --first-parent` in the case described above. Signed-off-by: Max Kirillov --- t/t8009-blame-vs-topicbranches.sh | 36 1 file changed, 36 insertions(+) create mode 100755 t/t8009-blame-vs-topicb

[PATCH v5 3/3] blame: allow blame --reverse --first-parent when it makes sense

2015-10-29 Thread Max Kirillov
ff-by: Max Kirillov --- builtin/blame.c | 32 ++-- t/t8009-blame-vs-topicbranches.sh | 2 +- 2 files changed, 31 insertions(+), 3 deletions(-) diff --git a/builtin/blame.c b/builtin/blame.c index 38f6267..98b1810 100644 --- a/builtin/blame.c +++ b/bu

[PATCH v5 0/3] blame: allow blame --reverse --first-parent when it makes sense

2015-10-29 Thread Max Kirillov
Update the test: * Fix style notes in tests * Remove the non-first-parent case, because it's more like fature request, and is not fixed in this batch * Rewrite the commit message, hopely now it answers better to "why" Max Kirillov (3): blame: add test to describe use of blame --

[PATCH] blame: add test case for using tag object as a final ref

2015-11-17 Thread Max Kirillov
It was discovered [1] that 1b0d4a broke blaming starting from tag object. Add test which verifies such blaming works. [1] http://mid.gmane.org/20151117224809.ge27...@sigill.intra.peff.net Signed-off-by: Max Kirillov --- Thank you. Sorry, I should have noticed that obj ended up unused

Re: [PATCH] blame: add test case for using tag object as a final ref

2015-11-18 Thread Max Kirillov
On Wed, Nov 18, 2015 at 8:00 AM, Jeff King wrote: > On Wed, Nov 18, 2015 at 07:36:32AM +0200, Max Kirillov wrote: > >> It was discovered [1] that 1b0d4a broke blaming starting from tag object. >> Add test which verifies such blaming works. >> >> [1] http://mid

Re: What's cooking in git.git (Nov 2015, #03; Fri, 20)

2015-11-24 Thread Max Kirillov
On Fri, Nov 20, 2015 at 09:09:37AM -0500, Jeff King wrote: > * mk/blame-first-parent (2015-11-20) 1 commit > - blame: fix object casting regression > > Regression fix for a topic already in master. > > Will merge to 'next'. You mistyped my name in the commit message of 044e0ad679 :) -- To uns

Re: [PATCH 0/5] Split .git/config in multiple worktree setup

2015-12-02 Thread Max Kirillov
On Wed, Dec 02, 2015 at 08:13:41PM +0100, Nguyễn Thái Ngọc Duy wrote: > Let's restart this. From the last discussion [1], we need to make > core.worktree per-worktree for submodules to work. We also need > core.sparseCheckout per-worktree. Thank you. It would be nice to have it, so that features l

Re: [PATCH 0/5] Split .git/config in multiple worktree setup

2015-12-03 Thread Max Kirillov
On Thu, Dec 03, 2015 at 09:07:07AM +0100, Duy Nguyen wrote: > On Thu, Dec 3, 2015 at 7:15 AM, Max Kirillov wrote: >> Using builtin defaults might be confusing for users - >> editing the info/config.worktree they must keep in mind the >> list of defaults (which they seem to

Re: [PATCH 0/5] Split .git/config in multiple worktree setup

2015-12-03 Thread Max Kirillov
On Thu, Dec 03, 2015 at 11:52:43AM -0800, Junio C Hamano wrote: > I actually prefer *not* to have any configurability > to avoid confusion between users. This could be an approach. But because of upgrade issues which I described in the other response it looks like this decision is not easy to chan

[RFC PATCH] pack-refs: fail on falsely sorted packed-refs

2019-01-30 Thread Max Kirillov
penalty to verify the sortedness - when it encounters not really sorted existing data. Signed-off-by: Max Kirillov --- I happened to have a not really sorted packed-refs file. As you might guess, it was quite wtf-ing experience. It worked, mostly, but there was one branch which just did not resolve

Re: [RFC PATCH] pack-refs: fail on falsely sorted packed-refs

2019-01-31 Thread Max Kirillov
On Wed, Jan 30, 2019 at 06:31:34PM -0500, Eric Sunshine wrote: > On Wed, Jan 30, 2019 at 6:21 PM Max Kirillov wrote: >> + strbuf_addf(err, "broken sorting in >> packed-refs: '%s' > '%s'", >> +

Re: [PATCH] t5562: skip if NO_CURL is enabled

2018-11-19 Thread Max Kirillov
On Mon, Nov 19, 2018 at 02:15:35AM -0800, Carlo Marcelo Arenas Belón wrote: > 6c213e863a ("http-backend: respect CONTENT_LENGTH for receive-pack", > 2018-07-27) > introduced all tests but without a check for CURL support from git. The tests should not be using curl, they just pipe data to http-ba

Re: [PATCH] t5562: skip if NO_CURL is enabled

2018-11-19 Thread Max Kirillov
On Mon, Nov 19, 2018 at 11:36:08AM -0800, Carlo Arenas wrote: > NO_CURL reflects the build setting (for http support); CURL checks for > the curl binary, but as Ævar points out the requirements must be from > somewhere else since a NO_CURL=1 build (tested in macOS) still passes > the test, but not

Re: [PATCH] t5562: skip if NO_CURL is enabled

2018-11-21 Thread Max Kirillov
On Wed, Nov 21, 2018 at 04:02:04AM -0800, Carlo Arenas wrote: > for some tracing, it would seem that it gets 0 when > trying to read 4 bytes from what I think is a pipe that connects to a > child that has been gone already for a while. Could you clarify it? I'm afraid I don't understand. Meanwhil

Re: [PATCH] t5562: skip if NO_CURL is enabled

2018-11-21 Thread Max Kirillov
On Wed, Nov 21, 2018 at 05:04:25PM -0800, Carlo Arenas wrote: > the error that gets eventually to stderr in the caller comes from > get_packet_data, who is trying to read 4 bytes and gets 0. > when looking at the trace (obtained with ktrace) Yes too early close of the input data is the thing which

[PATCH] t5562: fix perl path

2018-11-22 Thread Max Kirillov
From: Jeff King Some systems do not have perl installed to /usr/bin. Use the variable from the build settiings, and call perl directly than via shebang. Signed-off-by: Max Kirillov --- Submitting. Could you sign-off? Also removed shebang from the script as it is not needed t/t5562-http

Re: [PATCH] t5562: skip if NO_CURL is enabled

2018-11-22 Thread Max Kirillov
On Thu, Nov 22, 2018 at 11:17:22AM -0500, Jeff King wrote: > The script I use is at: > > https://github.com/peff/git/blob/meta/stress > > which you invoke like "/path/to/stress t5562" from the top-level of a > git.git checkout. It basically just runs a loop of twice as many > simultaneous invo

[PATCH] t5562: do not reuse output files

2018-11-23 Thread Max Kirillov
failures of the test script. Avoid the issue by unlinking the older files before writing to them. Reported-by: Carlo Arenas Helped-by: Carlo Arenas Signed-off-by: Max Kirillov --- Thanks for the analysis. I seem to have guessed the reason. This patch should prevent it. I think the tests

[PATCH v2] t5562: do not reuse output files

2018-11-23 Thread Max Kirillov
occasional failures of the test script. Avoid the issue by unlinking the older files before writing to them. Reported-by: Carlo Arenas Helped-by: Carlo Arenas Helped-by: Junio C Hamano Signed-off-by: Max Kirillov --- Thanks. Updated t/t5562-http-backend-content-length.sh | 2 ++ 1 file changed

Re: [PATCH] t5562: do not reuse output files

2018-11-23 Thread Max Kirillov
On Sat, Nov 24, 2018 at 04:47:19PM +0900, Junio C Hamano wrote: > Junio C Hamano writes: > a better workaround might be to write into unique output filenames > (act1.out, act2.out, etc.); that way, you do not have to worry about > the output file for the next request getting clobbered by a stale >

[PATCH v3] t5562: do not reuse output files

2018-11-24 Thread Max Kirillov
occasional failures of the test script. Avoid the issue by using separated output and error file for each test, apprending the test number to their name. Reported-by: Carlo Arenas Helped-by: Carlo Arenas Helped-by: Junio C Hamano Signed-off-by: Max Kirillov --- Use another output and error files

Re: [PATCH] t5562: do not reuse output files

2018-11-24 Thread Max Kirillov
On Sat, Nov 24, 2018 at 04:47:19PM +0900, Junio C Hamano wrote: > I do agree that forcing the parent to wait, like you described in > the comment, would be far more preferrable, It looks like it can be done as simple as: --- a/http-backend.c +++ b/http-backend.c @@ -486,6 +486,8 @@ static void ru

[PATCH] http-backend: enable cleaning up forked upload/receive-pack on exit

2018-11-24 Thread Max Kirillov
keep opened act.err, and sometimes write there errors after next test started using the file. Fix by enabling cleaning of the command at http-backed exit. Reported-by: Carlo Arenas Helped-by: Carlo Arenas Signed-off-by: Max Kirillov --- This seems to fix the issue at NetBSD. I verified it

Re: [PATCH] t5562: do not reuse output files

2018-11-27 Thread Max Kirillov
On Mon, Nov 26, 2018 at 11:06:40AM +0900, Junio C Hamano wrote: > I am offhand not sure what the right value of wait_after_clean for > this codepath be, though. 46df6906 ("execv_dashed_external: wait > for child on signal death", 2017-01-06) made this non-default but > turned it on for dashed exte

[PATCH] http-backend: allow empty CONTENT_LENGTH

2018-09-06 Thread Max Kirillov
. Add a test for the case. [1] https://public-inbox.org/git/20160329201349.gb9...@sigill.intra.peff.net/ Signed-off-by: Max Kirillov --- Hi. This should fix it. I'm not sure should it treat it as 0 or "-1" At least the tests mentioned by Jeff fails if I try to treat missing CO

Re: [PATCH] http-backend: allow empty CONTENT_LENGTH

2018-09-06 Thread Max Kirillov
On Thu, Sep 06, 2018 at 02:54:18PM -0700, Junio C Hamano wrote: > Max Kirillov writes: >> This should fix it. I'm not sure should it treat it as 0 or "-1" >> At least the tests mentioned by Jeff fails if I try to treat missing >> CONTENT_LENGTH as "-1&quo

[PATCH v2] http-backend: allow empty CONTENT_LENGTH

2018-09-06 Thread Max Kirillov
POSTs" from t5551 starts faliing, if unset or empty CONTENT_LENGTH is treated as zero length body. So keep the existing behavior as much as possible. Add a test for the case. Reported-By: Jelmer Vernooij Signed-off-by: Max Kirillov --- Added the "reported-by" and explained inlin

  1   2   3   4   >