: 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
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
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
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
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
++;
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
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
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
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
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
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
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
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
, 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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
)/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
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
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
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
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
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
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
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
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
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
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
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
' 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
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
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
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
54 matches
Mail list logo