* [PATCH 04/11] git-p4: test cloning with two dirs, clarify doc
From: Pete Wyckoff @ 2011-12-17 18:52 UTC (permalink / raw)
To: git
In-Reply-To: <1324147942-21558-1-git-send-email-pw@padd.com>
Document how git-p4 currently works when specifying multiple
depot paths:
1. No branches or directories are named.
2. Conflicting files are silently ignored---the last change
wins.
2. Option --destination is required, else the last path is construed
to be a directory.
3. Revision specifiers must be the same on all paths for them to
take effect.
Test this behavior.
Signed-off-by: Pete Wyckoff <pw@padd.com>
---
Documentation/git-p4.txt | 11 +++++++-
t/t9800-git-p4.sh | 60 ++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 69 insertions(+), 2 deletions(-)
diff --git a/Documentation/git-p4.txt b/Documentation/git-p4.txt
index c981407..c15b3b7 100644
--- a/Documentation/git-p4.txt
+++ b/Documentation/git-p4.txt
@@ -276,8 +276,15 @@ p4 revision specifier on the end:
"//depot/my/project@1,6"::
Import only changes 1 through 6.
-"//depot/proj1 //depot/proj2@all"::
- Import all changes from both named depot paths.
+"//depot/proj1@all //depot/proj2@all"::
+ Import all changes from both named depot paths into a single
+ repository. Only files below these directories are included.
+ There is not a subdirectory in git for each "proj1" and "proj2".
+ You must use the '--destination' option when specifying more
+ than one depot path. The revision specifier must be specified
+ identically on each depot path. If there are files in the
+ depot paths with the same name, the path with the most recently
+ updated version of the file is the one that appears in git.
See 'p4 help revisions' for the full syntax of p4 revision specifiers.
diff --git a/t/t9800-git-p4.sh b/t/t9800-git-p4.sh
index 272de3f..04ee20e 100755
--- a/t/t9800-git-p4.sh
+++ b/t/t9800-git-p4.sh
@@ -65,6 +65,66 @@ test_expect_success 'git-p4 sync new branch' '
)
'
+test_expect_success 'clone two dirs' '
+ (
+ cd "$cli" &&
+ mkdir sub1 sub2 &&
+ echo sub1/f1 >sub1/f1 &&
+ echo sub2/f2 >sub2/f2 &&
+ p4 add sub1/f1 &&
+ p4 submit -d "sub1/f1" &&
+ p4 add sub2/f2 &&
+ p4 submit -d "sub2/f2"
+ ) &&
+ "$GITP4" clone --dest="$git" //depot/sub1 //depot/sub2 &&
+ test_when_finished cleanup_git &&
+ (
+ cd "$git" &&
+ git ls-files >lines &&
+ test_line_count = 2 lines &&
+ git log --oneline p4/master >lines &&
+ test_line_count = 1 lines
+ )
+'
+
+test_expect_success 'clone two dirs, @all' '
+ (
+ cd "$cli" &&
+ echo sub1/f3 >sub1/f3 &&
+ p4 add sub1/f3 &&
+ p4 submit -d "sub1/f3"
+ ) &&
+ "$GITP4" clone --dest="$git" //depot/sub1@all //depot/sub2@all &&
+ test_when_finished cleanup_git &&
+ (
+ cd "$git" &&
+ git ls-files >lines &&
+ test_line_count = 3 lines &&
+ git log --oneline p4/master >lines &&
+ test_line_count = 3 lines
+ )
+'
+
+test_expect_success 'clone two dirs, @all, conflicting files' '
+ (
+ cd "$cli" &&
+ echo sub2/f3 >sub2/f3 &&
+ p4 add sub2/f3 &&
+ p4 submit -d "sub2/f3"
+ ) &&
+ "$GITP4" clone --dest="$git" //depot/sub1@all //depot/sub2@all &&
+ test_when_finished cleanup_git &&
+ (
+ cd "$git" &&
+ git ls-files >lines &&
+ test_line_count = 3 lines &&
+ git log --oneline p4/master >lines &&
+ test_line_count = 4 lines &&
+ echo sub2/f3 >expected &&
+ test_cmp expected f3
+ )
+'
+
test_expect_success 'exit when p4 fails to produce marshaled output' '
badp4dir="$TRASH_DIRECTORY/badp4dir" &&
mkdir "$badp4dir" &&
--
1.7.8.258.g45cc3c
^ permalink raw reply related
* [PATCH 05/11] git-p4: document and test clone --branch
From: Pete Wyckoff @ 2011-12-17 18:52 UTC (permalink / raw)
To: git
In-Reply-To: <1324147942-21558-1-git-send-email-pw@padd.com>
Clone with --branch will not checkout HEAD, unless the branch
happens to be called the default refs/remotes/p4/master. The
--branch option is most useful with sync; give an example of
that.
Signed-off-by: Pete Wyckoff <pw@padd.com>
---
Documentation/git-p4.txt | 10 +++++++++-
t/t9806-options.sh | 11 +++++++++++
2 files changed, 20 insertions(+), 1 deletions(-)
diff --git a/Documentation/git-p4.txt b/Documentation/git-p4.txt
index c15b3b7..a5d3d81 100644
--- a/Documentation/git-p4.txt
+++ b/Documentation/git-p4.txt
@@ -178,7 +178,15 @@ subsequent 'sync' operations.
--branch <branch>::
Import changes into given branch. If the branch starts with
'refs/', it will be used as is, otherwise the path 'refs/heads/'
- will be prepended. The default branch is 'master'.
+ will be prepended. The default branch is 'master'. If used
+ with an initial clone, no HEAD will be checked out.
++
+This example imports a new remote "p4/proj2" into an existing
+git repository:
+----
+ $ git init
+ $ git p4 sync --branch=refs/remotes/p4/proj2 //depot/proj2
+----
--detect-branches::
Use the branch detection algorithm to find new paths in p4. It is
diff --git a/t/t9806-options.sh b/t/t9806-options.sh
index 8044fb0..7e2e45a 100755
--- a/t/t9806-options.sh
+++ b/t/t9806-options.sh
@@ -27,6 +27,17 @@ test_expect_success 'clone no --git-dir' '
test_must_fail "$GITP4" clone --git-dir=xx //depot
'
+test_expect_success 'clone --branch' '
+ "$GITP4" clone --branch=refs/remotes/p4/sb --dest="$git" //depot &&
+ test_when_finished cleanup_git &&
+ (
+ cd "$git" &&
+ git ls-files >files &&
+ test_line_count = 0 files &&
+ test_path_is_file .git/refs/remotes/p4/sb
+ )
+'
+
test_expect_success 'kill p4d' '
kill_p4d
'
--
1.7.8.258.g45cc3c
^ permalink raw reply related
* [PATCH 06/11] git-p4: honor --changesfile option and test
From: Pete Wyckoff @ 2011-12-17 18:52 UTC (permalink / raw)
To: git
In-Reply-To: <1324147942-21558-1-git-send-email-pw@padd.com>
When an explicit list of changes is given, it makes no sense to
use @all or @3,5 or any of the other p4 revision specifiers.
Make the code notice when this happens, instead of just ignoring
--changesfile. Test it.
Signed-off-by: Pete Wyckoff <pw@padd.com>
---
contrib/fast-import/git-p4 | 16 +++++++++++++++-
t/t9806-options.sh | 23 +++++++++++++++++++++++
2 files changed, 38 insertions(+), 1 deletions(-)
diff --git a/contrib/fast-import/git-p4 b/contrib/fast-import/git-p4
index 14d6d7d..6fe2fcf 100755
--- a/contrib/fast-import/git-p4
+++ b/contrib/fast-import/git-p4
@@ -2020,6 +2020,17 @@ class P4Sync(Command, P4UserMap):
revision = ""
self.users = {}
+ # Make sure no revision specifiers are used when --changesfile
+ # is specified.
+ bad_changesfile = False
+ if len(self.changesFile) > 0:
+ for p in self.depotPaths:
+ if p.find("@") >= 0 or p.find("#") >= 0:
+ bad_changesfile = True
+ break
+ if bad_changesfile:
+ die("Option --changesfile is incompatible with revision specifiers")
+
newPaths = []
for p in self.depotPaths:
if p.find("@") != -1:
@@ -2036,7 +2047,10 @@ class P4Sync(Command, P4UserMap):
revision = p[hashIdx:]
p = p[:hashIdx]
elif self.previousDepotPaths == []:
- revision = "#head"
+ # pay attention to changesfile, if given, else import
+ # the entire p4 tree at the head revision
+ if len(self.changesFile) == 0:
+ revision = "#head"
p = re.sub ("\.\.\.$", "", p)
if not p.endswith("/"):
diff --git a/t/t9806-options.sh b/t/t9806-options.sh
index 7e2e45a..7a1dba6 100755
--- a/t/t9806-options.sh
+++ b/t/t9806-options.sh
@@ -38,6 +38,29 @@ test_expect_success 'clone --branch' '
)
'
+test_expect_success 'clone --changesfile' '
+ cf="$TRASH_DIRECTORY/cf" &&
+ test_when_finished "rm \"$cf\"" &&
+ printf "1\n3\n" >"$cf" &&
+ "$GITP4" clone --changesfile="$cf" --dest="$git" //depot &&
+ test_when_finished cleanup_git &&
+ (
+ cd "$git" &&
+ git log --oneline p4/master >lines &&
+ test_line_count = 2 lines
+ test_path_is_file file1 &&
+ test_path_is_missing file2 &&
+ test_path_is_file file3
+ )
+'
+
+test_expect_success 'clone --changesfile, @all' '
+ cf="$TRASH_DIRECTORY/cf" &&
+ test_when_finished "rm \"$cf\"" &&
+ printf "1\n3\n" >"$cf" &&
+ test_must_fail "$GITP4" clone --changesfile="$cf" --dest="$git" //depot@all
+'
+
test_expect_success 'kill p4d' '
kill_p4d
'
--
1.7.8.258.g45cc3c
^ permalink raw reply related
* [PATCH 07/11] git-p4: document and test --import-local
From: Pete Wyckoff @ 2011-12-17 18:52 UTC (permalink / raw)
To: git
In-Reply-To: <1324147942-21558-1-git-send-email-pw@padd.com>
Explain that it is needed on future syncs to find p4 branches
in refs/heads. Test this behavior.
Signed-off-by: Pete Wyckoff <pw@padd.com>
---
Documentation/git-p4.txt | 4 +++-
t/t9806-options.sh | 22 ++++++++++++++++++++++
2 files changed, 25 insertions(+), 1 deletions(-)
diff --git a/Documentation/git-p4.txt b/Documentation/git-p4.txt
index a5d3d81..2885b82 100644
--- a/Documentation/git-p4.txt
+++ b/Documentation/git-p4.txt
@@ -211,7 +211,9 @@ git repository:
By default, p4 branches are stored in 'refs/remotes/p4/',
where they will be treated as remote-tracking branches by
linkgit:git-branch[1] and other commands. This option instead
- puts p4 branches in 'refs/heads/p4/'.
+ puts p4 branches in 'refs/heads/p4/'. Note that future
+ sync operations must specify '--import-local' as well so that
+ they can find the p4 branches in refs/heads.
--max-changes <n>::
Limit the number of imported changes to 'n'. Useful to
diff --git a/t/t9806-options.sh b/t/t9806-options.sh
index 7a1dba6..6770326 100755
--- a/t/t9806-options.sh
+++ b/t/t9806-options.sh
@@ -61,6 +61,28 @@ test_expect_success 'clone --changesfile, @all' '
test_must_fail "$GITP4" clone --changesfile="$cf" --dest="$git" //depot@all
'
+# imports both master and p4/master in refs/heads
+# requires --import-local on sync to find p4 refs/heads
+# does not update master on sync, just p4/master
+test_expect_success 'clone/sync --import-local' '
+ "$GITP4" clone --import-local --dest="$git" //depot@1,2 &&
+ test_when_finished cleanup_git &&
+ (
+ cd "$git" &&
+ git log --oneline refs/heads/master >lines &&
+ test_line_count = 2 lines &&
+ git log --oneline refs/heads/p4/master >lines &&
+ test_line_count = 2 lines &&
+ test_must_fail "$GITP4" sync &&
+
+ "$GITP4" sync --import-local &&
+ git log --oneline refs/heads/master >lines &&
+ test_line_count = 2 lines &&
+ git log --oneline refs/heads/p4/master >lines &&
+ test_line_count = 3 lines
+ )
+'
+
test_expect_success 'kill p4d' '
kill_p4d
'
--
1.7.8.258.g45cc3c
^ permalink raw reply related
* [PATCH 08/11] git-p4: test --max-changes
From: Pete Wyckoff @ 2011-12-17 18:52 UTC (permalink / raw)
To: git
In-Reply-To: <1324147942-21558-1-git-send-email-pw@padd.com>
Signed-off-by: Pete Wyckoff <pw@padd.com>
---
t/t9806-options.sh | 10 ++++++++++
1 files changed, 10 insertions(+), 0 deletions(-)
diff --git a/t/t9806-options.sh b/t/t9806-options.sh
index 6770326..cc0fd26 100755
--- a/t/t9806-options.sh
+++ b/t/t9806-options.sh
@@ -83,6 +83,16 @@ test_expect_success 'clone/sync --import-local' '
)
'
+test_expect_success 'clone --max-changes' '
+ "$GITP4" clone --dest="$git" --max-changes 2 //depot@all &&
+ test_when_finished cleanup_git &&
+ (
+ cd "$git" &&
+ git log --oneline refs/heads/master >lines &&
+ test_line_count = 2 lines
+ )
+'
+
test_expect_success 'kill p4d' '
kill_p4d
'
--
1.7.8.258.g45cc3c
^ permalink raw reply related
* [PATCH 09/11] git-p4: test --keep-path
From: Pete Wyckoff @ 2011-12-17 18:52 UTC (permalink / raw)
To: git
In-Reply-To: <1324147942-21558-1-git-send-email-pw@padd.com>
Make sure it leaves the path, below //depot, in git.
Signed-off-by: Pete Wyckoff <pw@padd.com>
---
t/t9806-options.sh | 24 ++++++++++++++++++++++++
1 files changed, 24 insertions(+), 0 deletions(-)
diff --git a/t/t9806-options.sh b/t/t9806-options.sh
index cc0fd26..6b288ac 100755
--- a/t/t9806-options.sh
+++ b/t/t9806-options.sh
@@ -93,6 +93,30 @@ test_expect_success 'clone --max-changes' '
)
'
+test_expect_success 'clone --keep-path' '
+ (
+ cd "$cli" &&
+ mkdir -p sub/dir &&
+ echo f4 >sub/dir/f4 &&
+ p4 add sub/dir/f4 &&
+ p4 submit -d "change 4"
+ ) &&
+ "$GITP4" clone --dest="$git" --keep-path //depot/sub/dir@all &&
+ test_when_finished cleanup_git &&
+ (
+ cd "$git" &&
+ test_path_is_missing f4 &&
+ test_path_is_file sub/dir/f4
+ ) &&
+ cleanup_git &&
+ "$GITP4" clone --dest="$git" //depot/sub/dir@all &&
+ (
+ cd "$git" &&
+ test_path_is_file f4 &&
+ test_path_is_missing sub/dir/f4
+ )
+'
+
test_expect_success 'kill p4d' '
kill_p4d
'
--
1.7.8.258.g45cc3c
^ permalink raw reply related
* [PATCH 10/11] git-p4: test and document --use-client-spec
From: Pete Wyckoff @ 2011-12-17 18:52 UTC (permalink / raw)
To: git
In-Reply-To: <1324147942-21558-1-git-send-email-pw@padd.com>
The depot path is required, even with this option. Make sure
git-p4 fails and exits with non-zero.
Contents in the specified depot path will be rearranged according
to the client spec. Test this and add a note in the docs.
Leave an XXX suggesting that this is somewhat confusing behavior
that might be good to fix later.
Function stripRepoPath() looks at self.useClientSpec. Make sure
this is set both for command-line option --use-client-spec and
for configuration variable git-p4.useClientSpec. Test this.
Signed-off-by: Pete Wyckoff <pw@padd.com>
---
Documentation/git-p4.txt | 5 +++-
contrib/fast-import/git-p4 | 6 ++++-
t/t9806-options.sh | 46 ++++++++++++++++++++++++++++++++++++++++++++
3 files changed, 55 insertions(+), 2 deletions(-)
diff --git a/Documentation/git-p4.txt b/Documentation/git-p4.txt
index 2885b82..3092571 100644
--- a/Documentation/git-p4.txt
+++ b/Documentation/git-p4.txt
@@ -232,7 +232,10 @@ git repository:
Use a client spec to find the list of interesting files in p4.
The client spec is discovered using 'p4 client -o' which checks
the 'P4CLIENT' environment variable and returns a mapping of
- depot files to workspace files.
+ depot files to workspace files. Note that a depot path is
+ still required, but files found in the path that match in
+ the client spec view will be laid out according to the client
+ spec.
Clone options
~~~~~~~~~~~~~
diff --git a/contrib/fast-import/git-p4 b/contrib/fast-import/git-p4
index 6fe2fcf..2d07e93 100755
--- a/contrib/fast-import/git-p4
+++ b/contrib/fast-import/git-p4
@@ -1947,7 +1947,10 @@ class P4Sync(Command, P4UserMap):
if not gitBranchExists(self.refPrefix + "HEAD") and self.importIntoRemotes and gitBranchExists(self.branch):
system("git symbolic-ref %sHEAD %s" % (self.refPrefix, self.branch))
- if self.useClientSpec or gitConfig("git-p4.useclientspec") == "true":
+ if not self.useClientSpec:
+ if gitConfig("git-p4.useclientspec", "--bool") == "true":
+ self.useClientSpec = True
+ if self.useClientSpec:
self.getClientSpec()
# TODO: should always look at previous commits,
@@ -2376,6 +2379,7 @@ def main():
if not cmd.run(args):
parser.print_help()
+ sys.exit(2)
if __name__ == '__main__':
diff --git a/t/t9806-options.sh b/t/t9806-options.sh
index 6b288ac..1f1952a 100755
--- a/t/t9806-options.sh
+++ b/t/t9806-options.sh
@@ -117,6 +117,52 @@ test_expect_success 'clone --keep-path' '
)
'
+# clone --use-client-spec must still specify a depot path
+# if given, it should rearrange files according to client spec
+# when it has view lines that match the depot path
+# XXX: should clone/sync just use the client spec exactly, rather
+# than needing depot paths?
+test_expect_success 'clone --use-client-spec' '
+ (
+ # big usage message
+ exec >/dev/null &&
+ test_must_fail "$GITP4" clone --dest="$git" --use-client-spec
+ ) &&
+ cli2="$TRASH_DIRECTORY/cli2" &&
+ mkdir -p "$cli2" &&
+ test_when_finished "rmdir \"$cli2\"" &&
+ (
+ cd "$cli2" &&
+ p4 client -i <<-EOF
+ Client: client2
+ Description: client2
+ Root: $cli2
+ View: //depot/sub/... //client2/bus/...
+ EOF
+ ) &&
+ P4CLIENT=client2 &&
+ test_when_finished cleanup_git &&
+ "$GITP4" clone --dest="$git" --use-client-spec //depot/... &&
+ (
+ cd "$git" &&
+ test_path_is_file bus/dir/f4 &&
+ test_path_is_file file1
+ ) &&
+ cleanup_git &&
+
+ # same thing again, this time with variable instead of option
+ mkdir "$git" &&
+ (
+ cd "$git" &&
+ git init &&
+ git config git-p4.useClientSpec true &&
+ "$GITP4" sync //depot/... &&
+ git checkout -b master p4/master &&
+ test_path_is_file bus/dir/f4 &&
+ test_path_is_file file1
+ )
+'
+
test_expect_success 'kill p4d' '
kill_p4d
'
--
1.7.8.258.g45cc3c
^ permalink raw reply related
* [PATCH 11/11] git-p4: document and test submit options
From: Pete Wyckoff @ 2011-12-17 18:52 UTC (permalink / raw)
To: git
In-Reply-To: <1324147942-21558-1-git-send-email-pw@padd.com>
Clarify there is a -M option, but no -C. These are both
configurable through variables.
Explain that the allowSubmit variable takes a comma-separated
list of branch names.
Catch earlier an invalid branch name given as an argument to
"git p4 clone".
Test option --origin, variable allowSubmit, and explicit master
branch name.
Signed-off-by: Pete Wyckoff <pw@padd.com>
---
Documentation/git-p4.txt | 8 +++++-
contrib/fast-import/git-p4 | 7 +++++
t/t9807-submit.sh | 54 ++++++++++++++++++++++++++++++++++++++++++++
3 files changed, 67 insertions(+), 2 deletions(-)
diff --git a/Documentation/git-p4.txt b/Documentation/git-p4.txt
index 3092571..f97b1c5 100644
--- a/Documentation/git-p4.txt
+++ b/Documentation/git-p4.txt
@@ -267,7 +267,9 @@ These options can be used to modify 'git p4 submit' behavior.
-M[<n>]::
Detect renames. See linkgit:git-diff[1]. Renames will be
- represented in p4 using explicit 'move' operations.
+ represented in p4 using explicit 'move' operations. There
+ is no corresponding option to detect copies, but there are
+ variables for both moves and copies.
--preserve-user::
Re-author p4 changes before submitting to p4. This option
@@ -453,7 +455,9 @@ git-p4.skipSubmitEditCheck::
git-p4.allowSubmit::
By default, any branch can be used as the source for a 'git p4
submit' operation. This configuration variable, if set, permits only
- the named branches to be used as submit sources.
+ the named branches to be used as submit sources. Branch names
+ must be the short names (no "refs/heads/"), and should be
+ separated by commas (","), with no spaces.
git-p4.skipUserNameCheck::
If the user running 'git p4 submit' does not exist in the p4
diff --git a/contrib/fast-import/git-p4 b/contrib/fast-import/git-p4
index 2d07e93..883d0b5 100755
--- a/contrib/fast-import/git-p4
+++ b/contrib/fast-import/git-p4
@@ -362,6 +362,11 @@ def isValidGitDir(path):
def parseRevision(ref):
return read_pipe("git rev-parse %s" % ref).strip()
+def branchExists(ref):
+ rev = read_pipe(["git", "rev-parse", "-q", "--verify", ref],
+ ignore_error=True)
+ return len(rev) > 0
+
def extractLogMessageFromGitCommit(commit):
logMessage = ""
@@ -1085,6 +1090,8 @@ class P4Submit(Command, P4UserMap):
die("Detecting current git branch failed!")
elif len(args) == 1:
self.master = args[0]
+ if not branchExists(self.master):
+ die("Branch %s does not exist" % self.master)
else:
return False
diff --git a/t/t9807-submit.sh b/t/t9807-submit.sh
index 2cb724e..b1f61e3 100755
--- a/t/t9807-submit.sh
+++ b/t/t9807-submit.sh
@@ -31,6 +31,60 @@ test_expect_success 'submit with no client dir' '
)
'
+# make two commits, but tell it to apply only from HEAD^
+test_expect_success 'submit --origin' '
+ test_when_finished cleanup_git &&
+ "$GITP4" clone --dest="$git" //depot &&
+ (
+ cd "$git" &&
+ test_commit "file3" &&
+ test_commit "file4" &&
+ git config git-p4.skipSubmitEdit true &&
+ "$GITP4" submit --origin=HEAD^
+ ) &&
+ (
+ cd "$cli" &&
+ p4 sync &&
+ test_path_is_missing "file3.t" &&
+ test_path_is_file "file4.t"
+ )
+'
+
+test_expect_success 'submit with allowSubmit' '
+ test_when_finished cleanup_git &&
+ "$GITP4" clone --dest="$git" //depot &&
+ (
+ cd "$git" &&
+ test_commit "file5" &&
+ git config git-p4.skipSubmitEdit true &&
+ git config git-p4.allowSubmit "nobranch" &&
+ test_must_fail "$GITP4" submit &&
+ git config git-p4.allowSubmit "nobranch,master" &&
+ "$GITP4" submit
+ )
+'
+
+test_expect_success 'submit with master branch name from argv' '
+ test_when_finished cleanup_git &&
+ "$GITP4" clone --dest="$git" //depot &&
+ (
+ cd "$git" &&
+ test_commit "file6" &&
+ git config git-p4.skipSubmitEdit true &&
+ test_must_fail "$GITP4" submit nobranch &&
+ git branch otherbranch &&
+ git reset --hard HEAD^ &&
+ test_commit "file7" &&
+ "$GITP4" submit otherbranch
+ ) &&
+ (
+ cd "$cli" &&
+ p4 sync &&
+ test_path_is_file "file6.t" &&
+ test_path_is_missing "file7.t"
+ )
+'
+
test_expect_success 'kill p4d' '
kill_p4d
'
--
1.7.8.258.g45cc3c
^ permalink raw reply related
* Re: [PATCH 0/3 (resend)] gitweb: Various to_utf8 / esc_html fixes
From: Junio C Hamano @ 2011-12-17 19:27 UTC (permalink / raw)
To: Jakub Narebski; +Cc: git, Juergen Kreileder, John Hawley, admin
In-Reply-To: <1324113743-21498-1-git-send-email-jnareb@gmail.com>
Jakub Narebski <jnareb@gmail.com> writes:
> Sorry for resend of this series, but I forgot to generate patches in
> UTF-8 instead of i18n.logoutputencoding=iso-8859-2
>
>
> This is post-release resend of Jürgen patches (which were sent
> during feature-freeze).
>
> I have slightly extended commit messages, and added my ACK.
>
> Jürgen Kreileder (3):
> gitweb: Call to_utf8() on input string in chop_and_escape_str()
> gitweb: esc_html() site name for title in OPML
> gitweb: Output valid utf8 in git_blame_common('data')
>
> gitweb/gitweb.perl | 8 ++++++--
> 1 files changed, 6 insertions(+), 2 deletions(-)
Thanks.
^ permalink raw reply
* Re: [PATCH] make "git push -v" actually verbose
From: Junio C Hamano @ 2011-12-17 19:34 UTC (permalink / raw)
To: Jeff King; +Cc: git, Tay Ray Chuan, Junio C Hamano
In-Reply-To: <20111217094142.GA10451@sigill.intra.peff.net>
Jeff King <peff@peff.net> writes:
> On Sat, Dec 17, 2011 at 04:37:15AM -0500, Jeff King wrote:
>
>> Providing a single "-v" to "git push" currently does
>> nothing. Giving two flags ("git push -v -v") turns on the
>> first level of verbosity.
>
> One minor clarification: it is not technically true that "git push -v"
> does nothing. It just does not do the interesting "show a verbose status
> table" operation, which is almost certainly what the user wants (and
> what happened before the commits I mentioned). It does print "Pushing to
> $url", since that happens above the transport layer. But I'm pretty sure
> that is not what users of "-v" are interested in. :)
Thanks, but don't be so sure about that.
When you are so used to say "git push ko", from time to time you want to
check which one of your kernel.org machine you are pushing into; that
"pushing to this exact url" is actually quite useful.
^ permalink raw reply
* Re: Re* How to generate pull-request with info of signed tag
From: Junio C Hamano @ 2011-12-17 19:47 UTC (permalink / raw)
To: Aneesh Kumar K.V; +Cc: Git Mailing List
In-Reply-To: <871us3l45o.fsf@linux.vnet.ibm.com>
"Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com> writes:
> Tested-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
>
> -aneesh
Thanks.
^ permalink raw reply
* Re: [BUG] attribute "eol" with "crlf"
From: Junio C Hamano @ 2011-12-17 19:48 UTC (permalink / raw)
To: Ralf Thielow; +Cc: Matthieu Moy, Carlos Martín Nieto, git
In-Reply-To: <CAN0XMOK0=uxRHcsUmbOE_UrkUcqmRFk-OYnY7kOZkZcWxWOycQ@mail.gmail.com>
Ralf Thielow <ralf.thielow@googlemail.com> writes:
>> Perhaps something like this, but I do not use CRLF myself, so it probably
>> needs to be checked by extra sets of eyes.
>>
>> Thanks.
>>
>
> Works fine for me. Thanks
Ok; thanks. Will queue.
^ permalink raw reply
* Re: [PATCH] make "git push -v" actually verbose
From: Jeff King @ 2011-12-17 19:50 UTC (permalink / raw)
To: Junio C Hamano; +Cc: git, Tay Ray Chuan
In-Reply-To: <7vobv7dmak.fsf@alter.siamese.dyndns.org>
On Sat, Dec 17, 2011 at 11:34:59AM -0800, Junio C Hamano wrote:
> > One minor clarification: it is not technically true that "git push -v"
> > does nothing. It just does not do the interesting "show a verbose status
> > table" operation, which is almost certainly what the user wants (and
> > what happened before the commits I mentioned). It does print "Pushing to
> > $url", since that happens above the transport layer. But I'm pretty sure
> > that is not what users of "-v" are interested in. :)
>
> Thanks, but don't be so sure about that.
>
> When you are so used to say "git push ko", from time to time you want to
> check which one of your kernel.org machine you are pushing into; that
> "pushing to this exact url" is actually quite useful.
But we will also print that as part of the status table, so it really is
redundant. The only difference is that it comes before the object
transfer phase, so if the whole thing barfs before you even make it to
the status table, you get a little more debugging output (although
typically the URL is mentioned in the die() message, anyway).
E.g.:
$ git push github
Counting objects: 214, done.
Compressing objects: 100% (131/131), done.
Writing objects: 100% (135/135), 33.73 KiB, done.
Total 135 (delta 102), reused 9 (delta 4)
To https://github.com/peff/git.git
+ 710a44a...0fa8107 private -> private (forced update)
Before my patch, adding "-v" would just put the "Pushing to https://..."
before the object phase.
Anyway, regardless of the utility of that message, I think the fix makes
sense. It really looks like an unintended regression in 8afd8dc, and
certainly the original intent of the code was to match fetch's use of
"-v" to show up-to-date entries in the status table (which I know
because I wrote it).
-Peff
^ permalink raw reply
* header file at a top
From: Thiago Farina @ 2011-12-17 21:57 UTC (permalink / raw)
To: Git Mailing List
Hi folks,
I don't understand why in git the .h file is not included as the first
substantive line of the .c file.
i.e:
foo.c
--------------------------------------------------------------------
#include "foo.h"
/* in alphabetical order */
#include "bar.h"
#include "tiz.h"
Any particular reason we include the corresponding header file at some
random position in the source file?
^ permalink raw reply
* Re: [PATCH 02/11] git-p4: test debug macro
From: Luke Diamand @ 2011-12-17 22:43 UTC (permalink / raw)
To: Pete Wyckoff; +Cc: git
In-Reply-To: <1324147942-21558-3-git-send-email-pw@padd.com>
On 17/12/11 18:52, Pete Wyckoff wrote:
> Call this from a test to have it pause and wait for you to
> investigate. It prints out its current directory and the
> P4 environment variables. It waits for ctrl-c before continuing
> the test.
>
Very useful, thanks!
> +# Go investigate when it pauses, then hit ctrl-c to continue the
> +# test. The other tests will run, and p4d will be cleaned up nicely.
> +#
> +# Note that the directory is deleted and created for every test run,
> +# so you have to do the "cd" again.
> +#
> +debug() {
> + echo "*** Debug me, hit ctrl-c when done. Useful shell commands:"
> + echo cd \"$(pwd)\"
> + echo export P4PORT=$P4PORT P4CLIENT=$P4CLIENT
> + trap echo SIGINT
Does that work with non-bash shells like ash? It didn't for me.
> + sleep $((3600 * 24 * 30))
> + trap - SIGINT
> +}
> +
^ permalink raw reply
* Re: [PATCH] Escape file:// URL's to meet subversion SVN::Ra requirements
From: Ben Walton @ 2011-12-17 23:48 UTC (permalink / raw)
To: Jonathan Nieder; +Cc: GIT List, normalperson
In-Reply-To: <20111217095019.GC8845@elie.hsd1.il.comcast.net>
Excerpts from Jonathan Nieder's message of Sat Dec 17 04:50:19 -0500 2011:
Hi Jonathan,
Thanks for following up on this. I've intermittently spent time
digging away at it but other than a few poorly placed fixes that
allowed me to get further into the test suite before failure, I
haven't found a workable fix yet. I've included my wip patch below as
it may help others that are more familiar with the workings of git-svn
isolate a nice clean place to solve the problem.
> The bad effect is that it converts percent signs to %25. So
> commands like "git svn clone file:///path/to/test%20repository" that
> previously worked might not work any more, if v1.6.5-rc0~61 (svn:
> assume URLs from the command-line are URI-encoded, 2009-08-16) did
> not do its job completely.
I wonder if simply doing a uri decode followed by a uri encode might
work? That would decode things that already had some encoding and
then re-encode everything to handle a mixed encodings...I really think
that the svn code should take 'raw' strings and encode internally but
that ship has sailed.
> Another possible approach: to imitate the svn command line tools, we
> could use SVN::Client::url_from_path in some appropriate place.
I've been looking at these functions too.
Thanks
-Ben
>From 98a6b6b4f26a644db5089fce68be6cf7261e4fe1 Mon Sep 17 00:00:00 2001
From: Ben Walton <bwalton@opencsw.org>
Date: Wed, 9 Nov 2011 02:39:05 +0100
Subject: [PATCH] selectively use svn functions to sanitize urls
Signed-off-by: Ben Walton <bwalton@opencsw.org>
---
git-svn.perl | 22 +++++++++++++++-------
1 files changed, 15 insertions(+), 7 deletions(-)
diff --git a/git-svn.perl b/git-svn.perl
index 351e743..fb1ce65 100755
--- a/git-svn.perl
+++ b/git-svn.perl
@@ -1342,9 +1342,13 @@ sub escape_uri_only {
sub escape_url {
my ($url) = @_;
- if ($url =~ m#^([^:]+)://([^/]*)(.*)$#) {
- my ($scheme, $domain, $uri) = ($1, $2, escape_uri_only($3));
- $url = "$scheme://$domain$uri";
+ if ($SVN::Core::VERSION =~ /^1\.[0-6]/) {
+ if ($url =~ m#^([^:]+)://([^/]*)(.*)$#) {
+ my ($scheme, $domain, $uri) = ($1, $2, escape_uri_only($3));
+ $url = "$scheme://$domain$uri";
+ }
+ } else {
+ $url = SVN::_Core::svn_uri_canonicalize($url);
}
$url;
}
@@ -2222,7 +2226,7 @@ sub init_remote_config {
"$url => $min_url\n";
}
my $old_path = $self->{path};
- $self->{path} = $url;
+ $self->{path} = SVN::_Core::svn_uri_canonicalize($url);
$self->{path} =~ s!^\Q$min_url\E(/|$)!!;
if (length $old_path) {
$self->{path} .= "/$old_path";
@@ -5363,9 +5367,13 @@ sub escape_uri_only {
sub escape_url {
my ($url) = @_;
- if ($url =~ m#^(https?)://([^/]+)(.*)$#) {
- my ($scheme, $domain, $uri) = ($1, $2, escape_uri_only($3));
- $url = "$scheme://$domain$uri";
+ if ($SVN::Core::VERSION =~ /^1\.[0-6]/) {
+ if ($url =~ m#^(https?)://([^/]+)(.*)$#) {
+ my ($scheme, $domain, $uri) = ($1, $2, escape_uri_only($3));
+ $url = "$scheme://$domain$uri";
+ }
+ } else {
+ $url = SVN::_Core::svn_uri_canonicalize($url);
}
$url;
}
--
1.7.6.1
--
Ben Walton
Systems Programmer - CHASS
University of Toronto
C:416.407.5610 | W:416.978.4302
^ permalink raw reply related
* [PATCHv2 02/11] git-p4: test debug macro
From: Pete Wyckoff @ 2011-12-18 1:36 UTC (permalink / raw)
To: Luke Diamand; +Cc: git
In-Reply-To: <4EED1B06.80007@diamand.org>
Call this from a test to have it pause and wait for you to
investigate. It prints out its current directory and the
P4 environment variables. It waits for ctrl-c before continuing
the test.
Signed-off-by: Pete Wyckoff <pw@padd.com>
---
luke@diamand.org wrote on Sat, 17 Dec 2011 22:43 +0000:
> >+# Go investigate when it pauses, then hit ctrl-c to continue the
> >+# test. The other tests will run, and p4d will be cleaned up nicely.
> >+#
> >+# Note that the directory is deleted and created for every test run,
> >+# so you have to do the "cd" again.
> >+#
> >+debug() {
> >+ echo "*** Debug me, hit ctrl-c when done. Useful shell commands:"
> >+ echo cd \"$(pwd)\"
> >+ echo export P4PORT=$P4PORT P4CLIENT=$P4CLIENT
> >+ trap echo SIGINT
>
> Does that work with non-bash shells like ash? It didn't for me.
>
> >+ sleep $((3600 * 24 * 30))
> >+ trap - SIGINT
> >+}
> >+
Indeed. At least debian's ash is just dash, and version 0.5.7-2
doesn't know the symbolic signal names.
Thanks for noticing.
t/lib-git-p4.sh | 28 ++++++++++++++++++++++++++++
1 files changed, 28 insertions(+), 0 deletions(-)
diff --git a/t/lib-git-p4.sh b/t/lib-git-p4.sh
index a870f9a..b7b2c95 100644
--- a/t/lib-git-p4.sh
+++ b/t/lib-git-p4.sh
@@ -72,3 +72,31 @@ kill_p4d() {
cleanup_git() {
rm -rf "$git"
}
+
+#
+# This is a handy tool when developing or debugging tests. Use
+# it inline to pause the script, perhaps like this:
+#
+# "$GITP4" clone ... &&
+# (
+# cd "$git" &&
+# debug &&
+# git log --oneline >lines &&
+# ...
+#
+# Go investigate when it pauses, then hit ctrl-c to continue the
+# test. The other tests will run, and p4d will be cleaned up nicely.
+#
+# Note that the directory is deleted and created for every test run,
+# so you have to do the "cd" again.
+#
+debug() {
+ echo "*** Debug me, hit ctrl-c when done. Useful shell commands:"
+ echo cd \"$(pwd)\"
+ echo export P4PORT=$P4PORT P4CLIENT=$P4CLIENT
+ # 2 is SIGINT, ash/dash does not know symbolic names
+ trap echo 2
+ sleep $((3600 * 24 * 30))
+ trap - 2
+}
+
--
1.7.8.285.gb668d
^ permalink raw reply related
* BUG: Git command causes crash
From: Ryan O'Hara @ 2011-12-18 3:13 UTC (permalink / raw)
To: git
On Git for Windows (MinGW), at least, this command causes git to crash:
git commit -a --no-message --dry-run
^ permalink raw reply
* Re: [PATCHv2 02/11] git-p4: test debug macro
From: Jonathan Nieder @ 2011-12-18 3:26 UTC (permalink / raw)
To: Pete Wyckoff; +Cc: Luke Diamand, git
In-Reply-To: <20111218013651.GA18735@padd.com>
Pete Wyckoff wrote:
> + # 2 is SIGINT, ash/dash does not know symbolic names
> + trap echo 2
'trap "$cmd" INT' works, and it's even in POSIX. ;)
http://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#trap
^ permalink raw reply
* Re: BUG: Git command causes crash
From: Jeff King @ 2011-12-18 5:03 UTC (permalink / raw)
To: Ryan O'Hara; +Cc: git, Junio C Hamano
In-Reply-To: <CAOgd6zFr5LorTK6X5o6NQE3L61KhaUZG9tX4LEB4_Na_YKPPpA@mail.gmail.com>
On Sat, Dec 17, 2011 at 07:13:53PM -0800, Ryan O'Hara wrote:
> On Git for Windows (MinGW), at least, this command causes git to crash:
>
> git commit -a --no-message --dry-run
On Linux, too, using just "git commit --no-message" (whether there is
something to commit or not). This fixes it for me.
-- >8 --
Subject: [PATCH] commit: initialize static strbuf
Strbufs cannot rely on static all-zero initialization;
instead, they must use STRBUF_INIT to point to the
"slopbuf".
Without this patch, "git commit --no-message" segfaults
reliably.
Signed-off-by: Jeff King <peff@peff.net>
---
builtin/commit.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/builtin/commit.c b/builtin/commit.c
index d0f27f9..336faff 100644
--- a/builtin/commit.c
+++ b/builtin/commit.c
@@ -104,7 +104,7 @@
static int use_editor = 1, include_status = 1;
static int show_ignored_in_status;
static const char *only_include_assumed;
-static struct strbuf message;
+static struct strbuf message = STRBUF_INIT;
static int null_termination;
static enum {
--
1.7.8.rc3.14.gd2470
^ permalink raw reply related
* Re: BUG: Git command causes crash
From: Jeff King @ 2011-12-18 5:07 UTC (permalink / raw)
To: Ryan O'Hara; +Cc: git, Junio C Hamano
In-Reply-To: <20111218050322.GA1787@sigill.intra.peff.net>
On Sun, Dec 18, 2011 at 12:03:22AM -0500, Jeff King wrote:
> Subject: [PATCH] commit: initialize static strbuf
>
> Strbufs cannot rely on static all-zero initialization;
> instead, they must use STRBUF_INIT to point to the
> "slopbuf".
>
> Without this patch, "git commit --no-message" segfaults
> reliably.
This one, too:
diff --git a/builtin/merge.c b/builtin/merge.c
index 2457940..28a3a7e 100644
--- a/builtin/merge.c
+++ b/builtin/merge.c
@@ -50,7 +50,7 @@ struct strategy {
static int fast_forward_only, option_edit;
static int allow_trivial = 1, have_message;
static int overwrite_ignore = 1;
-static struct strbuf merge_msg;
+static struct strbuf merge_msg = STRBUF_INIT;
static struct commit_list *remoteheads;
static struct strategy **use_strategies;
static size_t use_strategies_nr, use_strategies_alloc;
I'm not sure if you can actually trigger a segfault, but it clearly
violates the strbuf API.
-Peff
^ permalink raw reply related
* Re: BUG: Git command causes crash
From: Jeff King @ 2011-12-18 5:38 UTC (permalink / raw)
To: Ryan O'Hara; +Cc: git, Junio C Hamano
In-Reply-To: <20111218050728.GB1787@sigill.intra.peff.net>
On Sun, Dec 18, 2011 at 12:07:28AM -0500, Jeff King wrote:
> -static struct strbuf merge_msg;
> +static struct strbuf merge_msg = STRBUF_INIT;
> [...]
>
> I'm not sure if you can actually trigger a segfault, but it clearly
> violates the strbuf API.
One note on this: that line by itself doesn't violate the strbuf API.
You can always initialize it by hand later. But it's easy to look
through the code in this case and see that we don't.
A grep of "static struct strbuf" doesn't show any other similar cases. I
also did a grep of "struct strbuf [a-z]*;" to find stack and struct
member variables. Most of the stack ones get initialized right away
(which is not too surprising, as they would contain random garbage and
not work at all). A few of the ones in structs are hard to track down,
and could be problematic (I expected to maybe find a memset-to-zero
initialization), but I followed all of them to an actual strbuf_init.
Which isn't to say my looking was exhaustive, as there might be other
code paths I missed. But at least these two are the low-hanging fruit.
Here's a commit which does them both together (they are really the same
bug).
-- >8 --
Subject: [PATCH] initialize static strbufs
Strbufs cannot rely on static all-zero initialization;
instead, they must use STRBUF_INIT to point to the
"slopbuf". This failure can go undetected in most code
paths, as only some of the strbuf functions assume the
slopbuf is in place (e.g., "strbuf_add" works). In
particular, calling "strbuf_setlen" will cause a segfault.
Without this patch, "git commit --no-message" and "git merge
--no-message" segfault reliably.
Signed-off-by: Jeff King <peff@peff.net>
---
builtin/commit.c | 2 +-
builtin/merge.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/builtin/commit.c b/builtin/commit.c
index d0f27f9..336faff 100644
--- a/builtin/commit.c
+++ b/builtin/commit.c
@@ -104,7 +104,7 @@
static int use_editor = 1, include_status = 1;
static int show_ignored_in_status;
static const char *only_include_assumed;
-static struct strbuf message;
+static struct strbuf message = STRBUF_INIT;
static int null_termination;
static enum {
diff --git a/builtin/merge.c b/builtin/merge.c
index 2457940..28a3a7e 100644
--- a/builtin/merge.c
+++ b/builtin/merge.c
@@ -50,7 +50,7 @@ struct strategy {
static int fast_forward_only, option_edit;
static int allow_trivial = 1, have_message;
static int overwrite_ignore = 1;
-static struct strbuf merge_msg;
+static struct strbuf merge_msg = STRBUF_INIT;
static struct commit_list *remoteheads;
static struct strategy **use_strategies;
static size_t use_strategies_nr, use_strategies_alloc;
--
1.7.8.rc3.14.gd2470
^ permalink raw reply related
* Re: header file at a top
From: Jeff King @ 2011-12-18 5:43 UTC (permalink / raw)
To: Thiago Farina; +Cc: Git Mailing List
In-Reply-To: <CACnwZYdSPPhLyu6Oi3k2aNzYqvmD=xDYWvCEd2ofyJSntqKdJg@mail.gmail.com>
On Sat, Dec 17, 2011 at 07:57:42PM -0200, Thiago Farina wrote:
> I don't understand why in git the .h file is not included as the first
> substantive line of the .c file.
>
> i.e:
>
> foo.c
> --------------------------------------------------------------------
> #include "foo.h"
>
> /* in alphabetical order */
> #include "bar.h"
> #include "tiz.h"
>
> Any particular reason we include the corresponding header file at some
> random position in the source file?
The first include in any git source file should be either
"git-compat-util.h", or something that includes it (usually "cache.h").
This introduces compatibility wrappers and definitions which may be used
by other headers.
After that, the next one could be "foo.h", and I do tend to like that
style (since it gives a check that foo.h has no surprising header
dependencies). But I think we simply don't bother caring about header
dependencies in git (i.e., we do have recursive includes in some places,
but we don't require them, and in practice the compiler will tell us if
a source file fails to include a depended-upon header).
-Peff
^ permalink raw reply
* Re: Escape character for .gitconfig
From: Erik Blake @ 2011-12-18 7:53 UTC (permalink / raw)
To: Jeff King; +Cc: git
In-Reply-To: <20111217105806.GB23935@sigill.intra.peff.net>
Thanks Jeff,
That did the trick for this git newb. For the record, I had tried \(,
/(, double- and single-quoting the entire path (note that git config
--global had removed the quotes that were originally around the string).
Did not think of "nested" quotes.
Now, however, I have a different problem in that notepad++ is somehow
signalling git that editing is complete before I even get a chance to
edit the file. I am trying the command
>git commit --amend
Notepad++ opens with the message, but git completes the commit before I
get a chance to make any changes. I suspect the issue is that git fires
up a new instance of notepad++ (which in my case is already running with
some other files open). notepad++ sees the new instance starting and
subsumes it under the pre-existing instance and then closes the new
instance. git sees the task close and assumes I am done editing.
Oh well. Cannot use notepad.exe because it does not handle <lf> line
endings. I guess I'll stick to the git gui.
e.
On 2011-12-17 11:58, Jeff King wrote:
> On Sat, Dec 17, 2011 at 11:10:37AM +0100, Erik Blake wrote:
>
>> I have an editor path that includes "(" and ")". No matter how I try
>> to escape this character, I get either variations on:
>>
>> C:/Program Files (x86)/Notepad++/notepad++.exe: -c: line 0: syntax
>> error near unexpected token `('
>> C:/Program Files (x86)/Notepad++/notepad++.exe: -c: line 0:
>> `C:/Program Files (x86)/Notepad++/notepad++.exe \$@\'
>> error: There was a problem with the editor 'C:/Program Files
>> (x86)/Notepad++/notepad++.exe'.
>> Please supply the message using either -m or -F option.
>>
>> or:
>>
>> fatal: bad config file line 5 in C:\Users\xxx/.gitconfig
>
> You didn't tell us what you actually tried, so I don't know where you
> went wrong.
>
> But you will need to quote the whole value for git to read from your
> gitconfig, and then quote any metacharacters in the value so that the
> shell doesn't interpret them. I think you want:
>
> [core]
> editor = "'C:/Program Files (x86)/Notepad++/notepad++.exe'"
>
> -Peff
^ permalink raw reply
* Re: Escape character for .gitconfig
From: Jeff King @ 2011-12-18 9:51 UTC (permalink / raw)
To: Erik Blake; +Cc: git
In-Reply-To: <4EED9BE5.8060600@icefield.yk.ca>
On Sun, Dec 18, 2011 at 08:53:09AM +0100, Erik Blake wrote:
> That did the trick for this git newb. For the record, I had tried \(,
> /(, double- and single-quoting the entire path (note that git config
> --global had removed the quotes that were originally around the
> string). Did not think of "nested" quotes.
Yeah, if you are using "git config" to enter it on the command line,
you'll have to put an extra layer of quoting around it to pass it
through the shell you're currently running. That's why I showed the
example as the actual config file text. :)
> Now, however, I have a different problem in that notepad++ is somehow
> signalling git that editing is complete before I even get a chance to
> edit the file. I am trying the command
> >git commit --amend
Yep. This is a general problem with editors that open files in an
existing session. The only signal git has of the user being done editing
is when when the editor process exits. For many editors, there is an
option or other trick for sticking around until the file is closed.
I know nothing about notepad++, but a quick google turned up the
"-multiInst" option, which would avoid attaching to the existing
instance. That might work for you.
-Peff
^ permalink raw reply
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox