* [PATCH v3 7/8] git-remote-testpy: don't do unbuffered text I/O
From: John Keeping @ 2013-01-20 13:15 UTC (permalink / raw)
To: Junio C Hamano; +Cc: git, Sverre Rabbelier
In-Reply-To: <cover.1358686905.git.john@keeping.me.uk>
Python 3 forbids unbuffered I/O in text mode. Change the reading of
stdin in git-remote-testpy so that we read the lines as bytes and then
decode them a line at a time.
This allows us to keep the I/O unbuffered in order to avoid
reintroducing the bug fixed by commit 7fb8e16 (git-remote-testgit: fix
race when spawning fast-import).
Signed-off-by: John Keeping <john@keeping.me.uk>
---
git-remote-testpy.py | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/git-remote-testpy.py b/git-remote-testpy.py
index 197b7be..5dbf1cc 100644
--- a/git-remote-testpy.py
+++ b/git-remote-testpy.py
@@ -154,7 +154,7 @@ def do_import(repo, args):
refs = [ref]
while True:
- line = sys.stdin.readline()
+ line = sys.stdin.readline().decode()
if line == '\n':
break
if not line.startswith('import '):
@@ -225,7 +225,7 @@ def read_one_line(repo):
line = sys.stdin.readline()
- cmdline = line
+ cmdline = line.decode()
if not cmdline:
warn("Unexpected EOF")
@@ -277,7 +277,11 @@ def main(args):
more = True
- sys.stdin = os.fdopen(sys.stdin.fileno(), 'r', 0)
+ # Use binary mode since Python 3 does not permit unbuffered I/O in text
+ # mode. Unbuffered I/O is required to avoid data that should be going
+ # to git-fast-import after an "export" command getting caught in our
+ # stdin buffer instead.
+ sys.stdin = os.fdopen(sys.stdin.fileno(), 'rb', 0)
while (more):
more = read_one_line(repo)
--
1.8.1.353.gc992d5a.dirty
^ permalink raw reply related
* [PATCH v3 6/8] git-remote-testpy: hash bytes explicitly
From: John Keeping @ 2013-01-20 13:15 UTC (permalink / raw)
To: Junio C Hamano; +Cc: git, Sverre Rabbelier
In-Reply-To: <cover.1358686905.git.john@keeping.me.uk>
Under Python 3 'hasher.update(...)' must take a byte string and not a
unicode string. Explicitly encode the argument to this method to hex
bytes so that we don't need to worry about failures to encode that might
occur if we chose a textual encoding.
This changes the directory used by git-remote-testpy for its git mirror
of the remote repository, but this tool should not have any serious
users as it is used primarily to test the Python remote helper
framework.
The use of encode() moves the required Python version forward to 2.0.
Signed-off-by: John Keeping <john@keeping.me.uk>
---
git-remote-testpy.py | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/git-remote-testpy.py b/git-remote-testpy.py
index d94a66a..197b7be 100644
--- a/git-remote-testpy.py
+++ b/git-remote-testpy.py
@@ -31,9 +31,9 @@ from git_remote_helpers.git.exporter import GitExporter
from git_remote_helpers.git.importer import GitImporter
from git_remote_helpers.git.non_local import NonLocalGit
-if sys.hexversion < 0x01050200:
- # os.makedirs() is the limiter
- sys.stderr.write("git-remote-testgit: requires Python 1.5.2 or later.\n")
+if sys.hexversion < 0x02000000:
+ # string.encode() is the limiter
+ sys.stderr.write("git-remote-testgit: requires Python 2.0 or later.\n")
sys.exit(1)
def get_repo(alias, url):
@@ -45,7 +45,7 @@ def get_repo(alias, url):
repo.get_head()
hasher = _digest()
- hasher.update(repo.path)
+ hasher.update(repo.path.encode('hex'))
repo.hash = hasher.hexdigest()
repo.get_base_path = lambda base: os.path.join(
--
1.8.1.353.gc992d5a.dirty
^ permalink raw reply related
* [PATCH v3 5/8] svn-fe: allow svnrdump_sim.py to run with Python 3
From: John Keeping @ 2013-01-20 13:15 UTC (permalink / raw)
To: Junio C Hamano; +Cc: git, Sverre Rabbelier
In-Reply-To: <cover.1358686905.git.john@keeping.me.uk>
The changes to allow this script to run with Python 3 are minimal and do
not affect its functionality on the versions of Python 2 that are
already supported (2.4 onwards).
Signed-off-by: John Keeping <john@keeping.me.uk>
---
contrib/svn-fe/svnrdump_sim.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/contrib/svn-fe/svnrdump_sim.py b/contrib/svn-fe/svnrdump_sim.py
index 17cf6f9..4e78a1c 100755
--- a/contrib/svn-fe/svnrdump_sim.py
+++ b/contrib/svn-fe/svnrdump_sim.py
@@ -14,7 +14,7 @@ if sys.hexversion < 0x02040000:
def getrevlimit():
var = 'SVNRMAX'
- if os.environ.has_key(var):
+ if var in os.environ:
return os.environ[var]
return None
@@ -44,7 +44,7 @@ def writedump(url, lower, upper):
if __name__ == "__main__":
if not (len(sys.argv) in (3, 4, 5)):
- print "usage: %s dump URL -rLOWER:UPPER"
+ print("usage: %s dump URL -rLOWER:UPPER")
sys.exit(1)
if not sys.argv[1] == 'dump': raise NotImplementedError('only "dump" is suppported.')
url = sys.argv[2]
--
1.8.1.353.gc992d5a.dirty
^ permalink raw reply related
* [PATCH v3 4/8] git_remote_helpers: Use 2to3 if building with Python 3
From: John Keeping @ 2013-01-20 13:15 UTC (permalink / raw)
To: Junio C Hamano; +Cc: git, Sverre Rabbelier
In-Reply-To: <cover.1358686905.git.john@keeping.me.uk>
Using the approach detailed in the Python documentation[1], run 2to3 on
the code as part of the build if building with Python 3.
The code itself requires no changes to convert cleanly.
[1] http://docs.python.org/3.3/howto/pyporting.html#during-installation
Signed-off-by: John Keeping <john@keeping.me.uk>
Acked-by: Sverre Rabbelier <srabbelier@gmail.com>
---
On Fri, 18 Jan 2013 23:52:16 -0800, Sverre Rabbelier wrote:
> Assuming you tried this out on both 2.x and 3.x:
>
> Acked-by: Sverre Rabbelier <srabbelier@gmail.com>
I ran the test suite with Python 2.7.3 and 3.2.3.
git_remote_helpers/setup.py | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/git_remote_helpers/setup.py b/git_remote_helpers/setup.py
index 4d434b6..6de41de 100644
--- a/git_remote_helpers/setup.py
+++ b/git_remote_helpers/setup.py
@@ -4,6 +4,15 @@
from distutils.core import setup
+# If building under Python3 we need to run 2to3 on the code, do this by
+# trying to import distutils' 2to3 builder, which is only available in
+# Python3.
+try:
+ from distutils.command.build_py import build_py_2to3 as build_py
+except ImportError:
+ # 2.x
+ from distutils.command.build_py import build_py
+
setup(
name = 'git_remote_helpers',
version = '0.1.0',
@@ -14,4 +23,5 @@ setup(
url = 'http://www.git-scm.com/',
package_dir = {'git_remote_helpers': ''},
packages = ['git_remote_helpers', 'git_remote_helpers.git'],
+ cmdclass = {'build_py': build_py},
)
--
1.8.1.353.gc992d5a.dirty
^ permalink raw reply related
* [PATCH v3 3/8] git_remote_helpers: Force rebuild if python version changes
From: John Keeping @ 2013-01-20 13:15 UTC (permalink / raw)
To: Junio C Hamano; +Cc: git, Sverre Rabbelier
In-Reply-To: <cover.1358686905.git.john@keeping.me.uk>
When different version of python are used to build via distutils, the
behaviour can change. Detect changes in version and pass --force in
this case.
Signed-off-by: John Keeping <john@keeping.me.uk>
---
git_remote_helpers/.gitignore | 1 +
git_remote_helpers/Makefile | 8 +++++++-
2 files changed, 8 insertions(+), 1 deletion(-)
diff --git a/git_remote_helpers/.gitignore b/git_remote_helpers/.gitignore
index 2247d5f..06c664f 100644
--- a/git_remote_helpers/.gitignore
+++ b/git_remote_helpers/.gitignore
@@ -1,2 +1,3 @@
+/GIT-PYTHON_VERSION
/build
/dist
diff --git a/git_remote_helpers/Makefile b/git_remote_helpers/Makefile
index f65f064..91f458f 100644
--- a/git_remote_helpers/Makefile
+++ b/git_remote_helpers/Makefile
@@ -25,8 +25,14 @@ PYLIBDIR=$(shell $(PYTHON_PATH) -c \
"import sys; \
print('lib/python%i.%i/site-packages' % sys.version_info[:2])")
+py_version=$(shell $(PYTHON_PATH) -c \
+ 'import sys; print("%i.%i" % sys.version_info[:2])')
+
all: $(pysetupfile)
- $(QUIET)$(PYTHON_PATH) $(pysetupfile) $(QUIETSETUP) build
+ $(QUIET)test "$$(cat GIT-PYTHON_VERSION 2>/dev/null)" = "$(py_version)" || \
+ flags=--force; \
+ $(PYTHON_PATH) $(pysetupfile) $(QUIETSETUP) build $$flags
+ $(QUIET)echo "$(py_version)" >GIT-PYTHON_VERSION
install: $(pysetupfile)
$(PYTHON_PATH) $(pysetupfile) install --prefix $(DESTDIR_SQ)$(prefix)
--
1.8.1.353.gc992d5a.dirty
^ permalink raw reply related
* [PATCH v3 2/8] git_remote_helpers: fix input when running under Python 3
From: John Keeping @ 2013-01-20 13:15 UTC (permalink / raw)
To: Junio C Hamano; +Cc: git, Sverre Rabbelier
In-Reply-To: <cover.1358686905.git.john@keeping.me.uk>
Although 2to3 will fix most issues in Python 2 code to make it run under
Python 3, it does not handle the new strict separation between byte
strings and unicode strings. There is one instance in
git_remote_helpers where we are caught by this, which is when reading
refs from "git for-each-ref".
Fix this by operating on the returned string as a byte string rather
than a unicode string. As this method is currently only used internally
by the class this does not affect code anywhere else.
Note that we cannot use byte strings in the source as the 'b' prefix is
not supported before Python 2.7 so in order to maintain compatibility
with the maximum range of Python versions we use an explicit call to
encode().
Signed-off-by: John Keeping <john@keeping.me.uk>
---
git_remote_helpers/git/importer.py | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/git_remote_helpers/git/importer.py b/git_remote_helpers/git/importer.py
index e28cc8f..d3f90e1 100644
--- a/git_remote_helpers/git/importer.py
+++ b/git_remote_helpers/git/importer.py
@@ -18,13 +18,16 @@ class GitImporter(object):
def get_refs(self, gitdir):
"""Returns a dictionary with refs.
+
+ Note that the keys in the returned dictionary are byte strings as
+ read from git.
"""
args = ["git", "--git-dir=" + gitdir, "for-each-ref", "refs/heads"]
- lines = check_output(args).strip().split('\n')
+ lines = check_output(args).strip().split('\n'.encode('ascii'))
refs = {}
for line in lines:
- value, name = line.split(' ')
- name = name.strip('commit\t')
+ value, name = line.split(' '.encode('ascii'))
+ name = name.strip('commit\t'.encode('ascii'))
refs[name] = value
return refs
--
1.8.1.353.gc992d5a.dirty
^ permalink raw reply related
* [PATCH v3 1/8] git_remote_helpers: Allow building with Python 3
From: John Keeping @ 2013-01-20 13:15 UTC (permalink / raw)
To: Junio C Hamano; +Cc: git, Sverre Rabbelier
In-Reply-To: <cover.1358686905.git.john@keeping.me.uk>
Change inline Python to call "print" as a function not a statement.
This is harmless because Python 2 will see the parentheses as redundant
grouping but they are necessary to run this code with Python 3.
Signed-off-by: John Keeping <john@keeping.me.uk>
---
git_remote_helpers/Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/git_remote_helpers/Makefile b/git_remote_helpers/Makefile
index 74b05dc..f65f064 100644
--- a/git_remote_helpers/Makefile
+++ b/git_remote_helpers/Makefile
@@ -23,7 +23,7 @@ endif
PYLIBDIR=$(shell $(PYTHON_PATH) -c \
"import sys; \
- print 'lib/python%i.%i/site-packages' % sys.version_info[:2]")
+ print('lib/python%i.%i/site-packages' % sys.version_info[:2])")
all: $(pysetupfile)
$(QUIET)$(PYTHON_PATH) $(pysetupfile) $(QUIETSETUP) build
--
1.8.1.353.gc992d5a.dirty
^ permalink raw reply related
* [PATCH v3 0/8] Python 3 support for git_remote_helpers
From: John Keeping @ 2013-01-20 13:15 UTC (permalink / raw)
To: Junio C Hamano; +Cc: git, Sverre Rabbelier
This series does enough so that everything except git-p4 runs under
Python 3.
As discussed with Pete, it may not make sense to change git-p4 to
support Python 3 until Perforce's Python output mode is changed. So
does it make sense to merge this now and say "use Python 2 if you want
git-p4"?
Changes since v2:
- Change reference URL in commit message of patch 4
(git_remote_helpers: Use 2to3 if building with Python 3) to point at
Python documentation instead of the Python wiki.
- Add a comment in patch 7 (git-remote-testpy: don't do unbuffered text
I/O), as suggested by Sverre.
John Keeping (8):
git_remote_helpers: Allow building with Python 3
git_remote_helpers: fix input when running under Python 3
git_remote_helpers: Force rebuild if python version changes
git_remote_helpers: Use 2to3 if building with Python 3
svn-fe: allow svnrdump_sim.py to run with Python 3
git-remote-testpy: hash bytes explicitly
git-remote-testpy: don't do unbuffered text I/O
git-remote-testpy: call print as a function
contrib/svn-fe/svnrdump_sim.py | 4 ++--
git-remote-testpy.py | 46 +++++++++++++++++++++-----------------
git_remote_helpers/.gitignore | 1 +
git_remote_helpers/Makefile | 10 +++++++--
git_remote_helpers/git/importer.py | 9 +++++---
git_remote_helpers/setup.py | 10 +++++++++
6 files changed, 52 insertions(+), 28 deletions(-)
--
1.8.1.353.gc992d5a.dirty
^ permalink raw reply
* Re: [PATCH 0/3] fixup remaining cvsimport tests
From: John Keeping @ 2013-01-20 12:58 UTC (permalink / raw)
To: Chris Rorvick; +Cc: git
In-Reply-To: <1357878439-27500-1-git-send-email-chris@rorvick.com>
Hi Chris,
On Thu, Jan 10, 2013 at 10:27:16PM -0600, Chris Rorvick wrote:
> These patchs apply on top of of Eric Raymond's cvsimport patch. 7 of 15
> tests in t9600 fail, one of which is fixed w/ a cvsps patch I've sent
> to Eric (fixes revision map.)
Did you post the fix for the revision map publicly anywhere? I'm hoping
to publish some fixes to command handling but would like to have the
tests passing first - and if you've already done the work...
Sorry if you have and I've missed it,
John
^ permalink raw reply
* Re: Aw: [PATCH 0/2] GIT, Git, git
From: Thomas Rast @ 2013-01-20 11:56 UTC (permalink / raw)
To: Thomas Ackermann; +Cc: git
In-Reply-To: <304952858.714413.1358671123163.JavaMail.ngmail@webmail06.arcor-online.net>
Thomas Ackermann <th.acker@arcor.de> writes:
>> Git changed its 'official' system name from 'GIT' to 'Git' in v1.6.5.3
>> (as can be seen in the corresponding release note where 'GIT' was
>> changed to 'Git' in the header line).
>>
>> Alas the documention uses 'GIT', 'Git' or even 'git' to refer to the
>> Git system. So change every occurrence of 'GIT" and 'git' to 'Git'
>> whenever Git as a system is referred to (but don't do this change
>> in the release notes because they constitute a history orthogonal
>> to the history versioned by Git).
>>
>> [PATCH 1/2] Change old system name 'GIT' to 'Git'
>> [PATCH 2/2] Change 'git' to 'Git' whenever the whole system is referred to
>>
>
> My second patch somehow got lost in the mailing system (I suspect
> due to its size of >300kB). I will wait for some more comments
> and then do a reroll thereby splitting the second patch in smaller
> parts ...
For such big patches it also helps if you push them somewhere public,
and post the URL and branch name, so that interested parties can still
have a look.
But yes, vger.kernel.org silently discards all mail above 100KB, see
http://vger.kernel.org/majordomo-info.html
in the last section.
--
Thomas Rast
trast@{inf,student}.ethz.ch
^ permalink raw reply
* Re: [RFC] git rm -u
From: Matthieu Moy @ 2013-01-20 11:32 UTC (permalink / raw)
To: Jonathan Nieder; +Cc: Eric James Michael Ritz, git, Tomas Carnecky
In-Reply-To: <20130119214921.GE4009@elie.Belkin>
Jonathan Nieder <jrnieder@gmail.com> writes:
> Eric James Michael Ritz wrote:
>
>> When I came to my senses and realized that does not work I began to
>> wonder if `git rm -u` should exist. If any deleted, tracked files are
>> not part of the index to commit then `git rm -u` would add that change
>> to the index.
>
> I like it. If you have time to write such a patch, I'll be happy to
> read it.
I can leave with "git add -u", but a "git rm -u" that would only look at
deletions, and not stage existing files changes would make sense.
One thing to be careful about is what to do when the command is called
from a subdirectory. In general, Git commands use this convention:
* git foo => tree-wide command
* git foo . => restrict to current directory
"git add -u" is one of the only exceptions (with "git grep"). I consider
this as a bug, and think this should be changed. This has been discussed
several times here, but no one took the time to actually do the change
(changing is easy, but having a correct migration plan wrt backward
compatibility is not).
Implementing "git rm -u" as a tree-wide command would create a
discrepancy with "git add -u". Implementing it as a "current directory"
command would make the migration harder if we eventually try to change
"git add -u". Perhaps "git rm -u" should be forbidden from a
subdirectory (with an error message pointing to "git rm -u :/" and "git
rm -u ."), waiting for a possible "git add -u" change.
--
Matthieu Moy
http://www-verimag.imag.fr/~moy/
^ permalink raw reply
* [PATCH] mergetools: Add tortoisegitmerge helper
From: Sven Strickroth @ 2013-01-20 11:27 UTC (permalink / raw)
To: git; +Cc: Junio C Hamano, Sebastian Schuberth, davvid, Jeff King
- The TortoiseGit team renamed TortoiseMerge.exe to TortoiseGitMerge.exe
(starting with 1.8.0) in order to make clear that this one has special
support for git and prevent confusion with the TortoiseSVN TortoiseMerge
version.
- The tortoisemerge mergetool does not work with filenames which have
a space in it. Fixing this required changes in git and also in
TortoiseGitMerge; see https://github.com/msysgit/msysgit/issues/57.
The new tortoisegitmerge helper was added so that people can still use
TortoiseMerge from TortoiseSVN (and older TortoiseGit versions).
Signed-off-by: Sven Strickroth <email@cs-ware.de>
Reported-by: Sebastian Schuberth <sschuberth@gmail.com>
---
Documentation/diff-config.txt | 4 ++--
Documentation/git-mergetool.txt | 4 ++--
Documentation/merge-config.txt | 6 +++---
contrib/completion/git-completion.bash | 2 +-
git-mergetool--lib.sh | 2 +-
mergetools/tortoisegitmerge | 17 +++++++++++++++++
6 files changed, 26 insertions(+), 9 deletions(-)
create mode 100644 mergetools/tortoisegitmerge
diff --git a/Documentation/diff-config.txt b/Documentation/diff-config.txt
index 4314ad0..13cbe5b 100644
--- a/Documentation/diff-config.txt
+++ b/Documentation/diff-config.txt
@@ -151,7 +151,7 @@ diff.<driver>.cachetextconv::
diff.tool::
The diff tool to be used by linkgit:git-difftool[1]. This
option overrides `merge.tool`, and has the same valid built-in
- values as `merge.tool` minus "tortoisemerge" and plus
- "kompare". Any other value is treated as a custom diff tool,
+ values as `merge.tool` minus "tortoisemerge"/"tortoisegitmerge" and
+ plus "kompare". Any other value is treated as a custom diff tool,
and there must be a corresponding `difftool.<tool>.cmd`
option.
diff --git a/Documentation/git-mergetool.txt b/Documentation/git-mergetool.txt
index 6b563c5..a80cccd 100644
--- a/Documentation/git-mergetool.txt
+++ b/Documentation/git-mergetool.txt
@@ -28,8 +28,8 @@ OPTIONS
--tool=<tool>::
Use the merge resolution program specified by <tool>.
Valid values include emerge, gvimdiff, kdiff3,
- meld, vimdiff, and tortoisemerge. Run `git mergetool --tool-help`
- for the list of valid <tool> settings.
+ meld, vimdiff, tortoisegitmerge, and tortoisemerge. Run
+ `git mergetool --tool-help` for the list of valid <tool> settings.
+
If a merge resolution program is not specified, 'git mergetool'
will use the configuration variable `merge.tool`. If the
diff --git a/Documentation/merge-config.txt b/Documentation/merge-config.txt
index 9bb4956..a047646 100644
--- a/Documentation/merge-config.txt
+++ b/Documentation/merge-config.txt
@@ -55,9 +55,9 @@ merge.tool::
Controls which merge resolution program is used by
linkgit:git-mergetool[1]. Valid built-in values are: "araxis",
"bc3", "diffuse", "ecmerge", "emerge", "gvimdiff", "kdiff3", "meld",
- "opendiff", "p4merge", "tkdiff", "tortoisemerge", "vimdiff"
- and "xxdiff". Any other value is treated is custom merge tool
- and there must be a corresponding mergetool.<tool>.cmd option.
+ "opendiff", "p4merge", "tkdiff", "tortoisegitmerge", "tortoisemerge",
+ "vimdiff" and "xxdiff". Any other value is treated is custom merge
+ tool and there must be a corresponding mergetool.<tool>.cmd option.
merge.verbosity::
Controls the amount of output shown by the recursive merge
diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash
index 90f5f05..5332a33 100644
--- a/contrib/completion/git-completion.bash
+++ b/contrib/completion/git-completion.bash
@@ -1345,7 +1345,7 @@ _git_mergetool ()
{
case "$cur" in
--tool=*)
- __gitcomp "$__git_mergetools_common tortoisemerge" "" "${cur##--tool=}"
+ __gitcomp "$__git_mergetools_common tortoisegitmerge tortoisemerge" "" "${cur##--tool=}"
return
;;
--*)
diff --git a/git-mergetool--lib.sh b/git-mergetool--lib.sh
index f013a03..47183ef 100644
--- a/git-mergetool--lib.sh
+++ b/git-mergetool--lib.sh
@@ -150,7 +150,7 @@ run_merge_cmd () {
list_merge_tool_candidates () {
if merge_mode
then
- tools="tortoisemerge"
+ tools="tortoisegitmerge tortoisemerge"
else
tools="kompare"
fi
diff --git a/mergetools/tortoisegitmerge b/mergetools/tortoisegitmerge
new file mode 100644
index 0000000..5b802a7
--- /dev/null
+++ b/mergetools/tortoisegitmerge
@@ -0,0 +1,17 @@
+can_diff () {
+ return 1
+}
+
+merge_cmd () {
+ if $base_present
+ then
+ touch "$BACKUP"
+ "$merge_tool_path" \
+ -base "$BASE" -mine "$LOCAL" \
+ -theirs "$REMOTE" -merged "$MERGED"
+ check_unchanged
+ else
+ echo "TortoiseGitMerge cannot be used without a base" 1>&2
+ return 1
+ fi
+}
--
Best regards,
Sven Strickroth
PGP key id F5A9D4C4 @ any key-server
^ permalink raw reply related
* Re: Aw: Re: [PATCH 1/2] Change old system name 'GIT' to 'Git'
From: Matthieu Moy @ 2013-01-20 11:24 UTC (permalink / raw)
To: Thomas Ackermann; +Cc: davvid, git
In-Reply-To: <310504838.1116553.1358607676116.JavaMail.ngmail@webmail10.arcor-online.net>
Thomas Ackermann <th.acker@arcor.de> writes:
> The whole point of my patch is to use 'Git' consistently when
> we are talking about the system and not the individual command.
I like the idea. "git" should obviously remain lower-case when talking
about the command, but deserves a capital when talking about the
software independantly of whether it's called from command-line. Just
like I type "firefox" in a shell to launch a program called "Firefox"
(or even "Mozilla Firefox").
--
Matthieu Moy
http://www-verimag.imag.fr/~moy/
^ permalink raw reply
* Re: How to setup bash completion for alias of git command
From: Jonathan Nieder @ 2013-01-20 11:14 UTC (permalink / raw)
To: Ping Yin
Cc: git mailing list, Felipe Contreras, Manlio Perillo, Marc Khouzam,
SZEDER Gábor
In-Reply-To: <CACSwcnQu8Rx83mcGYR6NGzEhoreNR6DfiK876LF7pa9PGm30JA@mail.gmail.com>
Hi Ping,
Ping Yin wrote:
> Following setup works for me in ubuntu (10.04,11.04) for a long time
>
> alias gtlg='git log'
> complete -o default -o nospace -F _git_log gtlg
>
> However, in debian (testing, wheezy), it doesn't work
>
> $ gtlg or<TAB>
> gtlg or-bash: [: 1: unary operator expected
> -bash: [: 1: unary operator expected
Yes, I can reproduce this. "git bisect" tells me it was introduced
by v1.7.6-rc0~65^2~4 (completion: remove unnecessary
_get_comp_words_by_ref() invocations, 2011-04-28). Since then, Felipe
has done work to make reusing subcommand completion easy again, so you
can do
__git_complete gtlg _git_log
One complication: on some systems, including Ubuntu 13.04, git's bash
completion script is installed to
/usr/share/bash-completion/completions/git
and sourced on the fly when completing commands starting with "git"
instead of right away from /etc/bash_completion. On these systems,
the "__git_complete" function would not be usable right away from
your .bashrc file. I think we should fix this, for example by moving
the function to a separate
$(git --exec-path)/git-bashrc-functions
library.
Thanks for reporting,
Jonathan
^ permalink raw reply
* [PATCH v2] INSTALL: git-p4 doesn't support Python 3
From: John Keeping @ 2013-01-20 11:06 UTC (permalink / raw)
To: Junio C Hamano; +Cc: git, Pete Wyckoff
git-p4 supports Python 2.6 and later versions of Python 2. Since Python
2.8 will never exist [1], it is most concise to just list the supported
versions.
[1] http://www.python.org/dev/peps/pep-0404/
Signed-off-by: John Keeping <john@keeping.me.uk>
Acked-by: Pete Wyckoff <pw@padd.com>
---
Since v1:
- Fixed a typo in the commit message.
INSTALL | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/INSTALL b/INSTALL
index 28f34bd..c456d1c 100644
--- a/INSTALL
+++ b/INSTALL
@@ -131,7 +131,7 @@ Issues of note:
use English. Under autoconf the configure script will do this
automatically if it can't find libintl on the system.
- - Python version 2.6 or later is needed to use the git-p4
+ - Python version 2.6 or 2.7 is needed to use the git-p4
interface to Perforce.
- Some platform specific issues are dealt with Makefile rules,
--
1.8.1.353.gc992d5a.dirty
^ permalink raw reply related
* Re: Version 1.8.1 does not compile on Cygwin 1.7.14
From: Jonathan Nieder @ 2013-01-20 11:06 UTC (permalink / raw)
To: Torsten Bögershausen
Cc: Ramsay Jones, Mark Levedahl, Alex Riesen, Junio C Hamano,
Jason Pyeron, git, Stephen & Linda Smith, Eric Blake, msysGit
In-Reply-To: <50FBCB95.6020201@web.de>
Torsten Bögershausen wrote:
> I wonder, if if we can go one step further:
>
> Replace
> #ifdef WIN32 /* Both MinGW and MSVC */
[...]
> with
> #if defined(_MSC_VER)
I thought Git for Windows was built using mingw, which doesn't define
_MSC_VER?
Puzzled,
Jonathan
--
*** Please reply-to-all at all times ***
*** (do not pretend to know who is subscribed and who is not) ***
*** Please avoid top-posting. ***
The msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.
You received this message because you are subscribed to the Google
Groups "msysGit" group.
To post to this group, send email to msysgit@googlegroups.com
To unsubscribe from this group, send email to
msysgit+unsubscribe@googlegroups.com
For more options, and view previous threads, visit this group at
http://groups.google.com/group/msysgit?hl=en_US?hl=en
^ permalink raw reply
* Re: [PATCH] INSTALL: git-p4 doesn't support Python 3
From: John Keeping @ 2013-01-20 10:59 UTC (permalink / raw)
To: David Aguilar; +Cc: git, Pete Wyckoff
In-Reply-To: <CAJDDKr6VD0vnL8x4bgJWLQZNQKR4vQrvJaL5_tdF_9znAW2XAA@mail.gmail.com>
On Sat, Jan 19, 2013 at 05:31:35PM -0800, David Aguilar wrote:
> On Sat, Jan 19, 2013 at 4:01 AM, John Keeping <john@keeping.me.uk> wrote:
>> Since Pyhton
>> 2.8 will never exist [1]
>
> Tiny typo: Python misspelled as Pyhton
Thanks. v2 on its way.
John
^ permalink raw reply
* Re: Version 1.8.1 does not compile on Cygwin 1.7.14
From: Torsten Bögershausen @ 2013-01-20 10:48 UTC (permalink / raw)
To: Jonathan Nieder
Cc: Ramsay Jones, Mark Levedahl, Alex Riesen, Junio C Hamano,
Jason Pyeron, git, Torsten Bögershausen,
Stephen & Linda Smith, Eric Blake, msysGit
In-Reply-To: <20130120101007.GD16339@elie.Belkin>
On 20.01.13 11:10, Jonathan Nieder wrote:
> Ramsay Jones wrote:
>
>> --- a/git-compat-util.h
>> +++ b/git-compat-util.h
>> @@ -85,12 +85,6 @@
>> #define _NETBSD_SOURCE 1
>> #define _SGI_SOURCE 1
>>
>> -#ifdef WIN32 /* Both MinGW and MSVC */
>> -#define WIN32_LEAN_AND_MEAN /* stops windows.h including winsock.h */
>> -#include <winsock2.h>
>> -#include <windows.h>
>> -#endif
>
> So, do I understand correctly that the above conditional should be
> something like
>
> #if defined(WIN32) && !defined(__CYGWIN__)
>
> to allow dropping the CYGWIN_V15_WIN32API setting?
>
> "defined(WIN32)" is used throughout git to mean "win32 and not
> cygwin", so if I understand correctly we would either need to do
>
> #if defined(WIN32) && defined(__CYGWIN__)
> # undef WIN32
> #endif
>
> or define a new GIT_WIN32 (name is just a placeholder) macro to use
> consistently in its stead.
>
> Thanks for investigating.
> Jonathan
I wonder, if if we can go one step further:
Replace
#ifdef WIN32 /* Both MinGW and MSVC */
#define WIN32_LEAN_AND_MEAN /* stops windows.h including winsock.h */
#include <winsock2.h>
#include <windows.h>
#endif
with
#if defined(_MSC_VER)
#define WIN32_LEAN_AND_MEAN /* stops windows.h including winsock.h */
#include <winsock2.h>
#include <windows.h>
#endif
Any thougths from msysGit ?
/Torsten
^ permalink raw reply
* Re: Version 1.8.1 does not compile on Cygwin 1.7.14
From: Jonathan Nieder @ 2013-01-20 10:10 UTC (permalink / raw)
To: Ramsay Jones
Cc: Mark Levedahl, Alex Riesen, Junio C Hamano, Jason Pyeron, git,
Torsten Bögershausen, Stephen & Linda Smith, Eric Blake
In-Reply-To: <50F5A435.5090408@ramsay1.demon.co.uk>
Ramsay Jones wrote:
> --- a/git-compat-util.h
> +++ b/git-compat-util.h
> @@ -85,12 +85,6 @@
> #define _NETBSD_SOURCE 1
> #define _SGI_SOURCE 1
>
> -#ifdef WIN32 /* Both MinGW and MSVC */
> -#define WIN32_LEAN_AND_MEAN /* stops windows.h including winsock.h */
> -#include <winsock2.h>
> -#include <windows.h>
> -#endif
So, do I understand correctly that the above conditional should be
something like
#if defined(WIN32) && !defined(__CYGWIN__)
to allow dropping the CYGWIN_V15_WIN32API setting?
"defined(WIN32)" is used throughout git to mean "win32 and not
cygwin", so if I understand correctly we would either need to do
#if defined(WIN32) && defined(__CYGWIN__)
# undef WIN32
#endif
or define a new GIT_WIN32 (name is just a placeholder) macro to use
consistently in its stead.
Thanks for investigating.
Jonathan
^ permalink raw reply
* Aw: [PATCH 0/2] GIT, Git, git
From: Thomas Ackermann @ 2013-01-20 8:38 UTC (permalink / raw)
To: th.acker, git
>
> Git changed its 'official' system name from 'GIT' to 'Git' in v1.6.5.3
> (as can be seen in the corresponding release note where 'GIT' was
> changed to 'Git' in the header line).
>
> Alas the documention uses 'GIT', 'Git' or even 'git' to refer to the
> Git system. So change every occurrence of 'GIT" and 'git' to 'Git'
> whenever Git as a system is referred to (but don't do this change
> in the release notes because they constitute a history orthogonal
> to the history versioned by Git).
>
> [PATCH 1/2] Change old system name 'GIT' to 'Git'
> [PATCH 2/2] Change 'git' to 'Git' whenever the whole system is referred to
>
My second patch somehow got lost in the mailing system (I suspect
due to its size of >300kB). I will wait for some more comments
and then do a reroll thereby splitting the second patch in smaller
parts ...
---
Thomas
^ permalink raw reply
* Re: [PATCH] INSTALL: git-p4 doesn't support Python 3
From: David Aguilar @ 2013-01-20 1:31 UTC (permalink / raw)
To: John Keeping; +Cc: git, Pete Wyckoff
In-Reply-To: <20130119120158.GH31172@serenity.lan>
On Sat, Jan 19, 2013 at 4:01 AM, John Keeping <john@keeping.me.uk> wrote:
> Since Pyhton
> 2.8 will never exist [1]
Tiny typo: Python misspelled as Pyhton
--
David
^ permalink raw reply
* Re: Re: [PATCH 1/2] Change old system name 'GIT' to 'Git'
From: David Aguilar @ 2013-01-20 0:47 UTC (permalink / raw)
To: Thomas Ackermann; +Cc: git
In-Reply-To: <310504838.1116553.1358607676116.JavaMail.ngmail@webmail10.arcor-online.net>
On Sat, Jan 19, 2013 at 7:01 AM, Thomas Ackermann <th.acker@arcor.de> wrote:
>
>>
>> What about GITweb?
>>
> You are right; I missed that because I grepped only for 'GIT' as a whole word.
> 'gitweb' and 'GITweb' should be changed to 'Gitweb'.
>
>>
>> IMO some of these look nicer when everything is lowercase.
>> e.g. "standard git committer ident format".
>>
> IMHO what seems nicer here is the spelling we are all accustomed to.
> The whole point of my patch is to use 'Git' consistently when
> we are talking about the system and not the individual command.
>
>>
>> $ git grep 'git repositor' | wc -l
>> 226
>>
>> These changes touch, for example, git-clone.txt to make it
>> say: "Make a 'bare' Git repository". Why not lowercase?
>>
> When you also apply my second patch you only get 17 occurences of "git repository"
> which I missed to change to 'Git repository' ...
>
> Thanks for looking into this!
Thank *you* for tackling these last 226 and listening to my silly opinions.
The end result will be much nicer all around.
--
David
^ permalink raw reply
* Re: [PATCH 0/2] GIT, Git, git
From: Jonathan Nieder @ 2013-01-19 22:31 UTC (permalink / raw)
To: Thomas Ackermann; +Cc: git
In-Reply-To: <732444561.1327663.1358589465467.JavaMail.ngmail@webmail24.arcor-online.net>
Hi Thomas,
Thomas Ackermann wrote:
> Git changed its 'official' system name from 'GIT' to 'Git' in v1.6.5.3
> (as can be seen in the corresponding release note where 'GIT' was
> changed to 'Git' in the header line).
>
> Alas the documention uses 'GIT', 'Git' or even 'git' to refer to the
> Git system. So change every occurrence of 'GIT" and 'git' to 'Git'
> whenever Git as a system is referred to (but don't do this change
> in the release notes because they constitute a history orthogonal
> to the history versioned by Git).
I don't have any opinion about the subject at hand, except that making
a consistent convention and documenting it somewhere to avoid future
churn sounds like a fine idea.
Instead, I'm writing for a procedural nitpick ;-): please move the
above rationale to one of the commit messages, so it gets recorded
somewhere that future readers can easily find it.
Hope that helps,
Jonathan
^ permalink raw reply
* Re: [RFC] git rm -u
From: Eric James Michael Ritz @ 2013-01-19 22:01 UTC (permalink / raw)
To: Jonathan Nieder; +Cc: git, Tomas Carnecky
In-Reply-To: <20130119214921.GE4009@elie.Belkin>
On 01/19/2013 04:49 PM, Jonathan Nieder wrote:
> Eric James Michael Ritz wrote:
>
>> When I came to my senses and realized that does not work I began to
>> wonder if `git rm -u` should exist. If any deleted, tracked files
>> are not part of the index to commit then `git rm -u` would add that
>> change to the index.
>
> I like it. If you have time to write such a patch, I'll be happy to
> read it.
Thank you for the offer Jonathan. I must go ahead and apologize for
my rusty ability with C; I haven’t needed to use the language in
years. But I will familiarize myself with the Git source and try to
put a patch (or series of patches) together over the next week or two.
--
ejmr
南無妙法蓮華經
^ permalink raw reply
* Re: [RFC] git rm -u
From: Eric James Michael Ritz @ 2013-01-19 21:56 UTC (permalink / raw)
To: Antoine Pelisse; +Cc: Tomas Carnecky, git
In-Reply-To: <CALWbr2zhxkZEGWc5iN-8MivzV7viEdfwV_Q-iH0xSUWkwnSmyQ@mail.gmail.com>
On 01/19/2013 04:49 PM, Antoine Pelisse wrote:
> I think `git add -u` would be closer. It would stage removal of
> files, but would not stage untracked files. It would stage other
> type of changes though.
On Sat, Jan 19, 2013 at 10:47 PM, Tomas Carnecky
> Does `git add -A` do what you want?
Thank you Tomas and Antoine. Both of these commands do what I want:
stage deleted files on the index. But does the idea of a `git rm -u`
still sound useful since these commands also stage changes besides
deleted files?
--
ejmr
南無妙法蓮華經
^ 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