Re: [ANNOUNCE] Git v2.0.0-rc4

2014-05-21 Thread Martin Erik Werner
: fix windows path buffer over-stepping this should be 6127ff6 instead. Sorry if it's unneeded to note, but just wanted to make sure :) -- Martin Erik Werner martinerikwer...@gmail.com -- To unsubscribe from this list: send the line unsubscribe git in the body of a message to majord...@vger.kernel.org

[PATCH] setup: Fix windows path buffer over-stepping

2014-04-24 Thread Martin Erik Werner
Erik Werner martinerikwer...@gmail.com --- This is a follow-up on 655ee9e mw/symlinks which is currently merged into master, prospective for git v2.0.0, the issue only affects v2.0.0-rc0. setup.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.c b/setup.c index

[BUG] t9151: Unreliable test/test setup

2014-02-05 Thread Martin Erik Werner
way to fix it, or should the test maybe be disabled completely for the time being? -- Martin Erik Werner martinerikwer...@gmail.com -- 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

[PATCH v6 5/6] setup: Add 'abspath_part_inside_repo' function

2014-02-04 Thread Martin Erik Werner
intended for use in 'prefix_path_gently'. Signed-off-by: Martin Erik Werner martinerikwer...@gmail.com Reviewed-by: Duy Nguyen pclo...@gmail.com --- setup.c | 64 1 file changed, 64 insertions(+) diff --git a/setup.c b/setup.c index

[PATCH v6 6/6] setup: Don't dereference in-tree symlinks for absolute paths

2014-02-04 Thread Martin Erik Werner
now do, any actual prefixing, hence the result from 'abspath_part_in_repo' is returned as-is. Fixes t0060-82 and t3004-5. Signed-off-by: Martin Erik Werner martinerikwer...@gmail.com Reviewed-by: Duy Nguyen pclo...@gmail.com --- setup.c | 30 ++ t

[PATCH v6 0/6] Handling of in-tree symlinks for absolute paths

2014-02-04 Thread Martin Erik Werner
++; if (*path == '/') { Junio C Hamano (1): t3004: Add test for ls-files on symlinks via absolute paths Martin Erik Werner (5): t0060: Add test for prefix_path on symlinks via absolute paths t0060: Add test for prefix_path when path == work tree t0060: Add tests for prefix_path when path begins

[PATCH v6 1/6] t3004: Add test for ls-files on symlinks via absolute paths

2014-02-04 Thread Martin Erik Werner
inside the work tree into consideration). Add a known-breakage test using the ls-files function, checking both if the symlink leads to a target in the same directory, and a target in the above directory. Signed-off-by: Martin Erik Werner martinerikwer...@gmail.com Tested-by: Martin Erik Werner

[PATCH v6 3/6] t0060: Add test for prefix_path when path == work tree

2014-02-04 Thread Martin Erik Werner
The current behaviour of prefix_path is to return an empty string if prefixing and absolute path that only contains exactly the work tree. This behaviour is a potential regression point. Signed-off-by: Martin Erik Werner martinerikwer...@gmail.com Reviewed-by: Duy Nguyen pclo...@gmail.com --- t

[PATCH v6 4/6] t0060: Add tests for prefix_path when path begins with work tree

2014-02-04 Thread Martin Erik Werner
is in fact a symlink that points to /dir/repo, it should instead succeed. Add two tests covering these cases, since they might be potential regression points. Signed-off-by: Martin Erik Werner martinerikwer...@gmail.com Reviewed-by: Duy Nguyen pclo...@gmail.com --- t/t0060-path-utils.sh | 10

[PATCH v6 2/6] t0060: Add test for prefix_path on symlinks via absolute paths

2014-02-04 Thread Martin Erik Werner
function, which currently uses real_path, causing the dereference. Signed-off-by: Martin Erik Werner martinerikwer...@gmail.com Reviewed-by: Duy Nguyen pclo...@gmail.com --- t/t0060-path-utils.sh | 5 + 1 file changed, 5 insertions(+) diff --git a/t/t0060-path-utils.sh b/t/t0060-path-utils.sh

Re: [PATCH v5 4/5] setup: Add 'abspath_part_inside_repo' function

2014-02-04 Thread Martin Erik Werner
On Tue, 2014-02-04 at 10:09 -0800, Junio C Hamano wrote: Martin Erik Werner martinerikwer...@gmail.com writes: (...) I was trying to convey that if path is simply /dir/repo, then the while loop method of replacing a '/' and checking from the beginning won't work for the last level, since

Re: [PATCH v5 5/5] setup: Don't dereference in-tree symlinks for absolute paths

2014-02-03 Thread Martin Erik Werner
On Mon, Feb 03, 2014 at 11:15:57AM +0700, Duy Nguyen wrote: On Sun, Feb 2, 2014 at 11:35 PM, Martin Erik Werner martinerikwer...@gmail.com wrote: diff --git a/setup.c b/setup.c index a2e60ab..230505c 100644 --- a/setup.c +++ b/setup.c @@ -86,11 +86,23 @@ char *prefix_path_gently(const

Re: [PATCH v5 1/5] t0060: Add test for manipulating symlinks via absolute paths

2014-02-03 Thread Martin Erik Werner
On Mon, Feb 03, 2014 at 10:50:17AM -0800, Junio C Hamano wrote: Martin Erik Werner martinerikwer...@gmail.com writes: When symlinks in the working tree are manipulated using the absolute path, git dereferences them, and tries to manipulate the link target instead. The above may a very

Re: [PATCH v5 4/5] setup: Add 'abspath_part_inside_repo' function

2014-02-03 Thread Martin Erik Werner
, Feb 03, 2014 at 01:00:48PM -0800, Junio C Hamano wrote: Martin Erik Werner martinerikwer...@gmail.com writes: The path being exactly equal to the work tree is handled separately, since then there is no directory separator between the work tree and in-repo part. What is an in-repo part

Re: [PATCH v4 3/4] setup: Add 'abspath_part_inside_repo' function

2014-02-02 Thread Martin Erik Werner
On Sun, Feb 02, 2014 at 09:19:04AM +0700, Duy Nguyen wrote: On Sun, Feb 2, 2014 at 8:59 AM, Martin Erik Werner martinerikwer...@gmail.com wrote: + /* check if work tree is already the prefix */ + if (strncmp(path, work_tree, wtlen) == 0) { + if (path[wtlen

Re: [PATCH v4 3/4] setup: Add 'abspath_part_inside_repo' function

2014-02-02 Thread Martin Erik Werner
On Sun, Feb 02, 2014 at 12:37:16PM +0100, Torsten Bögershausen wrote: On 2014-02-02 12.21, David Kastrup wrote: Martin Erik Werner martinerikwer...@gmail.com writes: On Sun, Feb 02, 2014 at 09:19:04AM +0700, Duy Nguyen wrote: On Sun, Feb 2, 2014 at 8:59 AM, Martin Erik Werner

[PATCH v5 0/5] Handling of in-tree symlinks for absolute paths

2014-02-02 Thread Martin Erik Werner
tree length, so as minimize the 'real_path' calls. Martin Erik Werner (5): t0060: Add test for manipulating symlinks via absolute paths t0060: Add test for prefix_path when path == work tree t0060: Add tests for prefix_path when path begins with work tree setup: Add

[PATCH v5 4/5] setup: Add 'abspath_part_inside_repo' function

2014-02-02 Thread Martin Erik Werner
is handled separately, since then there is no directory separator between the work tree and in-repo part. This function is currently only intended for use in 'prefix_path_gently'. Signed-off-by: Martin Erik Werner martinerikwer...@gmail.com --- setup.c | 64

[PATCH v5 2/5] t0060: Add test for prefix_path when path == work tree

2014-02-02 Thread Martin Erik Werner
The current behaviour of prefix_path is to return an empty string if prefixing and absolute path that only contains exactly the work tree. This behaviour is a potential regression point. Signed-off-by: Martin Erik Werner martinerikwer...@gmail.com --- t/t0060-path-utils.sh | 6 ++ 1 file

[PATCH v5 1/5] t0060: Add test for manipulating symlinks via absolute paths

2014-02-02 Thread Martin Erik Werner
tree into consideration). Add a known-breakage tests using the prefix_path function, which currently uses real_path, causing the dereference. Signed-off-by: Martin Erik Werner martinerikwer...@gmail.com --- t/t0060-path-utils.sh | 5 + 1 file changed, 5 insertions(+) diff --git a/t/t0060

[PATCH v5 5/5] setup: Don't dereference in-tree symlinks for absolute paths

2014-02-02 Thread Martin Erik Werner
not, nor does now do, any actual prefixing, hence the result from 'abspath_part_in_repo' is returned as-is. Fixes t0060-82. Signed-off-by: Martin Erik Werner martinerikwer...@gmail.com --- setup.c | 36 t/t0060-path-utils.sh | 2 +- 2 files changed

[PATCH v5 3/5] t0060: Add tests for prefix_path when path begins with work tree

2014-02-02 Thread Martin Erik Werner
One edge-case that isn't currently checked in the tests is the beginning of the path matching the work tree, despite the target not actually being the work tree, for example: path = /dir/repoa work_tree = /dir/repo should fail since the path is outside the repo. However, if /dir/repoa is in

[PATCH v4 0/4] Handling of in-tree symlinks for absolute paths

2014-02-01 Thread Martin Erik Werner
Hmm, maybe fourth time's the ch...nevermind. On Sat, Feb 01, 2014 at 02:31:21AM +0100, Martin Erik Werner wrote: On Fri, Jan 31, 2014 at 11:37:29PM +0100, Torsten Bögershausen wrote: On 2014-01-31 21.22, Martin Erik Werner wrote: (...) diff --git a/cache.h b/cache.h index ce377e1

[PATCH v4 1/4] t0060: Add test for manipulating symlinks via absolute paths

2014-02-01 Thread Martin Erik Werner
tree into consideration). Add a known-breakage tests using the prefix_path function, which currently uses real_path, causing the dereference. Signed-off-by: Martin Erik Werner martinerikwer...@gmail.com --- t/t0060-path-utils.sh | 5 + 1 file changed, 5 insertions(+) diff --git a/t/t0060

[PATCH v4 2/4] t0060: Add test for prefix_path when path == work tree

2014-02-01 Thread Martin Erik Werner
The current behaviour of prefix_path is to return an empty string if prefixing and absolute path that only contains exactly the work tree. This behaviour is a potential regression point. Signed-off-by: Martin Erik Werner martinerikwer...@gmail.com --- t/t0060-path-utils.sh | 6 ++ 1 file

[PATCH v4 3/4] setup: Add 'abspath_part_inside_repo' function

2014-02-01 Thread Martin Erik Werner
is handled separately, since then there is no directory separator between the work tree and in-repo part. This function is currently only intended for use in 'prefix_path_gently'. Signed-off-by: Martin Erik Werner martinerikwer...@gmail.com --- setup.c | 57

[PATCH v4 4/4] setup: Don't dereference in-tree symlinks for absolute paths

2014-02-01 Thread Martin Erik Werner
not, nor does now do, any actual prefixing, hence the result from 'abspath_part_in_repo' is returned as-is. Fixes t0060-82. Signed-off-by: Martin Erik Werner martinerikwer...@gmail.com --- setup.c | 36 1 file changed, 16 insertions(+), 20 deletions(-) diff --git

[PATCH v3 3/4] setup: Add 'abspath_part_inside_repo' function

2014-01-31 Thread Martin Erik Werner
then there is no directory separator between the work tree and in-repo part. Signed-off-by: Martin Erik Werner martinerikwer...@gmail.com --- cache.h | 1 + setup.c | 63 +++ 2 files changed, 64 insertions(+) diff --git a/cache.h b/cache.h

[PATCH v3 1/4] t0060: Add test for manipulating symlinks via absolute paths

2014-01-31 Thread Martin Erik Werner
tree into consideration). Add a known-breakage tests using the prefix_path function, which currently uses real_path, causing the dereference. Signed-off-by: Martin Erik Werner martinerikwer...@gmail.com --- t/t0060-path-utils.sh | 5 + 1 file changed, 5 insertions(+) diff --git a/t/t0060

[PATCH v3 4/4] setup: Don't dereference in-tree symlinks for absolute paths

2014-01-31 Thread Martin Erik Werner
not, nor does now do, any actual prefixing, hence the result from 'abspath_part_in_repo' is returned as-is. Fixes t0060-82. Signed-off-by: Martin Erik Werner martinerikwer...@gmail.com --- setup.c | 36 t/t0060-path-utils.sh | 2 +- 2 files changed

[PATCH v3 2/4] t0060: Add test for prefix_path when path == work tree

2014-01-31 Thread Martin Erik Werner
The current behaviour of prefix_path is to return an empty string if prefixing and absolute path that only contains exactly the work tree. This behaviour is a potential regression point. Signed-off-by: Martin Erik Werner martinerikwer...@gmail.com --- t/t0060-path-utils.sh | 6 ++ 1 file

[PATCH v3 0/4] setup: Don't dereference in-tree symlinks for absolute paths

2014-01-31 Thread Martin Erik Werner
On Mon, Jan 27, 2014 at 08:31:37AM -0800, Junio C Hamano wrote: Martin Erik Werner martinerikwer...@gmail.com writes: In order to manipulate symliks in the work tree using absolute paths, symlinks should only be dereferenced outside the work tree. I agree 100% with this reasoning

Re: [PATCH v3 3/4] setup: Add 'abspath_part_inside_repo' function

2014-01-31 Thread Martin Erik Werner
On Fri, Jan 31, 2014 at 11:37:29PM +0100, Torsten Bögershausen wrote: On 2014-01-31 21.22, Martin Erik Werner wrote: In order to extract the part of an absolute path which lies inside the repo, it is not possible to directly use real_path, since that would dereference symlinks both outside

[PATCH 0/2] in-tree symlink handling with absolute paths

2014-01-26 Thread Martin Erik Werner
On Wed, 2014-01-15 at 13:48 +0100, Martin Erik Werner wrote: If git-mv is provided absolute paths when moving symlinks, it tries to dereference them and (attempts to) move the symlink target rather than the symlink itself, this seems like a quite odd behaviour since it's inconsistent with how

[PATCH 2/2] setup: Don't dereference in-tree symlinks for absolute paths

2014-01-26 Thread Martin Erik Werner
now do, any actual prefixing, hence we simply remove the path corresponding to the work tree and return the remaining in-tree part of the path. Fixes t0060-82. Signed-off-by: Martin Erik Werner martinerikwer...@gmail.com --- setup.c | 54

[PATCH 1/2] t0060: Add test for manipulating symlinks via absolute paths

2014-01-26 Thread Martin Erik Werner
tree into consideration). Add a known-breakage tests using the prefix_path function, which currently uses real_path, causing the dereference. Signed-off-by: Martin Erik Werner martinerikwer...@gmail.com --- t/t0060-path-utils.sh | 7 +++ 1 file changed, 7 insertions(+) diff --git a/t/t0060

Re: [PATCH 2/2] setup: Don't dereference in-tree symlinks for absolute paths

2014-01-26 Thread Martin Erik Werner
On Sun, Jan 26, 2014 at 06:19:25PM +0100, Torsten Bögershausen wrote: On 2014-01-26 15.22, Martin Erik Werner wrote: The prefix_path_gently() function currently applies real_path to everything if given an absolute path, dereferencing symlinks both outside and inside the work tree. In order

[PATCH v2 2/2] setup: Don't dereference in-tree symlinks for absolute paths

2014-01-26 Thread Martin Erik Werner
now do, any actual prefixing, hence we simply remove the path corresponding to the work tree and return the remaining in-tree part of the path. Fixes t0060-82. Signed-off-by: Martin Erik Werner martinerikwer...@gmail.com --- setup.c | 64

git-mv with absolute path derefereces symlinks

2014-01-15 Thread Martin Erik Werner
)/link2 $(pwd)/moved2 fatal: /home/arand/tmp/linktest/link2: '/home/arand/tmp/linktest/link2' is outside repository ### -- Martin Erik Werner martinerikwer...@gmail.com -- To unsubscribe from this list: send the line unsubscribe git in the body of a message to majord...@vger.kernel.org More

Bug in filter-branch -d option, new files are dumped into parent

2013-04-02 Thread Martin Erik Werner
be overwritten by merge. # # At this point, 'baz' is instead staged-deleted in the working directory ### -- Martin Erik Werner martinerikwer...@gmail.com -- 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

[PATCH] shell-prompt: clean up nested if-then

2013-02-18 Thread Martin Erik Werner
Minor clean up of if-then nesting in checks for environment variables and config options. No functional changes. --- contrib/completion/git-prompt.sh | 27 +-- 1 file changed, 13 insertions(+), 14 deletions(-) diff --git a/contrib/completion/git-prompt.sh

Re: [PATCH] shell-prompt: clean up nested if-then

2013-02-18 Thread Martin Erik Werner
Nieder jrnie...@gmail.com wrote: Hi Martin, Martin Erik Werner wrote: Minor clean up of if-then nesting in checks for environment variables and config options. No functional changes. Yeah, the nesting was getting

[PATCH v2 0/3] Add bash.showUntrackedFiles config option

2013-02-13 Thread Martin Erik Werner
On Tue, 2013-02-12 at 14:29 -0800, Junio C Hamano wrote: Martin Erik Werner martinerikwer...@gmail.com writes: Add a test case for the bash.showUntrackedFiles config option, which checks that the config option can disable the global effect of the GIT_PS1_SHOWUNTRACKEDFILES environmant

[PATCH v2 1/3] shell prompt: add bash.showUntrackedFiles option

2013-02-13 Thread Martin Erik Werner
Add a config option 'bash.showUntrackedFiles' which allows enabling the prompt showing untracked files on a per-repository basis. This is useful for some repositories where the 'git ls-files ...' command may take a long time. Signed-off-by: Martin Erik Werner martinerikwer...@gmail.com

[PATCH v2 2/3] t9903: add tests for bash.showUntrackedFiles

2013-02-13 Thread Martin Erik Werner
Add 4 test for the bash.showUntrackedFiles config option, covering all combinations of the shell var being set/unset and the config option being enabled/disabled. Signed-off-by: Martin Erik Werner martinerikwer...@gmail.com --- t/t9903-bash-prompt.sh | 40

[PATCH v2 3/3] t9903: add extra tests for bash.showDirtyState

2013-02-13 Thread Martin Erik Werner
Added 3 extra tests for the bash.showDirtyState config option, tests should now cover all combinations of the shell var being set/unset and the config option being enabled/disabled, given a dirty file. * Renamed test 'disabled by config' to 'shell variable set with config disabled' for

Re: [PATCH v2 2/3] t9903: add tests for bash.showUntrackedFiles

2013-02-13 Thread Martin Erik Werner
On Wed, 2013-02-13 at 08:23 -0800, Junio C Hamano wrote: Martin Erik Werner martinerikwer...@gmail.com writes: Add 4 test for the bash.showUntrackedFiles config option, covering all combinations of the shell var being set/unset and the config option being enabled/disabled. Signed-off

Re: [PATCH v2 3/3] t9903: add extra tests for bash.showDirtyState

2013-02-13 Thread Martin Erik Werner
On Wed, 2013-02-13 at 08:28 -0800, Junio C Hamano wrote: Martin Erik Werner martinerikwer...@gmail.com writes: Added 3 extra tests for the bash.showDirtyState config option, tests should now cover all combinations of the shell var being set/unset and the config option being enabled

Re: [PATCH v2 3/3] t9903: add extra tests for bash.showDirtyState

2013-02-13 Thread Martin Erik Werner
On Wed, 2013-02-13 at 11:53 -0800, Junio C Hamano wrote: Martin Erik Werner martinerikwer...@gmail.com writes: Strictly speaking, you have 6 not 4 combinations (shell variable set/unset * config missing/set to false/set to true). I think these additional tests cover should all 6 because

[PATCH v3 2/3] t9903: add tests for bash.showUntrackedFiles

2013-02-13 Thread Martin Erik Werner
Add 4 test for the bash.showUntrackedFiles config option, the tests now cover all combinations of the shell var being set/unset and the config option being missing/enabled/disabled. Signed-off-by: Martin Erik Werner martinerikwer...@gmail.com --- t/t9903-bash-prompt.sh | 40

[PATCH v3 3/3] t9903: add extra tests for bash.showDirtyState

2013-02-13 Thread Martin Erik Werner
' for consistency Signed-off-by: Martin Erik Werner martinerikwer...@gmail.com --- t/t9903-bash-prompt.sh | 38 +- 1 file changed, 37 insertions(+), 1 deletion(-) diff --git a/t/t9903-bash-prompt.sh b/t/t9903-bash-prompt.sh index dd9ac6a..2101d91 100755 --- a/t/t9903

[PATCH 0/2] Add bash.showUntrackedFiles config option

2013-02-12 Thread Martin Erik Werner
to what exists for bash.showDirtyState. Martin Erik Werner (2): bash completion: add bash.showUntrackedFiles option t9903: add test case for bash.showUntrackedFiles contrib/completion/git-prompt.sh | 11 --- t/t9903-bash-prompt.sh | 11 +++ 2 files changed, 19

[PATCH 2/2] t9903: add test case for bash.showUntrackedFiles

2013-02-12 Thread Martin Erik Werner
Add a test case for the bash.showUntrackedFiles config option, which checks that the config option can disable the global effect of the GIT_PS1_SHOWUNTRACKEDFILES environmant variable. Signed-off-by: Martin Erik Werner martinerikwer...@gmail.com --- t/t9903-bash-prompt.sh | 11 +++ 1

[PATCH 1/2] bash completion: add bash.showUntrackedFiles option

2013-02-12 Thread Martin Erik Werner
Add a config option 'bash.showUntrackedFiles' which allows enabling the prompt showing untracked files on a per-repository basis. This is useful for some repositories where the 'git ls-files ...' command may take a long time. Signed-off-by: Martin Erik Werner martinerikwer...@gmail.com