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

[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

[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

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() >

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

[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: [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

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 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 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 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 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 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

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-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: 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] 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

[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

[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 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 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

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

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 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,

[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

[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

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

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-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 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 > \

[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

[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

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 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

[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 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 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 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

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

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: [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

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-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 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] 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

[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 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

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] 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 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 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

[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

[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] 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 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 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

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 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

[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 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 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 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 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 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 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 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

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

[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 v3] config.c: split some variables to $GIT_DIR/config.worktree

2015-04-19 Thread Max Kirillov
On Sat, Apr 18, 2015 at 06:10:23PM +0700, Duy Nguyen wrote: > On Tue, Apr 14, 2015 at 02:37:39AM +0300, Max Kirillov wrote: > > On Tue, Mar 31, 2015 at 07:14:39PM +0700, Nguyễn Thái Ngọc Duy wrote: > > > core.worktree and core.bare, which are treated specially in 31e26eb [1], &

Re: [PATCH v2 1/4] t4059: test 'diff --cc' with a change from only few parents

2015-04-13 Thread Max Kirillov
On Sat, Apr 11, 2015 at 10:51:10PM -0700, Junio C Hamano wrote: > Max Kirillov writes: > >> My exact case was that there was a change in one branch >> which was overwritten during merge conflict resolution by >> fully acepting the other branch - in a 2-parent merge. I

Re: [PATCH v2 4/4] t4059: rewrite to be adaptive to hunk filtering

2015-04-13 Thread Max Kirillov
On Sat, Apr 11, 2015 at 10:48:22PM -0700, Junio C Hamano wrote: > Max Kirillov writes: >> Rather, it should verify that file >> selection behaves the same as hunk selection. > > Hrm, really? "git diff --raw" and "git diff -p -w" on two trees > wou

[PATCH/RFC] combine-diff.c: make intersect_paths() behave like hunk filtering

2015-04-13 Thread Max Kirillov
are the same, but child commit differs from them. * for `diff -c`: the path must be changed since at least 1 parent. Signed-off-by: Max Kirillov --- This what could be done to hide the added and removed files. It also makes it work faster - diff --cc on the evil merge runs now 2.5 seconds instead

Re: [PATCH v3] config.c: split some variables to $GIT_DIR/config.worktree

2015-04-13 Thread Max Kirillov
On Tue, Mar 31, 2015 at 07:14:39PM +0700, Nguyễn Thái Ngọc Duy wrote: > core.worktree and core.bare, which are treated specially in 31e26eb [1], > are now moved to info/core.worktree and the special treatment reverted. <...> > - if (get_common_dir(&sb, gitdir)) > - fn = check_repo_f

Re: [PATCH v2 1/4] t4059: test 'diff --cc' with a change from only few parents

2015-04-11 Thread Max Kirillov
On Sat, Apr 11, 2015 at 02:07:25PM -0700, Junio C Hamano wrote: > Max Kirillov writes: > >> If `git diff --cc` is used with 2 or more parents, then it shows >> all hunks which have changed compared to at least 2 parents. >> Which is reasonable, because those plac

Re: [PATCH 0/4] diff --cc: relax path filtering

2015-04-03 Thread Max Kirillov
On Thu, Apr 02, 2015 at 05:13:10PM -0400, Jeff King wrote: > On Thu, Apr 02, 2015 at 11:34:09PM +0300, Max Kirillov wrote: > >> For diff --cc, paths fitering used to select only paths which have >> changed in all parents, while diffing itself output hunks which are >>

[PATCH v2 4/4] t4059: rewrite to be adaptive to hunk filtering

2015-04-03 Thread Max Kirillov
short" file is shown if and only if the corresponding "long" file's contains the changed hunk. Signed-off-by: Max Kirillov --- t/t4059-diff-cc-not-affected-by-path-filtering.sh | 84 --- 1 file changed, 59 insertions(+), 25 deletions(-) diff --git a/t/t405

Re: [PATCH 1/4] Add test for showing discarded changes with diff --cc

2015-04-03 Thread Max Kirillov
On Thu, Apr 02, 2015 at 01:55:58PM -0700, Junio C Hamano wrote: > So I'll give a preliminary nitpicks first ;-) Thank you; fixed the issues you mentioned. >> + test_seq 11 | sed -e "s/^7/7change1/" -e "s/^11/11change2/" -e >> "s/^2/2change2/" >long/only2 && >> +git add long/only2 && > > Patc

[PATCH v2 2/4] combine-diff.c: refactor: extract insert_path()

2015-04-03 Thread Max Kirillov
Signed-off-by: Max Kirillov --- combine-diff.c | 43 --- 1 file changed, 24 insertions(+), 19 deletions(-) diff --git a/combine-diff.c b/combine-diff.c index 8eb7278..a236bb5 100644 --- a/combine-diff.c +++ b/combine-diff.c @@ -22,6 +22,28 @@ static int

[PATCH v2 1/4] t4059: test 'diff --cc' with a change from only few parents

2015-04-03 Thread Max Kirillov
test which demonstrates the issue. Signed-off-by: Max Kirillov --- t/t4059-diff-cc-not-affected-by-path-filtering.sh | 108 ++ 1 file changed, 108 insertions(+) create mode 100755 t/t4059-diff-cc-not-affected-by-path-filtering.sh diff --git a/t/t4059-diff-cc-not-affected-by

[PATCH v2 0/4] diff --cc: relax path filtering

2015-04-03 Thread Max Kirillov
Fixes: * test renamed and commit message rewritten, so that it mentions 3-parent merge rather than other uses * test: fix && chaining and do at new line * use postincrement in C code Max Kirillov (4): t4059: test 'diff --cc' with a change from only few parents combin

[PATCH v2 3/4] diff --cc: relax too strict paths picking

2015-04-03 Thread Max Kirillov
treatment of first pass, because path can be added from any parent, not just the first one. Signed-off-by: Max Kirillov --- combine-diff.c| 56 --- t/t4059-diff-cc-not-affected-by-path-filtering.sh | 4 +- 2 files changed, 41 insertions(+), 19

[PATCH 0/4] diff --cc: relax path filtering

2015-04-02 Thread Max Kirillov
is not yet in master. This is rebased on top of it. Max Kirillov (4): Add test for showing discarded changes with diff --cc combine-diff.c: refactor: extract insert_path() diff --cc: relax too strict paths picking t4059: rewrite to be adaptive to hunk filtering combine-diff.c

[PATCH 1/4] Add test for showing discarded changes with diff --cc

2015-04-02 Thread Max Kirillov
demonstrates the issue. Signed-off-by: Max Kirillov --- t/t4059-diff-merge-with-base.sh | 100 1 file changed, 100 insertions(+) create mode 100755 t/t4059-diff-merge-with-base.sh diff --git a/t/t4059-diff-merge-with-base.sh b/t/t4059-diff-merge-with-base.sh

[PATCH 3/4] diff --cc: relax too strict paths picking

2015-04-02 Thread Max Kirillov
treatment of first pass, because path can be added from any parent, not just the first one. Signed-off-by: Max Kirillov --- combine-diff.c | 56 - t/t4059-diff-merge-with-base.sh | 4 +-- 2 files changed, 41 insertions(+), 19 deletions(-) diff

[PATCH 2/4] combine-diff.c: refactor: extract insert_path()

2015-04-02 Thread Max Kirillov
Signed-off-by: Max Kirillov --- combine-diff.c | 43 --- 1 file changed, 24 insertions(+), 19 deletions(-) diff --git a/combine-diff.c b/combine-diff.c index 8eb7278..a236bb5 100644 --- a/combine-diff.c +++ b/combine-diff.c @@ -22,6 +22,28 @@ static int

[PATCH 4/4] t4059: rewrite to be adaptive to hunk filtering

2015-04-02 Thread Max Kirillov
short" file is shown if and only if the corresponding "long" file's contains the changed hunk. Signed-off-by: Max Kirillov --- t/t4059-diff-merge-with-base.sh | 84 - 1 file changed, 58 insertions(+), 26 deletions(-) diff --git a/t/t405

Re: [PATCH] git-common-dir: make submodule related variables worktree specific

2015-04-01 Thread Max Kirillov
On Thu, Apr 02, 2015 at 12:23:27AM +0300, Max Kirillov wrote: > Then submodules in different worktrees will be fully independent. > They can, and should, be initialised and updated separately. > > Update t7410-submodule-checkout-to.sh to consider this. > > Signed-of

[PATCH v2] git-common-dir: make submodule related variables worktree specific

2015-04-01 Thread Max Kirillov
Then submodules in different worktrees will be fully independent. They can, and should, be initialised and updated separately. Update t7410-submodule-checkout-to.sh to consider this. Signed-off-by: Max Kirillov --- Some local slipped into patch which can break applying. Now hopely correct t

<    1   2   3   4   >