)
In order to include the latest cleanup to this patchset:
"setup: 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
--
To unsubscribe from this list: send the line "unsubs
simply avoiding to increment by offset_1st_component() and
wtlen at the same time.
Signed-off-by: Martin Erik Werner
---
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 chang
5b6a1add9db4c1 (refs/remotes/trunk)
Checked out HEAD:
file:///home/arand/utv/git/git/t/trash%20directory.t9151-svn-mergeinfo/svnrepo/trunk
r44
ok 1 - load svn dump
Does anyone who is more familiar with the test know what's going on
here? Is there any way to fix it, or should the tes
On Tue, 2014-02-04 at 10:09 -0800, Junio C Hamano wrote:
> Martin Erik Werner 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
>
function, which
currently uses real_path, causing the dereference.
Signed-off-by: Martin Erik Werner
Reviewed-by: Duy Nguyen
---
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
index 07c10c8..0bba988 100755
--- a/t
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
Reviewed-by: Duy Nguyen
---
t/t0060-path-utils.sh | 6 ++
1 file
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
Reviewed-by: Duy Nguyen
---
t/t0060-path-utils.sh | 10 ++
1 file changed, 10 insertions(+)
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
Tested-by: Martin Erik Werner
---
t/t3004-ls-files-basic.sh | 17
, 'prefix_path_gently' did not, nor does 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
Reviewed-by: Duy Nguyen
---
setup.c | 30 ++---
h '/'-terminated level */
while (*path) {
path++;
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: Ad
on is currently only intended for use in
'prefix_path_gently'.
Signed-off-by: Martin Erik Werner
Reviewed-by: Duy Nguyen
---
setup.c | 64
1 file changed, 64 insertions(+)
diff --git a/setup.c b/setup.c
index 5432a31
; +'
> +
> test_done
Your test looks preferrable to the simple git-add one that I proposed,
since it covers some more ground than the simple:
test_expect_success SYMLINKS 'add with abs path to link...' '
ln -s target link &&
git add link
'
Will
On Mon, Feb 03, 2014 at 10:50:17AM -0800, Junio C Hamano wrote:
> Martin Erik Werner 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 abo
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
> wrote:
> > diff --git a/setup.c b/setup.c
> > index a2e60ab..230505c 100644
> > --- a/setup.c
> > +++ b/setup.c
> > @@ -86,11 +86,23 @@ char *p
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
---
t/t0060-path-utils.sh | 5 +
1 file changed, 5 insertions(+)
diff --git a/t/t0060-path-utils.sh b/t/t0060-path
lute paths, 'prefix_path_gently' did 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
---
setup.c | 36
t/t0060-
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 f
ual to the work tree 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
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
---
t/t0060-path-utils.sh | 6 ++
1 file changed, 6 insertions
ork 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
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 writes:
> >
> >> On Sun, Feb 02, 2014 at 09:19:04AM +0700, Duy Nguyen wrote:
> >>> On Sun, Feb 2, 2014 at 8:59
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
> wrote:
> > + /* check if work tree is already the prefix */
> > + if (strncmp(path, work_tree, wtlen) == 0) {
> > +
ual to the work tree 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
---
setup.c | 57 ++
lute paths, 'prefix_path_gently' did 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
---
setup.c | 36
1 file changed, 16 insertio
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
---
t/t0060-path-utils.sh | 6 ++
1 file changed, 6 insertions
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.
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
---
t/t0060-path-utils.sh | 5 +
1 file changed, 5 insertions(+)
diff --git a/t/t0060-path-utils.sh b/t/t0060-path
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
> > dere
On Mon, Jan 27, 2014 at 08:31:37AM -0800, Junio C Hamano wrote:
> Martin Erik Werner 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 th
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
---
t/t0060-path-utils.sh | 6 ++
1 file changed, 6 insertions
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
---
t/t0060-path-utils.sh | 5 +
1 file changed, 5 insertions(+)
diff --git a/t/t0060-path-utils.sh b/t/t0060-path
lute paths, 'prefix_path_gently' did 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
---
setup.c | 36
t/t0060-
parately, since then there is no directory
separator between the work tree and in-repo part.
Signed-off-by: Martin Erik Werner
---
cache.h | 1 +
setup.c | 63 +++
2 files changed, 64 insertions(+)
diff --git a/cache.h b/cache.h
index ce3
, nor does 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
---
setup.c | 64 +++
t/
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 ins
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 incon
, nor does 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
---
setup.c | 54 ---
t/
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
---
t/t0060-path-utils.sh | 7 +++
1 file changed, 7 insertions(+)
diff --git a/t/t0060-path-utils.sh b/t/t0060
renamed:target -> moved
$ git mv "$(pwd)/link2" "$(pwd)/moved2"
fatal: /home/arand/tmp/linktest/link2: '/home/arand/tmp/linktest/link2' is
outside repository
###
--
Martin Erik Werner
--
To unsubscribe from this list: send the line "unsubscribe git"
2/2)
# Ref 'refs/heads/rewrite' was rewritten
# error: Untracked working tree file 'baz' would be overwritten by
merge.
#
# At this point, 'baz' is instead staged-deleted in the working
directory
###
--
Martin Erik Werner
--
To unsubscribe from this list: send the line &
7;s anyways.
I've changed to using [] && [] and rerolled the patch.
> Jonathan Nieder wrote:
> Hi Martin,
>
> Martin Erik Werner wrote:
>
> Minor clean up of if-then nesting in checks for environment
> variable
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 b/contrib/compl
disabled' for consistency
Signed-off-by: Martin Erik Werner
---
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-bash-pro
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
---
t/t9903-bash-prompt.sh | 40
1
On Wed, 2013-02-13 at 11:53 -0800, Junio C Hamano wrote:
> Martin Erik Werner 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 sho
On Wed, 2013-02-13 at 08:28 -0800, Junio C Hamano wrote:
> Martin Erik Werner 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 08:23 -0800, Junio C Hamano wrote:
> Martin Erik Werner 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.
>
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 consisten
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
---
t/t9903-bash-prompt.sh | 40
1 file changed, 40
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
---
co
On Tue, 2013-02-12 at 14:29 -0800, Junio C Hamano wrote:
> Martin Erik Werner 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_SHOWUNTRACKEDFI
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
---
co
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
---
t/t9903-bash-prompt.sh | 11 +++
1 file changed, 11 insertions
ar 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 change
54 matches
Mail list logo