* Re: [PATCH] mingw: disable Python
From: Erik Faye-Lund @ 2010-01-08 10:49 UTC (permalink / raw)
To: Johannes Schindelin; +Cc: Johannes Sixt, msysgit, git
In-Reply-To: <alpine.DEB.1.00.1001081135180.4272@intel-tinevez-2-302>
On Fri, Jan 8, 2010 at 9:07 AM, Johannes Sixt <j.sixt@viscovery.net> wrote:
> Wouldn't it be superior to set
>
> PYTHON_PATH =
Yes, I think it would. I've tested it (I've got Python 2.6 installed
in c:\Python26\, so with your fix I can re-enable it by setting
"PYTHON_PATH=/c/Python26/python.exe" in config.mak.
On Fri, Jan 8, 2010 at 11:35 AM, Johannes Schindelin
<Johannes.Schindelin@gmx.de> wrote:
> Hi,
>
> On Fri, 8 Jan 2010, Johannes Sixt wrote:
>
>> Erik Faye-Lund schrieb:
>> > Python is not commonly installed on Windows machines, so
>> > we should disable it there by default.
>> >
>> > --- a/Makefile
>> > +++ b/Makefile
>> > @@ -1027,6 +1027,7 @@ ifneq (,$(findstring MINGW,$(uname_S)))
>> > + NO_PYTHON = YesPlease
>>
>> I'm worried that with this solution it is impossible to re-enable Python
>> in config.mak (how do you undefine a Makefile variable?);
> How about
>
> NO_PYTHON=
>
> in config.mak?
>
That doesn't work for me, at least not out of the box. NO_PYTHON is
still defined, it's just defined to an empty string. I guess we could
change to Makefile to accept empty NO_PYTHON as enabled, but since
Hannes' suggestion works fine, I think I'll stick with it, even if
it's a little inconsistent with the other stuff in the MinGW-section
of Makefile.
I'll resend a bit later.
--
Erik "kusma" Faye-Lund
^ permalink raw reply
* Re: [PATCH 1/5] MSVC: Windows-native implementation for subset of Pthreads API
From: Erik Faye-Lund @ 2010-01-08 10:58 UTC (permalink / raw)
To: Dmitry Potapov; +Cc: Johannes Sixt, msysgit, git, Andrzej K. Haczewski
In-Reply-To: <20100108033232.GA28263@dpotapov.dyndns.org>
On Fri, Jan 8, 2010 at 4:32 AM, Dmitry Potapov <dpotapov@gmail.com> wrote:
> On Thu, Jan 07, 2010 at 10:54:57PM +0100, Johannes Sixt wrote:
>> +
>> +int pthread_cond_wait(pthread_cond_t *cond, CRITICAL_SECTION *mutex)
>> +{
>> + /* serialize access to waiters count */
>> + EnterCriticalSection(&cond->waiters_lock);
>> + ++cond->waiters;
>> + LeaveCriticalSection(&cond->waiters_lock);
>
> InterlockedIncrement(&cond->waiters);
>
>> +
>> + /*
>> + * Unlock external mutex and wait for signal.
>> + * NOTE: we've held mutex locked long enough to increment
>> + * waiters count above, so there's no problem with
>> + * leaving mutex unlocked before we wait on semaphore.
>> + */
>> + LeaveCriticalSection(mutex);
>> +
>> + /* let's wait - ignore return value */
>> + WaitForSingleObject(cond->sema, INFINITE);
>> +
>> + /* we're done waiting, so make sure we decrease waiters count */
>> + EnterCriticalSection(&cond->waiters_lock);
>> + --cond->waiters;
>> + LeaveCriticalSection(&cond->waiters_lock);
>
> InterlockedDecrement(&cond->waiters);
Nice.
>> +
>> + /* lock external mutex again */
>> + EnterCriticalSection(mutex);
>> +
>> + return 0;
>> +}
>> +
>> +int pthread_cond_signal(pthread_cond_t *cond)
>> +{
>> + int have_waiters;
>> +
>> + /* serialize access to waiters count */
>> + EnterCriticalSection(&cond->waiters_lock);
>> + have_waiters = cond->waiters > 0;
>> + LeaveCriticalSection(&cond->waiters_lock);
>
> AFAIK, Win32 API assumes that reading LONG is always atomic, so
> the critical section is not really necesary here, but you need
> to declare 'waiters' as 'volatile':
"Simple reads and writes to properly-aligned 32-bit variables are
atomic operations."
http://msdn.microsoft.com/en-us/library/ms684122(VS.85).aspx
In other words: Yes, you are right.
>> +
>> +int pthread_cond_init(pthread_cond_t *cond, const void *unused)
>> +{
>> + cond->waiters = 0;
>> +
>> + InitializeCriticalSection(&cond->waiters_lock);
>
> Is waiters_lock really necessary?
(Yeah, I moved this one to the end)
No, I think you've proven that it isn't.
--
Erik "kusma" Faye-Lund
^ permalink raw reply
* Re: Difference between pull --rebase and fetch+rebase
From: Santi Béjar @ 2010-01-08 11:05 UTC (permalink / raw)
To: martinvz; +Cc: git
In-Reply-To: <1262907485376-4269422.post@n2.nabble.com>
On Fri, Jan 8, 2010 at 12:38 AM, martinvz
<martin.von.zweigbergk@gmail.com> wrote:
>
>
> Santi Béjar-2 wrote:
>>
>> Can you provide, at least, a graph of your history (ala git log
>> --graph --oneline for example)? And plot also the reflog entries and
>> all the important commits.
>>
>
> $ git log --graph --format=%h --all
> * 2038a46 # topic-2
> * a7b93b2
> * f2501ae # origin/main
> * cd5aaa9
> * cb232f3
> ...
> * 5ed0d06
> * 3067862
> | * 6eba2fa # topic-1
> | * b09aaf4
> | * bc3b72a
> |/
> | * 03d0d84 # topic-3
> | * 5160773
> | * 3c25642
> |/
> | * 6e9b12b # topic-4
> | * 75f5ab2
> | * bdd08ce
> | * b5d5759
> |/
> * 486b580
> * a021696
> * 3ffe7df
> * d0f55c5
> ...
>
> I have topic-1 checked out and run "git pull" and expect it to rebase (only)
> commits bc3b72a, b09aaf4, 6eba2fa onto f2501ae, but it starts by applying
> a021696 and 486b580.
>
> $ git reflog -g origin/main
> f2501ae refs/remotes/origin/mai n@{0}: fetch origin: fast forward
> 3ffe7df refs/remotes/origin/mai n@{1}: fetch origin: fast forward
> ...
>
> I hope that's all that's all you need. It seems that the problem is that the
> oldremoteref gets overwritten with the entry from the reflog. Is the problem
> that 3ffe7df appears in the reflog or that 486b580 doesn't appear there? I'm
> not clear on what ends up in the reflog.
>
> I just realized that I myself created a021696 and 486b580 (but not 3ffe7df),
> probably by rebasing some now-dead branch against origin/main.
Yes, it is. The code expects that you always branch your topic
branches from the upstream branch, so all the possible fork points are
in the reflog. Your flow was to create the topic from a local commit
and then push that commit.
By the way, when Git tries to apply these two commits it should detect
that they are already applied so it should do nothing, isn't it?
HTH,
Santi
^ permalink raw reply
* Re: [StGit PATCH 2/2] Pass the --in-reply-to and --no-thread options to git send-email
From: Catalin Marinas @ 2010-01-08 12:33 UTC (permalink / raw)
To: Karl Wiberg; +Cc: git
In-Reply-To: <b8197bcb1001072243h24e6248er79ac5a8afb6e3782@mail.gmail.com>
2010/1/8 Karl Wiberg <kha@treskal.com>:
> On Thu, Jan 7, 2010 at 5:09 PM, Catalin Marinas <catalin.marinas@arm.com> wrote:
>
>> + if options.in_reply_to:
>> + cmd.append("--in-reply-to %s" % options.in_reply_to)
>
> Have you tested this? I'm pretty sure you need "--in-reply-to=%s", or
> to add the two strings separately---since as far as I can see, this
> command is never shell-expanded.
I now tested it. I initially had an "=" before "%s" but dropped it
because git help wasn't clear whether it's needed. See below for an
updated patch:
Pass the --in-reply-to and --no-thread options to git send-email
From: Catalin Marinas <catalin.marinas@gmail.com>
Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
---
stgit/commands/mail.py | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/stgit/commands/mail.py b/stgit/commands/mail.py
index a78c9d2..287b6a4 100644
--- a/stgit/commands/mail.py
+++ b/stgit/commands/mail.py
@@ -241,6 +241,10 @@ def __send_message_git(msg, options):
cmd.append("--suppress-cc=self")
if not options.auto:
cmd.append("--suppress-cc=body")
+ if options.in_reply_to:
+ cmd.extend(["--in-reply-to", options.in_reply_to])
+ if options.no_thread:
+ cmd.append("--no-thread")
# We only support To/Cc/Bcc in git send-email for now.
for x in ['to', 'cc', 'bcc']:
^ permalink raw reply related
* [StGit PATCH 0/3] Support for command aliases
From: Catalin Marinas @ 2010-01-08 12:35 UTC (permalink / raw)
To: Karl Hasselström; +Cc: git
Hi,
These patches add support for StGit command aliases via
stgit.alias.<cmd> config options. They also re-add previously removed
commands (add, rm, resolved) and a new one (mv).
stg help lists the present aliases.
Catalin Marinas (3):
Populate the cached config options with the defaults
Add support for command aliases
Replace some git commands with stg aliases in test scripts
stgit/commands/__init__.py | 3 ++-
stgit/config.py | 37 +++++++++++++++++++++++--------------
stgit/main.py | 35 ++++++++++++++++++++++++++++++++++-
t/t0001-subdir-branches.sh | 2 +-
t/t0002-status.sh | 12 ++++++------
t/t1000-branch-create.sh | 4 ++--
t/t1002-branch-clone.sh | 2 +-
t/t1200-push-modified.sh | 2 +-
t/t1201-pull-trailing.sh | 2 +-
t/t1202-push-undo.sh | 6 +++---
t/t1203-push-conflict.sh | 6 +++---
t/t1204-pop-keep.sh | 2 +-
t/t1205-push-subdir.sh | 6 +++---
t/t1206-push-hidden.sh | 2 +-
t/t1207-push-tree.sh | 2 +-
t/t1300-uncommit.sh | 4 ++--
t/t1301-repair.sh | 8 ++++----
t/t1302-repair-interop.sh | 2 +-
t/t1500-float.sh | 14 +++++++-------
t/t1501-sink.sh | 12 ++++++------
t/t1600-delete-one.sh | 12 ++++++------
t/t1601-delete-many.sh | 2 +-
t/t1602-delete-spill.sh | 2 +-
t/t1700-goto-top.sh | 2 +-
t/t1701-goto-hidden.sh | 2 +-
t/t1800-import.sh | 4 ++--
t/t1900-mail.sh | 2 +-
t/t2000-sync.sh | 12 ++++++------
t/t2100-pull-policy-fetch.sh | 4 ++--
t/t2101-pull-policy-pull.sh | 6 +++---
t/t2102-pull-policy-rebase.sh | 4 ++--
t/t2200-rebase.sh | 4 ++--
t/t2300-refresh-subdir.sh | 4 ++--
t/t2400-diff.sh | 2 +-
t/t2500-clean.sh | 2 +-
t/t2600-squash.sh | 2 +-
t/t2700-refresh.sh | 6 +++---
t/t2701-refresh-p.sh | 4 ++--
t/t2702-refresh-rm.sh | 10 +++++-----
t/t2800-goto-subdir.sh | 2 +-
t/t3000-dirty-merge.sh | 2 +-
t/t3100-reset.sh | 2 +-
t/t3101-reset-hard.sh | 2 +-
t/t3102-undo.sh | 2 +-
t/t3103-undo-hard.sh | 2 +-
t/t3104-redo.sh | 2 +-
t/t3105-undo-external-mod.sh | 6 +++---
t/t3200-non-ascii-filenames.sh | 4 ++--
t/t3300-edit.sh | 2 +-
t/t3400-pick.sh | 8 ++++----
t/t4100-publish.sh | 12 ++++++------
51 files changed, 169 insertions(+), 126 deletions(-)
--
Catalin
^ permalink raw reply
* [StGit PATCH 1/3] Populate the cached config options with the defaults
From: Catalin Marinas @ 2010-01-08 12:35 UTC (permalink / raw)
To: Karl Hasselström; +Cc: git
In-Reply-To: <20100108123403.24161.3495.stgit@pc1117.cambridge.arm.com>
The patch pre-populates the cached config options with the default
values. It also removes an unused option (stgit.extensions).
Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
---
stgit/config.py | 28 ++++++++++++++--------------
1 files changed, 14 insertions(+), 14 deletions(-)
diff --git a/stgit/config.py b/stgit/config.py
index 796f2c9..811138d 100644
--- a/stgit/config.py
+++ b/stgit/config.py
@@ -28,16 +28,15 @@ class GitConfigException(StgException):
class GitConfig:
__defaults={
- 'stgit.smtpserver': 'localhost:25',
- 'stgit.smtpdelay': '5',
- 'stgit.pullcmd': 'git pull',
- 'stgit.fetchcmd': 'git fetch',
- 'stgit.pull-policy': 'pull',
- 'stgit.autoimerge': 'no',
- 'stgit.keepoptimized': 'no',
- 'stgit.extensions': '.ancestor .current .patched',
- 'stgit.shortnr': '5',
- 'stgit.pager': 'less'
+ 'stgit.smtpserver': ['localhost:25'],
+ 'stgit.smtpdelay': ['5'],
+ 'stgit.pullcmd': ['git pull'],
+ 'stgit.fetchcmd': ['git fetch'],
+ 'stgit.pull-policy': ['pull'],
+ 'stgit.autoimerge': ['no'],
+ 'stgit.keepoptimized': ['no'],
+ 'stgit.shortnr': ['5'],
+ 'stgit.pager': ['less']
}
__cache = None
@@ -47,7 +46,7 @@ class GitConfig:
done already."""
if self.__cache is not None:
return
- self.__cache = {}
+ self.__cache = self.__defaults
lines = Run('git', 'config', '--null', '--list'
).discard_exitcode().raw_output()
for line in filter(None, lines.split('\0')):
@@ -56,9 +55,10 @@ class GitConfig:
def get(self, name):
self.load()
- if name not in self.__cache:
- self.__cache[name] = [self.__defaults.get(name, None)]
- return self.__cache[name][-1]
+ try:
+ return self.__cache[name][-1]
+ except KeyError:
+ return None
def getall(self, name):
self.load()
^ permalink raw reply related
* [StGit PATCH 2/3] Add support for command aliases
From: Catalin Marinas @ 2010-01-08 12:36 UTC (permalink / raw)
To: Karl Hasselström; +Cc: git
In-Reply-To: <20100108123403.24161.3495.stgit@pc1117.cambridge.arm.com>
This patch introduces support StGit command aliases with a few defaults:
stg add -> git add
stg rm -> git rm
stg mv -> git mv
stg resolved -> git add
Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
---
stgit/commands/__init__.py | 3 ++-
stgit/config.py | 11 ++++++++++-
stgit/main.py | 35 ++++++++++++++++++++++++++++++++++-
3 files changed, 46 insertions(+), 3 deletions(-)
diff --git a/stgit/commands/__init__.py b/stgit/commands/__init__.py
index f6cf3c3..f9de42b 100644
--- a/stgit/commands/__init__.py
+++ b/stgit/commands/__init__.py
@@ -28,7 +28,8 @@ def get_command(mod):
_kinds = [('repo', 'Repository commands'),
('stack', 'Stack (branch) commands'),
('patch', 'Patch commands'),
- ('wc', 'Index/worktree commands')]
+ ('wc', 'Index/worktree commands'),
+ ('alias', 'Alias commands')]
_kind_order = [kind for kind, desc in _kinds]
_kinds = dict(_kinds)
diff --git a/stgit/config.py b/stgit/config.py
index 811138d..dd194d3 100644
--- a/stgit/config.py
+++ b/stgit/config.py
@@ -36,7 +36,11 @@ class GitConfig:
'stgit.autoimerge': ['no'],
'stgit.keepoptimized': ['no'],
'stgit.shortnr': ['5'],
- 'stgit.pager': ['less']
+ 'stgit.pager': ['less'],
+ 'stgit.alias.add': ['git add'],
+ 'stgit.alias.rm': ['git rm'],
+ 'stgit.alias.mv': ['git mv'],
+ 'stgit.alias.resolved': ['git add']
}
__cache = None
@@ -76,6 +80,11 @@ class GitConfig:
else:
raise GitConfigException, 'Value for "%s" is not an integer: "%s"' % (name, value)
+ def getstartswith(self, name):
+ self.load()
+ return ((n, v[-1]) for (n, v) in self.__cache.iteritems()
+ if n.startswith(name))
+
def rename_section(self, from_name, to_name):
"""Rename a section in the config file. Silently do nothing if
the section doesn't exist."""
diff --git a/stgit/main.py b/stgit/main.py
index e324179..d5be70b 100644
--- a/stgit/main.py
+++ b/stgit/main.py
@@ -23,6 +23,30 @@ import sys, os, traceback
import stgit.commands
from stgit.out import *
from stgit import argparse, run, utils
+from stgit.config import config
+
+class CommandAlias(object):
+ def __init__(self, name, command):
+ self.__command = command
+ self.__name__ = name
+ self.usage = ['<arguments>']
+ self.help = 'Alias for "%s <arguments>".' % self.__command
+ self.options = []
+
+ def func(self, args):
+ cmd = self.__command.split() + args
+ p = run.Run(*cmd)
+ p.discard_exitcode().run()
+ return p.exitcode
+
+def is_cmd_alias(cmd):
+ return isinstance(cmd, CommandAlias)
+
+def append_alias_commands(cmd_list):
+ for (name, command) in config.getstartswith('stgit.alias.'):
+ name = utils.strip_prefix('stgit.alias.', name)
+ cmd_list[name] = (CommandAlias(name, command),
+ 'Alias commands', command)
#
# The commands map
@@ -49,9 +73,13 @@ class Commands(dict):
def __getitem__(self, key):
cmd_mod = self.get(key) or self.get(self.canonical_cmd(key))
- return stgit.commands.get_command(cmd_mod)
+ if is_cmd_alias(cmd_mod):
+ return cmd_mod
+ else:
+ return stgit.commands.get_command(cmd_mod)
cmd_list = stgit.commands.get_commands()
+append_alias_commands(cmd_list)
commands = Commands((cmd, mod) for cmd, (mod, kind, help)
in cmd_list.iteritems())
@@ -100,6 +128,8 @@ def _main():
sys.argv[0] += ' %s' % cmd
command = commands[cmd]
parser = argparse.make_option_parser(command)
+ if is_cmd_alias(command):
+ parser.remove_option('-h')
from pydoc import pager
pager(parser.format_help())
else:
@@ -121,6 +151,9 @@ def _main():
del(sys.argv[1])
command = commands[cmd]
+ if is_cmd_alias(command):
+ sys.exit(command.func(sys.argv[1:]))
+
parser = argparse.make_option_parser(command)
options, args = parser.parse_args()
directory = command.directory
^ permalink raw reply related
* [StGit PATCH 3/3] Replace some git commands with stg aliases in test scripts
From: Catalin Marinas @ 2010-01-08 12:36 UTC (permalink / raw)
To: Karl Hasselström; +Cc: git
In-Reply-To: <20100108123403.24161.3495.stgit@pc1117.cambridge.arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
---
t/t0001-subdir-branches.sh | 2 +-
t/t0002-status.sh | 12 ++++++------
t/t1000-branch-create.sh | 4 ++--
t/t1002-branch-clone.sh | 2 +-
t/t1200-push-modified.sh | 2 +-
t/t1201-pull-trailing.sh | 2 +-
t/t1202-push-undo.sh | 6 +++---
t/t1203-push-conflict.sh | 6 +++---
t/t1204-pop-keep.sh | 2 +-
t/t1205-push-subdir.sh | 6 +++---
t/t1206-push-hidden.sh | 2 +-
t/t1207-push-tree.sh | 2 +-
t/t1300-uncommit.sh | 4 ++--
t/t1301-repair.sh | 8 ++++----
t/t1302-repair-interop.sh | 2 +-
t/t1500-float.sh | 14 +++++++-------
t/t1501-sink.sh | 12 ++++++------
t/t1600-delete-one.sh | 12 ++++++------
t/t1601-delete-many.sh | 2 +-
t/t1602-delete-spill.sh | 2 +-
t/t1700-goto-top.sh | 2 +-
t/t1701-goto-hidden.sh | 2 +-
t/t1800-import.sh | 4 ++--
t/t1900-mail.sh | 2 +-
t/t2000-sync.sh | 12 ++++++------
t/t2100-pull-policy-fetch.sh | 4 ++--
t/t2101-pull-policy-pull.sh | 6 +++---
t/t2102-pull-policy-rebase.sh | 4 ++--
t/t2200-rebase.sh | 4 ++--
t/t2300-refresh-subdir.sh | 4 ++--
t/t2400-diff.sh | 2 +-
t/t2500-clean.sh | 2 +-
t/t2600-squash.sh | 2 +-
t/t2700-refresh.sh | 6 +++---
t/t2701-refresh-p.sh | 4 ++--
t/t2702-refresh-rm.sh | 10 +++++-----
t/t2800-goto-subdir.sh | 2 +-
t/t3000-dirty-merge.sh | 2 +-
t/t3100-reset.sh | 2 +-
t/t3101-reset-hard.sh | 2 +-
t/t3102-undo.sh | 2 +-
t/t3103-undo-hard.sh | 2 +-
t/t3104-redo.sh | 2 +-
t/t3105-undo-external-mod.sh | 6 +++---
t/t3200-non-ascii-filenames.sh | 4 ++--
t/t3300-edit.sh | 2 +-
t/t3400-pick.sh | 8 ++++----
t/t4100-publish.sh | 12 ++++++------
48 files changed, 110 insertions(+), 110 deletions(-)
diff --git a/t/t0001-subdir-branches.sh b/t/t0001-subdir-branches.sh
index 3f7962a..5ea787e 100755
--- a/t/t0001-subdir-branches.sh
+++ b/t/t0001-subdir-branches.sh
@@ -14,7 +14,7 @@ containing slashes (that is, branches living in a subdirectory of
test_expect_success 'Create a patch' \
'stg init &&
echo "foo" > foo.txt &&
- git add foo.txt &&
+ stg add foo.txt &&
stg new foo -m "Add foo.txt" &&
stg refresh'
diff --git a/t/t0002-status.sh b/t/t0002-status.sh
index 2512c53..c978845 100755
--- a/t/t0002-status.sh
+++ b/t/t0002-status.sh
@@ -54,7 +54,7 @@ cat > expected.txt <<EOF
A foo/bar
EOF
test_expect_success 'Status with an added file' '
- git add foo &&
+ stg add foo &&
stg status > output.txt &&
test_cmp expected.txt output.txt
'
@@ -95,7 +95,7 @@ test_expect_success 'Status after refresh' '
test_expect_success 'Add another file' '
echo lajbans > fie &&
- git add fie &&
+ stg add fie &&
stg refresh
'
@@ -145,7 +145,7 @@ A fie
M foo/bar
EOF
test_expect_success 'Status after resolving the push' '
- git add --update &&
+ stg add --update &&
stg status > output.txt &&
test_cmp expected.txt output.txt
'
@@ -166,7 +166,7 @@ EOF
test_expect_success 'Status of disappeared newborn' '
stg refresh &&
touch foo/bar &&
- git add foo/bar &&
+ stg add foo/bar &&
rm foo/bar &&
stg status > output.txt &&
test_cmp expected.txt output.txt
@@ -177,8 +177,8 @@ A fay
D fie
EOF
test_expect_success 'Status after renaming a file' '
- git rm foo/bar &&
- git mv fie fay &&
+ stg rm foo/bar &&
+ stg mv fie fay &&
stg status > output.txt &&
test_cmp expected.txt output.txt
'
diff --git a/t/t1000-branch-create.sh b/t/t1000-branch-create.sh
index 3fff3ee..2626c73 100755
--- a/t/t1000-branch-create.sh
+++ b/t/t1000-branch-create.sh
@@ -78,9 +78,9 @@ test_expect_success \
'Setup two commits including removal of generated files' '
git init &&
touch file1 file2 &&
- git add file1 file2 &&
+ stg add file1 file2 &&
git commit -m 1 &&
- git rm file1 file2 &&
+ stg rm file1 file2 &&
git commit -m 2 &&
touch file2
'
diff --git a/t/t1002-branch-clone.sh b/t/t1002-branch-clone.sh
index 1303b41..4930c20 100755
--- a/t/t1002-branch-clone.sh
+++ b/t/t1002-branch-clone.sh
@@ -14,7 +14,7 @@ test_expect_success \
'Create a GIT commit' \
'
echo bar > bar.txt &&
- git add bar.txt &&
+ stg add bar.txt &&
git commit -a -m bar
'
diff --git a/t/t1200-push-modified.sh b/t/t1200-push-modified.sh
index 2077492..e04dac5 100755
--- a/t/t1200-push-modified.sh
+++ b/t/t1200-push-modified.sh
@@ -23,7 +23,7 @@ test_expect_success \
stg clone foo bar &&
(
cd bar && stg new p1 -m p1 &&
- printf "a\nc\n" > file && git add file && stg refresh &&
+ printf "a\nc\n" > file && stg add file && stg refresh &&
stg new p2 -m p2 &&
printf "a\nb\nc\n" > file && stg refresh &&
[ "$(echo $(stg series --applied --noprefix))" = "p1 p2" ] &&
diff --git a/t/t1201-pull-trailing.sh b/t/t1201-pull-trailing.sh
index d66ad26..a993aeb 100755
--- a/t/t1201-pull-trailing.sh
+++ b/t/t1201-pull-trailing.sh
@@ -18,7 +18,7 @@ test_create_repo foo
test_expect_success \
'Setup and clone tree, and setup changes' \
"(cd foo &&
- printf 'a\nb\n' > file && git add file && git commit -m .
+ printf 'a\nb\n' > file && stg add file && git commit -m .
) &&
stg clone foo bar &&
(cd bar && stg new p1 -m p1
diff --git a/t/t1202-push-undo.sh b/t/t1202-push-undo.sh
index 14a3d6d..5afcf68 100755
--- a/t/t1202-push-undo.sh
+++ b/t/t1202-push-undo.sh
@@ -21,7 +21,7 @@ test_expect_success \
'
stg new foo -m foo &&
echo foo > test &&
- git add test &&
+ stg add test &&
stg refresh
'
@@ -30,7 +30,7 @@ test_expect_success \
'
stg new bar -m bar &&
echo bar > test &&
- git add test &&
+ stg add test &&
stg refresh
'
@@ -62,7 +62,7 @@ test_expect_success \
'Undo with disappeared newborn' \
'
touch newfile &&
- git add newfile &&
+ stg add newfile &&
rm newfile &&
stg undo --hard
'
diff --git a/t/t1203-push-conflict.sh b/t/t1203-push-conflict.sh
index 8027e6c..b759298 100755
--- a/t/t1203-push-conflict.sh
+++ b/t/t1203-push-conflict.sh
@@ -21,7 +21,7 @@ test_expect_success \
stg new foo -m foo &&
echo foo > test &&
echo fie > test2 &&
- git add test test2 &&
+ stg add test test2 &&
stg refresh &&
stg pop
'
@@ -31,7 +31,7 @@ test_expect_success \
'
stg new bar -m bar &&
echo bar > test &&
- git add test &&
+ stg add test &&
stg refresh
'
@@ -63,7 +63,7 @@ test_expect_success \
'Resolve the conflict' \
'
echo resolved > test &&
- git add test &&
+ stg resolved test &&
stg refresh
'
diff --git a/t/t1204-pop-keep.sh b/t/t1204-pop-keep.sh
index db473f2..ee5d058 100755
--- a/t/t1204-pop-keep.sh
+++ b/t/t1204-pop-keep.sh
@@ -8,7 +8,7 @@ test_expect_success 'Create a few patches' '
for i in 0 1 2; do
stg new p$i -m p$i &&
echo "patch$i" >> patch$i.txt &&
- git add patch$i.txt &&
+ stg add patch$i.txt &&
stg refresh
done &&
[ "$(echo $(stg series --applied --noprefix))" = "p0 p1 p2" ] &&
diff --git a/t/t1205-push-subdir.sh b/t/t1205-push-subdir.sh
index 2d5918b..4af63ce 100755
--- a/t/t1205-push-subdir.sh
+++ b/t/t1205-push-subdir.sh
@@ -9,7 +9,7 @@ test_expect_success 'Create some patches' '
stg new p$i -m p$i &&
echo x$i >> x.txt &&
echo y$i >> foo/y.txt &&
- git add x.txt foo/y.txt &&
+ stg add x.txt foo/y.txt &&
stg refresh
done &&
[ "$(echo $(stg series --applied --noprefix))" = "p0 p1 p2" ] &&
@@ -33,7 +33,7 @@ test_expect_success 'Modifying push from a subdir' '
[ "$(echo $(cat foo/y.txt))" = "y0 y1" ] &&
stg new extra -m extra &&
echo extra >> extra.txt &&
- git add extra.txt &&
+ stg add extra.txt &&
stg refresh &&
cd foo &&
stg push &&
@@ -57,7 +57,7 @@ test_expect_success 'Conflicting add/unknown file in subdir' '
stg new foo -m foo &&
mkdir d &&
echo foo > d/test &&
- git add d/test &&
+ stg add d/test &&
stg refresh &&
stg pop &&
mkdir -p d &&
diff --git a/t/t1206-push-hidden.sh b/t/t1206-push-hidden.sh
index 20aa306..ee8e254 100755
--- a/t/t1206-push-hidden.sh
+++ b/t/t1206-push-hidden.sh
@@ -7,7 +7,7 @@ test_description='Test "stg push" with hidden patches'
test_expect_success 'Initialize StGit stack' '
stg init &&
echo foo > foo.txt &&
- git add foo.txt &&
+ stg add foo.txt &&
stg new -m hidden-patch &&
stg refresh &&
stg pop &&
diff --git a/t/t1207-push-tree.sh b/t/t1207-push-tree.sh
index 9d0b1cc..e97cb1b 100755
--- a/t/t1207-push-tree.sh
+++ b/t/t1207-push-tree.sh
@@ -12,7 +12,7 @@ test_expect_success \
stg init &&
stg new A -m A &&
echo hello world > a &&
- git add a &&
+ stg add a &&
stg refresh
stg new B -m B &&
echo HELLO WORLD > a &&
diff --git a/t/t1300-uncommit.sh b/t/t1300-uncommit.sh
index 43e0d04..5e9b8fb 100755
--- a/t/t1300-uncommit.sh
+++ b/t/t1300-uncommit.sh
@@ -19,7 +19,7 @@ test_expect_success \
'
stg new foo -m "Foo Patch" &&
echo foo > test &&
- git add test &&
+ stg add test &&
stg refresh
'
@@ -28,7 +28,7 @@ test_expect_success \
'
stg new bar -m "Bar Patch" &&
echo bar > test &&
- git add test &&
+ stg add test &&
stg refresh
'
diff --git a/t/t1301-repair.sh b/t/t1301-repair.sh
index 8d5d4e5..939699c 100755
--- a/t/t1301-repair.sh
+++ b/t/t1301-repair.sh
@@ -20,7 +20,7 @@ test_expect_success \
'
stg new foo -m foo &&
echo foo > foo.txt &&
- git add foo.txt &&
+ stg add foo.txt &&
stg refresh
'
@@ -32,7 +32,7 @@ test_expect_success \
'Create a GIT commit' \
'
echo bar > bar.txt &&
- git add bar.txt &&
+ stg add bar.txt &&
git commit -a -m bar
'
@@ -46,7 +46,7 @@ test_expect_success \
'Create three more GIT commits' \
'
echo one > numbers.txt &&
- git add numbers.txt &&
+ stg add numbers.txt &&
git commit -a -m one &&
echo two >> numbers.txt &&
git commit -a -m two &&
@@ -65,7 +65,7 @@ test_expect_success \
'
git checkout -b br master^^ &&
echo woof > woof.txt &&
- git add woof.txt &&
+ stg add woof.txt &&
git commit -a -m woof &&
git checkout master &&
git pull . br
diff --git a/t/t1302-repair-interop.sh b/t/t1302-repair-interop.sh
index 9fad3fa..cce3cf1 100755
--- a/t/t1302-repair-interop.sh
+++ b/t/t1302-repair-interop.sh
@@ -4,7 +4,7 @@ test_description='Test git/StGit interoperability with "stg repair"'
test_expect_success 'Create some git-only history' '
echo foo > foo.txt &&
- git add foo.txt &&
+ stg add foo.txt &&
git commit -a -m foo &&
git tag foo-tag &&
for i in 0 1 2 3 4; do
diff --git a/t/t1500-float.sh b/t/t1500-float.sh
index e44af3a..0ed5733 100755
--- a/t/t1500-float.sh
+++ b/t/t1500-float.sh
@@ -12,13 +12,13 @@ test_description='Test floating a number of patches to the top of the stack
test_expect_success \
'Initialize the StGIT repository' \
'stg init &&
- stg new A -m "a" && echo A >a.txt && git add a.txt && stg refresh &&
- stg new B -m "b" && echo B >b.txt && git add b.txt && stg refresh &&
- stg new C -m "c" && echo C >c.txt && git add c.txt && stg refresh &&
- stg new D -m "d" && echo D >d.txt && git add d.txt && stg refresh &&
- stg new E -m "e" && echo E >e.txt && git add e.txt && stg refresh &&
- stg new F -m "f" && echo F >f.txt && git add f.txt && stg refresh &&
- stg new G -m "g" && echo G >g.txt && git add g.txt && stg refresh &&
+ stg new A -m "a" && echo A >a.txt && stg add a.txt && stg refresh &&
+ stg new B -m "b" && echo B >b.txt && stg add b.txt && stg refresh &&
+ stg new C -m "c" && echo C >c.txt && stg add c.txt && stg refresh &&
+ stg new D -m "d" && echo D >d.txt && stg add d.txt && stg refresh &&
+ stg new E -m "e" && echo E >e.txt && stg add e.txt && stg refresh &&
+ stg new F -m "f" && echo F >f.txt && stg add f.txt && stg refresh &&
+ stg new G -m "g" && echo G >g.txt && stg add g.txt && stg refresh &&
stg pop &&
test "$(echo $(stg series --applied --noprefix))" = "A B C D E F"
'
diff --git a/t/t1501-sink.sh b/t/t1501-sink.sh
index a0769dd..e2c65cb 100755
--- a/t/t1501-sink.sh
+++ b/t/t1501-sink.sh
@@ -6,22 +6,22 @@ test_description='Test "stg sink"'
test_expect_success 'Initialize StGit stack' '
echo 0 >> f0 &&
- git add f0 &&
+ stg add f0 &&
git commit -m initial &&
echo 1 >> f1 &&
- git add f1 &&
+ stg add f1 &&
git commit -m p1 &&
echo 2 >> f2 &&
- git add f2 &&
+ stg add f2 &&
git commit -m p2 &&
echo 3 >> f3 &&
- git add f3 &&
+ stg add f3 &&
git commit -m p3 &&
echo 4 >> f4 &&
- git add f4 &&
+ stg add f4 &&
git commit -m p4 &&
echo 22 >> f2 &&
- git add f2 &&
+ stg add f2 &&
git commit -m p22 &&
stg init &&
stg uncommit p22 p4 p3 p2 p1 &&
diff --git a/t/t1600-delete-one.sh b/t/t1600-delete-one.sh
index ef0b29d..f55bad6 100755
--- a/t/t1600-delete-one.sh
+++ b/t/t1600-delete-one.sh
@@ -12,7 +12,7 @@ test_expect_success \
'
stg new foo -m foo &&
echo foo > foo.txt &&
- git add foo.txt &&
+ stg add foo.txt &&
stg refresh
'
@@ -47,7 +47,7 @@ test_expect_success \
'
stg new foo -m foo &&
echo foo > foo.txt &&
- git add foo.txt &&
+ stg add foo.txt &&
stg refresh &&
stg pop
'
@@ -65,11 +65,11 @@ test_expect_success \
'
stg new foo -m foo &&
echo foo > foo.txt &&
- git add foo.txt &&
+ stg add foo.txt &&
stg refresh &&
stg new bar -m bar &&
echo bar > bar.txt &&
- git add bar.txt &&
+ stg add bar.txt &&
stg refresh
'
@@ -87,12 +87,12 @@ test_expect_success \
stg branch --create br &&
stg new baz -m baz &&
echo baz > baz.txt &&
- git add baz.txt &&
+ stg add baz.txt &&
stg refresh &&
stg branch master &&
stg new baz -m baz &&
echo baz > baz.txt &&
- git add baz.txt &&
+ stg add baz.txt &&
stg refresh
'
diff --git a/t/t1601-delete-many.sh b/t/t1601-delete-many.sh
index cb7fb0d..a0818b3 100755
--- a/t/t1601-delete-many.sh
+++ b/t/t1601-delete-many.sh
@@ -12,7 +12,7 @@ test_expect_success \
'
stg new p0 -m p0 &&
echo p0 > foo.txt &&
- git add foo.txt &&
+ stg add foo.txt &&
stg refresh &&
for i in 1 2 3 4 5 6 7 8 9; do
stg new p$i -m p$i &&
diff --git a/t/t1602-delete-spill.sh b/t/t1602-delete-spill.sh
index 1ddec53..3e27598 100755
--- a/t/t1602-delete-spill.sh
+++ b/t/t1602-delete-spill.sh
@@ -9,7 +9,7 @@ test_expect_success 'Initialize the StGIT repository' '
test_expect_success 'Create five applied and three unapplied patches' '
for i in 0 1 2 3 4 5 6 7; do
echo $i >> foo &&
- git add foo &&
+ stg add foo &&
git commit -m p$i
done
stg uncommit -n 8 &&
diff --git a/t/t1700-goto-top.sh b/t/t1700-goto-top.sh
index 8f2d44a..618ebc7 100755
--- a/t/t1700-goto-top.sh
+++ b/t/t1700-goto-top.sh
@@ -19,7 +19,7 @@ test_expect_success \
'
stg new foo -m "Foo Patch" &&
echo foo > test &&
- git add test &&
+ stg add test &&
stg refresh
'
diff --git a/t/t1701-goto-hidden.sh b/t/t1701-goto-hidden.sh
index a3c6e62..19ab703 100755
--- a/t/t1701-goto-hidden.sh
+++ b/t/t1701-goto-hidden.sh
@@ -7,7 +7,7 @@ test_description='Test "stg goto" with hidden patches'
test_expect_success 'Initialize StGit stack' '
stg init &&
echo foo > foo.txt &&
- git add foo.txt &&
+ stg add foo.txt &&
stg new -m hidden-patch &&
stg refresh &&
stg pop &&
diff --git a/t/t1800-import.sh b/t/t1800-import.sh
index 93de794..406a6cf 100755
--- a/t/t1800-import.sh
+++ b/t/t1800-import.sh
@@ -7,7 +7,7 @@ test_expect_success \
'Initialize the StGIT repository' \
'
cp ../t1800-import/foo.txt . &&
- git add foo.txt &&
+ stg add foo.txt &&
git commit -a -m "initial version" &&
stg init
'
@@ -164,7 +164,7 @@ test_expect_success \
'apply a series from a tarball' \
'
rm -f jabberwocky.txt && touch jabberwocky.txt &&
- git add jabberwocky.txt && git commit -m "empty file" jabberwocky.txt &&
+ stg add jabberwocky.txt && git commit -m "empty file" jabberwocky.txt &&
(cd ../t1800-import; tar -cjf jabberwocky.tar.bz2 patches) &&
stg import --series ../t1800-import/jabberwocky.tar.bz2
[ $(git cat-file -p $(stg id) \
diff --git a/t/t1900-mail.sh b/t/t1900-mail.sh
index cea6769..acb61a7 100755
--- a/t/t1900-mail.sh
+++ b/t/t1900-mail.sh
@@ -10,7 +10,7 @@ test_expect_success \
for i in 1 2 3 4 5; do
touch foo.txt &&
echo "line $i" >> foo.txt &&
- git add foo.txt &&
+ stg add foo.txt &&
git commit -a -m "Patch $i"
done &&
stg init &&
diff --git a/t/t2000-sync.sh b/t/t2000-sync.sh
index d550538..696d698 100755
--- a/t/t2000-sync.sh
+++ b/t/t2000-sync.sh
@@ -18,15 +18,15 @@ test_expect_success \
'
stg new p1 -m p1 &&
echo foo1 > foo1.txt &&
- git add foo1.txt &&
+ stg add foo1.txt &&
stg refresh &&
stg new p2 -m p2 &&
echo foo2 > foo2.txt &&
- git add foo2.txt &&
+ stg add foo2.txt &&
stg refresh &&
stg new p3 -m p3 &&
echo foo3 > foo3.txt &&
- git add foo3.txt &&
+ stg add foo3.txt &&
stg refresh &&
stg export &&
stg pop &&
@@ -86,7 +86,7 @@ test_expect_success \
stg refresh &&
stg goto p2 &&
echo bar2 > bar2.txt &&
- git add bar2.txt &&
+ stg add bar2.txt &&
stg refresh &&
stg goto p3 &&
echo bar3 >> foo3.txt &&
@@ -117,7 +117,7 @@ test_expect_success \
'
[ "$(echo $(stg series --applied --noprefix))" = "p1" ] &&
[ "$(echo $(stg series --unapplied --noprefix))" = "p2 p3" ] &&
- git add --update &&
+ stg add --update &&
stg refresh &&
stg goto p3
[ "$(echo $(stg series --applied --noprefix))" = "p1 p2 p3" ] &&
@@ -135,7 +135,7 @@ test_expect_success \
'
[ "$(echo $(stg series --applied --noprefix))" = "p1 p2 p3" ] &&
[ "$(echo $(stg series --unapplied --noprefix))" = "" ] &&
- git add --update &&
+ stg add --update &&
stg refresh &&
[ "$(echo $(stg series --applied --noprefix))" = "p1 p2 p3" ] &&
[ "$(echo $(stg series --unapplied --noprefix))" = "" ]
diff --git a/t/t2100-pull-policy-fetch.sh b/t/t2100-pull-policy-fetch.sh
index 670c7c6..07435f5 100755
--- a/t/t2100-pull-policy-fetch.sh
+++ b/t/t2100-pull-policy-fetch.sh
@@ -22,7 +22,7 @@ test_expect_success \
git config branch.master.stgit.pull-policy fetch-rebase &&
git config --list &&
stg new c1 -m c1 &&
- echo a > file && git add file && stg refresh
+ echo a > file && stg add file && stg refresh
)
'
@@ -30,7 +30,7 @@ test_expect_success \
'Add non-rewinding commit upstream and pull it from clone' \
'
(cd upstream && stg new u1 -m u1 &&
- echo a > file2 && git add file2 && stg refresh) &&
+ echo a > file2 && stg add file2 && stg refresh) &&
(cd clone && stg pull) &&
test -e clone/file2
'
diff --git a/t/t2101-pull-policy-pull.sh b/t/t2101-pull-policy-pull.sh
index 777ccb5..35c15ad 100755
--- a/t/t2101-pull-policy-pull.sh
+++ b/t/t2101-pull-policy-pull.sh
@@ -22,7 +22,7 @@ test_expect_success \
git config branch.master.stgit.pull-policy pull &&
git config --list &&
stg new c1 -m c1 &&
- echo a > file && git add file && stg refresh
+ echo a > file && stg add file && stg refresh
)
'
@@ -30,7 +30,7 @@ test_expect_success \
'Add non-rewinding commit upstream and pull it from clone' \
'
(cd upstream && stg new u1 -m u1 &&
- echo a > file2 && git add file2 && stg refresh) &&
+ echo a > file2 && stg add file2 && stg refresh) &&
(cd clone && stg pull) &&
test -e clone/file2
'
@@ -49,7 +49,7 @@ test_expect_success \
test_expect_success \
'"Solve" the conflict (pretend there is none)' \
'(cd clone &&
- git add file2 && EDITOR=cat git commit)'
+ stg add file2 && EDITOR=cat git commit)'
test_expect_success \
'Push the stack back' \
diff --git a/t/t2102-pull-policy-rebase.sh b/t/t2102-pull-policy-rebase.sh
index 5619bda..952ee7e 100755
--- a/t/t2102-pull-policy-rebase.sh
+++ b/t/t2102-pull-policy-rebase.sh
@@ -16,14 +16,14 @@ test_expect_success \
git config branch.stack.stgit.pull-policy rebase &&
git config --list &&
stg new c1 -m c1 &&
- echo a > file && git add file && stg refresh
+ echo a > file && stg add file && stg refresh
'
test_expect_success \
'Add non-rewinding commit in parent and pull the stack' \
'
stg branch parent && stg new u1 -m u1 &&
- echo b > file2 && git add file2 && stg refresh &&
+ echo b > file2 && stg add file2 && stg refresh &&
stg branch stack && stg pull &&
test -e file2
'
diff --git a/t/t2200-rebase.sh b/t/t2200-rebase.sh
index adbf242..75e1f17 100755
--- a/t/t2200-rebase.sh
+++ b/t/t2200-rebase.sh
@@ -11,10 +11,10 @@ test_expect_success \
'Setup a multi-commit branch and fork an stgit stack' \
'
echo foo > file1 &&
- git add file1 &&
+ stg add file1 &&
git commit -m a &&
echo foo > file2 &&
- git add file2 &&
+ stg add file2 &&
git commit -m b &&
stg branch --create stack &&
diff --git a/t/t2300-refresh-subdir.sh b/t/t2300-refresh-subdir.sh
index 89c95db..34d6e69 100755
--- a/t/t2300-refresh-subdir.sh
+++ b/t/t2300-refresh-subdir.sh
@@ -8,7 +8,7 @@ test_expect_success 'Refresh from a subdirectory' '
echo foo >> foo.txt &&
mkdir bar &&
echo bar >> bar/bar.txt &&
- git add foo.txt bar/bar.txt &&
+ stg add foo.txt bar/bar.txt &&
cd bar &&
stg refresh &&
cd .. &&
@@ -48,7 +48,7 @@ test_expect_success 'Refresh subdirectories recursively' '
test_expect_success 'refresh -u' '
echo baz >> bar/baz.txt &&
stg new p1 -m p1 &&
- git add bar/baz.txt &&
+ stg add bar/baz.txt &&
stg refresh --index &&
echo xyzzy >> foo.txt &&
echo xyzzy >> bar/bar.txt &&
diff --git a/t/t2400-diff.sh b/t/t2400-diff.sh
index fbcefe1..73f4539 100755
--- a/t/t2400-diff.sh
+++ b/t/t2400-diff.sh
@@ -10,7 +10,7 @@ test_expect_success 'Diff with no StGit data' '
test_expect_success 'Make some local changes' '
echo foo >> foo.txt &&
- git add foo.txt
+ stg add foo.txt
'
test_expect_success 'Diff with some local changes' '
diff --git a/t/t2500-clean.sh b/t/t2500-clean.sh
index 7f821f5..8082c21 100755
--- a/t/t2500-clean.sh
+++ b/t/t2500-clean.sh
@@ -9,7 +9,7 @@ test_expect_success 'Initialize StGit stack' '
stg new e0 -m e0 &&
stg new p0 -m p0 &&
echo foo > foo.txt &&
- git add foo.txt &&
+ stg add foo.txt &&
stg refresh &&
stg new e1 -m e1 &&
stg new e2 -m e2 &&
diff --git a/t/t2600-squash.sh b/t/t2600-squash.sh
index 3dba012..e36a638 100755
--- a/t/t2600-squash.sh
+++ b/t/t2600-squash.sh
@@ -9,7 +9,7 @@ test_expect_success 'Initialize StGit stack' '
for i in 0 1 2 3; do
stg new p$i -m "foo $i" &&
echo "foo $i" >> foo.txt &&
- git add foo.txt &&
+ stg add foo.txt &&
stg refresh
done
'
diff --git a/t/t2700-refresh.sh b/t/t2700-refresh.sh
index aad6d45..6028b9e 100755
--- a/t/t2700-refresh.sh
+++ b/t/t2700-refresh.sh
@@ -13,7 +13,7 @@ test_expect_success 'Initialize StGit stack' '
stg new p0 -m "base" &&
for i in 1 2 3; do
echo base >> foo$i.txt &&
- git add foo$i.txt
+ stg add foo$i.txt
done
stg refresh &&
for i in 1 2 3; do
@@ -104,7 +104,7 @@ test_expect_success 'Refresh --index' '
stg status &&
stg new p4 -m "refresh_index" &&
echo baz 1 >> foo1.txt &&
- git add foo1.txt &&
+ stg add foo1.txt &&
echo blah 1 >> foo1.txt &&
echo baz 2 >> foo2.txt &&
stg refresh --index &&
@@ -119,7 +119,7 @@ test_expect_success 'Refresh --index' '
'
test_expect_success 'Refresh moved files' '
- git mv foo1.txt foo1-new.txt &&
+ stg mv foo1.txt foo1-new.txt &&
stg refresh
'
diff --git a/t/t2701-refresh-p.sh b/t/t2701-refresh-p.sh
index ed4bac4..3ba3b02 100755
--- a/t/t2701-refresh-p.sh
+++ b/t/t2701-refresh-p.sh
@@ -15,7 +15,7 @@ test_expect_success 'Initialize StGit stack' '
stg init &&
for i in 1 2; do
echo x > $i.txt &&
- git add $i.txt &&
+ stg add $i.txt &&
stg new p$i -m "Patch $i" &&
stg refresh
done
@@ -33,7 +33,7 @@ test_expect_success 'Add new file to non-top patch' '
stg status > status1.txt &&
test_cmp expected0.txt status1.txt &&
echo y > new.txt &&
- git add new.txt &&
+ stg add new.txt &&
stg refresh -p p1 &&
stg status > status2.txt &&
test_cmp expected0.txt status2.txt &&
diff --git a/t/t2702-refresh-rm.sh b/t/t2702-refresh-rm.sh
index 0362cc6..fa81cee 100755
--- a/t/t2702-refresh-rm.sh
+++ b/t/t2702-refresh-rm.sh
@@ -20,7 +20,7 @@ test_expect_success 'Initialize StGit stack' '
stg init &&
echo x > x.txt &&
echo y > y.txt &&
- git add x.txt y.txt &&
+ stg add x.txt y.txt &&
git commit -m "Add some files"
'
@@ -28,9 +28,9 @@ cat > expected0.txt <<EOF
D y.txt
EOF
printf '' > expected1.txt
-test_expect_success 'git rm a file' '
+test_expect_success 'stg rm a file' '
stg new -m p0 &&
- git rm y.txt &&
+ stg rm y.txt &&
stg status > status0.txt &&
test_cmp expected0.txt status0.txt &&
stg refresh &&
@@ -47,10 +47,10 @@ D y.txt
M x.txt
EOF
printf '' > expected1.txt
-test_expect_success 'git rm a file together with other changes' '
+test_expect_success 'stg rm a file together with other changes' '
stg new -m p1 &&
echo x2 >> x.txt &&
- git rm y.txt &&
+ stg rm y.txt &&
stg status > status0.txt &&
test_cmp expected0.txt status0.txt &&
stg refresh &&
diff --git a/t/t2800-goto-subdir.sh b/t/t2800-goto-subdir.sh
index 5960bd6..5ac77cc 100755
--- a/t/t2800-goto-subdir.sh
+++ b/t/t2800-goto-subdir.sh
@@ -13,7 +13,7 @@ test_expect_success 'Initialize StGit stack' '
for i in 1 2 3; do
echo foo$i >> foo/bar &&
stg new p$i -m p$i &&
- git add foo/bar &&
+ stg add foo/bar &&
stg refresh
done
'
diff --git a/t/t3000-dirty-merge.sh b/t/t3000-dirty-merge.sh
index 419d86e..d8c16fa 100755
--- a/t/t3000-dirty-merge.sh
+++ b/t/t3000-dirty-merge.sh
@@ -7,7 +7,7 @@ test_description='Try a push that requires merging a file that is dirty'
test_expect_success 'Initialize StGit stack with two patches' '
stg init &&
touch a &&
- git add a &&
+ stg add a &&
git commit -m a &&
echo 1 > a &&
git commit -a -m p1 &&
diff --git a/t/t3100-reset.sh b/t/t3100-reset.sh
index 3024975..61f303d 100755
--- a/t/t3100-reset.sh
+++ b/t/t3100-reset.sh
@@ -12,7 +12,7 @@ EOF
test_expect_success 'Initialize StGit stack with three patches' '
stg init &&
echo 000 >> a &&
- git add a &&
+ stg add a &&
git commit -m a &&
echo 111 >> a &&
git commit -a -m p1 &&
diff --git a/t/t3101-reset-hard.sh b/t/t3101-reset-hard.sh
index 45e86dc..a93682b 100755
--- a/t/t3101-reset-hard.sh
+++ b/t/t3101-reset-hard.sh
@@ -13,7 +13,7 @@ EOF
test_expect_success 'Initialize StGit stack with three patches' '
stg init &&
echo 000 >> a &&
- git add a &&
+ stg add a &&
git commit -m a &&
echo 111 >> a &&
git commit -a -m p1 &&
diff --git a/t/t3102-undo.sh b/t/t3102-undo.sh
index 9373522..010a63d 100755
--- a/t/t3102-undo.sh
+++ b/t/t3102-undo.sh
@@ -12,7 +12,7 @@ EOF
test_expect_success 'Initialize StGit stack with three patches' '
stg init &&
echo 000 >> a &&
- git add a &&
+ stg add a &&
git commit -m a &&
echo 111 >> a &&
git commit -a -m p1 &&
diff --git a/t/t3103-undo-hard.sh b/t/t3103-undo-hard.sh
index df14b1f..b94543e 100755
--- a/t/t3103-undo-hard.sh
+++ b/t/t3103-undo-hard.sh
@@ -13,7 +13,7 @@ EOF
test_expect_success 'Initialize StGit stack with three patches' '
stg init &&
echo 000 >> a &&
- git add a &&
+ stg add a &&
git commit -m a &&
echo 111 >> a &&
git commit -a -m p1 &&
diff --git a/t/t3104-redo.sh b/t/t3104-redo.sh
index 030311d..3d3c617 100755
--- a/t/t3104-redo.sh
+++ b/t/t3104-redo.sh
@@ -12,7 +12,7 @@ EOF
test_expect_success 'Initialize StGit stack with three patches' '
stg init &&
echo 000 >> a &&
- git add a &&
+ stg add a &&
git commit -m a &&
echo 111 >> a &&
git commit -a -m p1 &&
diff --git a/t/t3105-undo-external-mod.sh b/t/t3105-undo-external-mod.sh
index f5aad64..1980167 100755
--- a/t/t3105-undo-external-mod.sh
+++ b/t/t3105-undo-external-mod.sh
@@ -13,10 +13,10 @@ EOF
test_expect_success 'Initialize StGit stack' '
stg init &&
echo 000 >> a &&
- git add a &&
+ stg add a &&
git commit -m p0 &&
echo 111 >> a &&
- git add a &&
+ stg add a &&
git commit -m p1 &&
stg uncommit -n 1
'
@@ -29,7 +29,7 @@ EOF
test_expect_success 'Make a git commit and turn it into a patch' '
git rev-parse HEAD > head0.txt &&
echo 222 >> a &&
- git add a &&
+ stg add a &&
git commit -m p2 &&
git rev-parse HEAD > head1.txt &&
stg repair &&
diff --git a/t/t3200-non-ascii-filenames.sh b/t/t3200-non-ascii-filenames.sh
index 1aa78ed..fe2ecc0 100755
--- a/t/t3200-non-ascii-filenames.sh
+++ b/t/t3200-non-ascii-filenames.sh
@@ -11,11 +11,11 @@ EOF
test_expect_success 'Setup' '
echo "Fjäderholmarna" > skärgårdsö.txt &&
- git add skärgårdsö.txt &&
+ stg add skärgårdsö.txt &&
git commit -m "Create island" &&
stg init &&
echo foo > unrelated.txt &&
- git add unrelated.txt &&
+ stg add unrelated.txt &&
stg new p0 -m "Unrelated file" &&
stg refresh &&
stg pop &&
diff --git a/t/t3300-edit.sh b/t/t3300-edit.sh
index ad3b23f..7003a27 100755
--- a/t/t3300-edit.sh
+++ b/t/t3300-edit.sh
@@ -5,7 +5,7 @@ test_description='Test "stg edit"'
test_expect_success 'Setup' '
printf "000\n111\n222\n333\n" >> foo &&
- git add foo &&
+ stg add foo &&
git commit -m "Initial commit" &&
sed -i "s/000/000xx/" foo &&
git commit -a -m "First change" &&
diff --git a/t/t3400-pick.sh b/t/t3400-pick.sh
index 6e92de3..22b348c 100755
--- a/t/t3400-pick.sh
+++ b/t/t3400-pick.sh
@@ -7,11 +7,11 @@ test_expect_success \
'Initialize the StGIT repository' \
'
stg init &&
- stg new A -m "a" && echo A > a && git add a && stg refresh &&
- stg new B -m "b" && echo B > b && git add b && stg refresh &&
+ stg new A -m "a" && echo A > a && stg add a && stg refresh &&
+ stg new B -m "b" && echo B > b && stg add b && stg refresh &&
stg branch --clone foo &&
- stg new C -m "c" && echo C > c && git add c && stg refresh &&
- stg new D-foo -m "d" && echo D > d && git add d && stg refresh &&
+ stg new C -m "c" && echo C > c && stg add c && stg refresh &&
+ stg new D-foo -m "d" && echo D > d && stg add d && stg refresh &&
stg branch master
'
diff --git a/t/t4100-publish.sh b/t/t4100-publish.sh
index 17e07bc..7d72a6c 100755
--- a/t/t4100-publish.sh
+++ b/t/t4100-publish.sh
@@ -26,15 +26,15 @@ test_expect_success \
'
stg new p1 -m p1 &&
echo foo1 > foo1.txt &&
- git add foo1.txt &&
+ stg add foo1.txt &&
stg refresh &&
stg new p2 -m p2 &&
echo foo2 > foo2.txt &&
- git add foo2.txt &&
+ stg add foo2.txt &&
stg refresh &&
stg new p3 -m p3 &&
echo foo3 > foo3.txt &&
- git add foo3.txt &&
+ stg add foo3.txt &&
stg refresh
'
@@ -64,11 +64,11 @@ test_expect_success \
'
stg new p4 -m p4 &&
echo foo4 > foo4.txt &&
- git add foo4.txt &&
+ stg add foo4.txt &&
stg refresh &&
stg new p5 -m p5 &&
echo foo5 > foo5.txt &&
- git add foo5.txt &&
+ stg add foo5.txt &&
stg refresh &&
stg new empty -m empty &&
old_public=$(stg id master.public) &&
@@ -83,7 +83,7 @@ test_expect_success \
'
stg pop -a &&
echo foo0 > foo0.txt &&
- git add foo0.txt &&
+ stg add foo0.txt &&
git commit -m "foo0.txt added" &&
stg push -a &&
old_public=$(stg id master.public) &&
^ permalink raw reply related
* Re: base85: Two tiny fixes
From: Andreas Gruenbacher @ 2010-01-08 13:02 UTC (permalink / raw)
To: Nicolas Pitre; +Cc: git
In-Reply-To: <alpine.LFD.2.00.1001071253400.21025@xanadu.home>
On Thursday 07 January 2010 18:58:01 Nicolas Pitre wrote:
> ACK. Please post them to this list.
Okay, done.
> On Thu, 7 Jan 2010, Andreas Gruenbacher wrote:
> > There is another little oddity in the way the de85 table is set up: 0
> > indicates an invalid entry; to avoid this from clashing with a valid entry,
> > valid entries are incremented by one and decremented again while decoding.
> > This leads to slightly worse code than using a negative number to indicate
> > invalid values (and avoiding to increment/decrement).
>
> You can make a patch to modify that as well if you wish.
Nah, it's not worth the noise.
> And in that case don't forget to make de85 explicitly signed as a char is
> unsigned by default on some platforms.
I would have forgotten this; thanks for pointing it out!
Thanks,
Andreas
^ permalink raw reply
* Re: [RESEND PATCH] french translation of gitk
From: Emmanuel Trillaud @ 2010-01-08 13:22 UTC (permalink / raw)
To: Nicolas Sebrecht
Cc: Paul Mackerras, Maximilien Noal, Matthieu Moy, Nicolas Pitre,
Git Mailing List, Thomas Moulard, Junio C Hamano, Guy Brand
In-Reply-To: <20091229223758.GB12965@vidovic>
Hi all,
Thank Nicolas for beeing the ambassador this translation :-)
Le Tue, 29 Dec 2009 23:39:39 +0100,
Nicolas Sebrecht <nicolas.s.dev@gmx.fr> a écrit :
> Hi,
>
> I may be wrong but I think this patch wasn't merged and I didn't see any
> comment on it.
>
> Could you please merge this patch?
>
>
> -- >8 --
> Subject: [PATCH] gitk: french translation
> From: Emmanuel Trillaud <etrillaud@gmail.com>
>
> Signed-off-by: Emmanuel Trillaud <etrillaud@gmail.com>
> Signed-off-by: Thomas Moulard <thomas.moulard@gmail.com>
> Signed-off-by: Guy Brand <gb@unistra.fr>
> Signed-off-by: Nicolas Sebrecht <nicolas.s.dev@gmx.fr>
> ---
[snip]
I got the following errors when trying to 'make' gitk with your latest patch :
$ LANG=C make
Generating catalog po/fr.msg
msgfmt --statistics --tcl po/fr.po -l fr -d po/
po/fr.po:23:24: invalid multibyte sequence
po/fr.po:23:28: invalid multibyte sequence
po/fr.po:23:66: invalid multibyte sequence
po/fr.po:27:38: invalid multibyte sequence
po/fr.po:31:16: invalid multibyte sequence
po/fr.po:31:22: invalid multibyte sequence
po/fr.po:36:17: invalid multibyte sequence
po/fr.po:36:26: invalid multibyte sequence
po/fr.po:36:40: invalid multibyte sequence
po/fr.po:36:44: invalid multibyte sequence
po/fr.po:37:9: invalid multibyte sequence
po/fr.po:46:17: invalid multibyte sequence
po/fr.po:46:26: invalid multibyte sequence
po/fr.po:46:40: invalid multibyte sequence
po/fr.po:46:44: invalid multibyte sequence
po/fr.po:46:76: invalid multibyte sequence
po/fr.po:51:16: invalid multibyte sequence
po/fr.po:51:22: invalid multibyte sequence
po/fr.po:63:23: invalid multibyte sequence
po/fr.po:63:32: invalid multibyte sequence
msgfmt: too many errors, aborting
make: *** [po/fr.msg] Error 1
This is obviously an encoding problem.
My LANG is 'fr_FR.UTF-8' if it is relevant.
The file generate by :
iconv --from-code ISO_8859-1 --to-code UTF-8 --output po/fr.po po/fr.po
work as expected.
Don't the *.po files need to be in utf8?
Best regards
Emmanuel
^ permalink raw reply
* Re: [PATCH] mingw: disable Python
From: Junio C Hamano @ 2010-01-08 13:35 UTC (permalink / raw)
To: kusmabite; +Cc: Johannes Schindelin, Johannes Sixt, msysgit, git
In-Reply-To: <40aa078e1001080249t16b0ee01i5ceb8e7ad2426e70@mail.gmail.com>
Erik Faye-Lund <kusmabite@googlemail.com> writes:
>> On Fri, 8 Jan 2010, Johannes Sixt wrote:
>>
>>> Erik Faye-Lund schrieb:
>>> > Python is not commonly installed on Windows machines, so
>>> > we should disable it there by default.
>>> >
>>> > --- a/Makefile
>>> > +++ b/Makefile
>>> > @@ -1027,6 +1027,7 @@ ifneq (,$(findstring MINGW,$(uname_S)))
>>> > + NO_PYTHON = YesPlease
>>>
>>> I'm worried that with this solution it is impossible to re-enable Python
>>> in config.mak (how do you undefine a Makefile variable?);
>
>> How about
>>
>> NO_PYTHON=
>>
>> in config.mak?
>
> That doesn't work for me, at least not out of the box. NO_PYTHON is
> still defined, it's just defined to an empty string.
I think Dscho is right. "ifdef FOO" yields (and should yield) false if
FOO is set to empty.
-- >8 -- cut here and try it for yourself -- >8 --
#!/bin/sh
rm -f config.mk
cat >Makefile <<\EOF
# The default is...
all::
FROTZ = NITFOL
-include config.mk
ifdef FROTZ
all::
echo FROTZ is $(FROTZ)
else
all::
echo FROTZ is not defined
endif
EOF
make
# says "NITFOL"
echo "FROTZ =" >config.mk
make
# says "not defined"
exit
-- 8< --
^ permalink raw reply
* [PATCH 2/3] base85: No need to initialize the decode table in encode_85
From: Andreas Gruenbacher @ 2010-01-08 13:39 UTC (permalink / raw)
To: git; +Cc: Andreas Gruenbacher
In-Reply-To: <alpine.LFD.2.00.1001071253400.21025@xanadu.home>
Signed-off-by: Andreas Gruenbacher <agruen@suse.de>
---
base85.c | 2 --
1 files changed, 0 insertions(+), 2 deletions(-)
diff --git a/base85.c b/base85.c
index 1d165d9..7204ce2 100644
--- a/base85.c
+++ b/base85.c
@@ -84,8 +84,6 @@ int decode_85(char *dst, const char *buffer, int len)
void encode_85(char *buf, const unsigned char *data, int bytes)
{
- prep_base85();
-
say("encode 85");
while (bytes) {
unsigned acc = 0;
--
1.6.6.75.g37bae
^ permalink raw reply related
* [PATCH 3/3] base85: Make the code more obvious instead of explaining the non-obvious
From: Andreas Gruenbacher @ 2010-01-08 13:40 UTC (permalink / raw)
To: git; +Cc: Andreas Gruenbacher
In-Reply-To: <alpine.LFD.2.00.1001071253400.21025@xanadu.home>
Here is another cleanup ...
Signed-off-by: Andreas Gruenbacher <agruen@suse.de>
---
base85.c | 10 ++--------
1 files changed, 2 insertions(+), 8 deletions(-)
diff --git a/base85.c b/base85.c
index 7204ce2..e459fee 100644
--- a/base85.c
+++ b/base85.c
@@ -57,14 +57,8 @@ int decode_85(char *dst, const char *buffer, int len)
de = de85[ch];
if (--de < 0)
return error("invalid base85 alphabet %c", ch);
- /*
- * Detect overflow. The largest
- * 5-letter possible is "|NsC0" to
- * encode 0xffffffff, and "|NsC" gives
- * 0x03030303 at this point (i.e.
- * 0xffffffff = 0x03030303 * 85).
- */
- if (0x03030303 < acc ||
+ /* Detect overflow. */
+ if (0xffffffff / 85 < acc ||
0xffffffff - de < (acc *= 85))
return error("invalid base85 sequence %.5s", buffer-5);
acc += de;
--
1.6.6.75.g37bae
^ permalink raw reply related
* [PATCH 1/3] base85 debug code: Fix length byte calculation
From: Andreas Gruenbacher @ 2010-01-08 13:39 UTC (permalink / raw)
To: git; +Cc: Andreas Gruenbacher
In-Reply-To: <alpine.LFD.2.00.1001071253400.21025@xanadu.home>
Signed-off-by: Andreas Gruenbacher <agruen@suse.de>
---
base85.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/base85.c b/base85.c
index b417a15..1d165d9 100644
--- a/base85.c
+++ b/base85.c
@@ -118,7 +118,7 @@ int main(int ac, char **av)
int len = strlen(av[2]);
encode_85(buf, av[2], len);
if (len <= 26) len = len + 'A' - 1;
- else len = len + 'a' - 26 + 1;
+ else len = len + 'a' - 26 - 1;
printf("encoded: %c%s\n", len, buf);
return 0;
}
--
1.6.6.75.g37bae
^ permalink raw reply related
* Re: [PATCH] mingw: disable Python
From: Johannes Sixt @ 2010-01-08 13:52 UTC (permalink / raw)
To: Junio C Hamano; +Cc: kusmabite, Johannes Schindelin, msysgit, git
In-Reply-To: <7vpr5kpvmh.fsf@alter.siamese.dyndns.org>
Junio C Hamano schrieb:
> Erik Faye-Lund <kusmabite@googlemail.com> writes:
>>> On Fri, 8 Jan 2010, Johannes Sixt wrote:
>>>> (how do you undefine a Makefile variable?);
>>> How about
>>>
>>> NO_PYTHON=
>>>
>>> in config.mak?
>> That doesn't work for me, at least not out of the box. NO_PYTHON is
>> still defined, it's just defined to an empty string.
>
> I think Dscho is right. "ifdef FOO" yields (and should yield) false if
> FOO is set to empty.
Indeed. Strange. It didn't work when I tested it a few hours ago, but no
it works as you say. According to the docs, 'ifdef' actually does not test
defined-ness, but emptyness. So, Erik's original version is fine:
Acked-by: Johannes Sixt <j6t@kdbg.org>
-- Hannes
^ permalink raw reply
* Re: [PATCH] mingw: disable Python
From: Erik Faye-Lund @ 2010-01-08 13:55 UTC (permalink / raw)
To: Junio C Hamano; +Cc: Johannes Schindelin, Johannes Sixt, msysgit, git
In-Reply-To: <7vpr5kpvmh.fsf@alter.siamese.dyndns.org>
On Fri, Jan 8, 2010 at 2:35 PM, Junio C Hamano <gitster@pobox.com> wrote:
> Erik Faye-Lund <kusmabite@googlemail.com> writes:
>
>>> On Fri, 8 Jan 2010, Johannes Sixt wrote:
>>>
>>>> Erik Faye-Lund schrieb:
>>>> > Python is not commonly installed on Windows machines, so
>>>> > we should disable it there by default.
>>>> >
>>>> > --- a/Makefile
>>>> > +++ b/Makefile
>>>> > @@ -1027,6 +1027,7 @@ ifneq (,$(findstring MINGW,$(uname_S)))
>>>> > + NO_PYTHON = YesPlease
>>>>
>>>> I'm worried that with this solution it is impossible to re-enable Python
>>>> in config.mak (how do you undefine a Makefile variable?);
>>
>>> How about
>>>
>>> NO_PYTHON=
>>>
>>> in config.mak?
>>
>> That doesn't work for me, at least not out of the box. NO_PYTHON is
>> still defined, it's just defined to an empty string.
>
> I think Dscho is right. "ifdef FOO" yields (and should yield) false if
> FOO is set to empty.
>
In that case I guess I messed up my test. I'll retest.
Yes, I messed up. "NO_PYTHON=" works like a charm.
So, no repost :)
--
Erik "kusma" Faye-Lund
^ permalink raw reply
* [PATCH] Document git-blame triple -C option
From: Ramkumar Ramachandra @ 2010-01-08 14:10 UTC (permalink / raw)
To: git
[-- Attachment #1: Type: text/plain, Size: 66 bytes --]
The git-blame -CCC option is undocumented. This patch fixes that.
[-- Attachment #2: 0001-Document-git-blame-triple-C-option.patch --]
[-- Type: text/x-patch, Size: 2251 bytes --]
From 2732bf40f7607941ce1d65ce4d0effc0e8a0a593 Mon Sep 17 00:00:00 2001
From: Ramkumar Ramachandra <artagnon@gmail.com>
Date: Fri, 8 Jan 2010 19:29:02 +0530
Subject: [PATCH] Document git-blame triple -C option
git-blame -CCC is explained in builin-blame.c line 2171, but is
unexplained in the documentation. This patch fixes that.
Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com>
---
Documentation/blame-options.txt | 13 +++++++------
Documentation/git-blame.txt | 2 +-
2 files changed, 8 insertions(+), 7 deletions(-)
diff --git a/Documentation/blame-options.txt b/Documentation/blame-options.txt
index 1625ffc..e1abf1e 100644
--- a/Documentation/blame-options.txt
+++ b/Documentation/blame-options.txt
@@ -94,12 +94,13 @@ within a file for it to associate those lines with the parent
commit.
-C|<num>|::
- In addition to `-M`, detect lines copied from other
- files that were modified in the same commit. This is
- useful when you reorganize your program and move code
- around across files. When this option is given twice,
- the command additionally looks for copies from all other
- files in the parent for the commit that creates the file.
+ In addition to `-M`, detect lines copied from other files that
+ were modified in the same commit. This is useful when you
+ reorganize your program and move code around across files.
+ When this option is given twice, the command additionally
+ looks for copies from other files in the commit that creates
+ the file. When this option is given thrice, the command
+ additionally looks for copies from other files in any commit.
+
<num> is optional but it is the lower bound on the number of
alphanumeric characters that git must detect as moving
diff --git a/Documentation/git-blame.txt b/Documentation/git-blame.txt
index 8c7b7b0..25bc416 100644
--- a/Documentation/git-blame.txt
+++ b/Documentation/git-blame.txt
@@ -9,7 +9,7 @@ SYNOPSIS
--------
[verse]
'git blame' [-c] [-b] [-l] [--root] [-t] [-f] [-n] [-s] [-p] [-w] [--incremental] [-L n,m]
- [-S <revs-file>] [-M] [-C] [-C] [--since=<date>]
+ [-S <revs-file>] [-M] [-C] [-C] [-C] [--since=<date>]
[<rev> | --contents <file> | --reverse <rev>] [--] <file>
DESCRIPTION
--
1.6.5
^ permalink raw reply related
* Re: [PATCH 3/3] Add "ls", which is basically ls-files with user-friendly settings
From: Nguyen Thai Ngoc Duy @ 2010-01-08 14:16 UTC (permalink / raw)
To: Junio C Hamano; +Cc: git
In-Reply-To: <fcaeb9bf1001071009m11a7adfehdad485a4baeeb958@mail.gmail.com>
On 1/8/10, Nguyen Thai Ngoc Duy <pclouds@gmail.com> wrote:
> On 1/8/10, Junio C Hamano <gitster@pobox.com> wrote:
> > I think the code for columnar output used in producing "git help -a"
> > output should be reusable (if not, should be made reusable and reused
> > here).
>
>
> I saw that and even exported term_columns() but was too lazy to make
> pretty_print_string_list() something reusable. Will think of it again
> when I see this command is worth pushing forward.
I think again. There are a few places that may benefit from column
display: git tag -l, git grep -l, git branch (if you have lots of
branches) and probably untracked part of "git status". Moreover, I
have to implement it anyway because Solaris does not have command
"column". How about an external "git-column"? This way we don't have
to modify lots of code for columnized output. We may want to name it
"git-pager" if we want an internal pager someday ;)
--
Duy
^ permalink raw reply
* Re: [StGit PATCH 1/3] Populate the cached config options with the defaults
From: Karl Wiberg @ 2010-01-08 14:30 UTC (permalink / raw)
To: Catalin Marinas; +Cc: git
In-Reply-To: <20100108123559.24161.14842.stgit@pc1117.cambridge.arm.com>
Hmm. What's the point of this rewrite?
On Fri, Jan 8, 2010 at 1:35 PM, Catalin Marinas <catalin.marinas@arm.com> wrote:
> + try:
> + return self.__cache[name][-1]
> + except KeyError:
> + return None
You could write this as
return self.__cache.get(name, [None])[-1]
--
Karl Wiberg, kha@treskal.com
subrabbit.wordpress.com
www.treskal.com/kalle
^ permalink raw reply
* Re: [StGit PATCH 1/3] Populate the cached config options with the defaults
From: Karl Wiberg @ 2010-01-08 14:34 UTC (permalink / raw)
To: Catalin Marinas; +Cc: git
In-Reply-To: <b8197bcb1001080630i6daad79anf8323f8001d38db3@mail.gmail.com>
On Fri, Jan 8, 2010 at 3:30 PM, Karl Wiberg <kha@treskal.com> wrote:
> Hmm. What's the point of this rewrite?
Ah, never mind, patch 2/3 made it clear. Though it would have been
nice to read about it in the commit message. ;-)
--
Karl Wiberg, kha@treskal.com
subrabbit.wordpress.com
www.treskal.com/kalle
^ permalink raw reply
* Possible bug in git-completion.sh
From: Jon Schewe @ 2010-01-08 15:17 UTC (permalink / raw)
To: spearce; +Cc: git
If I create a directory "build" at the top of my git repository and then
add it to .gitignore, git behaves as expected and ignores the build
directory when checking status. Now git-completion.sh has some issues. I
have GIT_PS1_SHOWUNTRACKEDFILES to "1", so that I will be notified when
there are untracked files in my working directory. When I'm in the
top-level directory my prompt looks like expected, no '%'. However if I
change to the build directory I get a '%', even though git status shows
no untracked files. I see that git-completion.sh is using git ls-files
to check this and that function does indeed show output when in my build
directory. So the question here: Is git-completion.sh using ls-files
improperly or is ls-files behaving improperly?
--
Jon Schewe | http://mtu.net/~jpschewe
If you see an attachment named signature.asc, this is my digital
signature. See http://www.gnupg.org for more information.
For I am convinced that neither death nor life, neither angels nor
demons, neither the present nor the future, nor any powers,
neither height nor depth, nor anything else in all creation, will
be able to separate us from the love of God that is in Christ
Jesus our Lord. - Romans 8:38-39
^ permalink raw reply
* Re: [PATCH] Document git-blame triple -C option
From: Michael J Gruber @ 2010-01-08 15:36 UTC (permalink / raw)
To: Ramkumar Ramachandra; +Cc: git
In-Reply-To: <f3271551001080610p62ef6abfge1c96648d1ea948f@mail.gmail.com>
Ramkumar Ramachandra venit, vidit, dixit 08.01.2010 15:10:
> The git-blame -CCC option is undocumented. This patch fixes that.
Above you see why it is difficult to comment on attached patches.
They're not included!
You re-wrapped the existing documentation. Please don't do that, because
it makes it difficult to spot what you really changed.
It seems you added one sentence. Please don't use "thrice" for "three
times", that is very old English and sounds funny.
Michael
^ permalink raw reply
* Re: Possible bug in git-completion.sh
From: Michael J Gruber @ 2010-01-08 15:40 UTC (permalink / raw)
To: Jon Schewe; +Cc: spearce, git
In-Reply-To: <4B474C73.8080100@mtu.net>
Jon Schewe venit, vidit, dixit 08.01.2010 16:17:
> If I create a directory "build" at the top of my git repository and then
> add it to .gitignore, git behaves as expected and ignores the build
> directory when checking status. Now git-completion.sh has some issues. I
> have GIT_PS1_SHOWUNTRACKEDFILES to "1", so that I will be notified when
> there are untracked files in my working directory. When I'm in the
> top-level directory my prompt looks like expected, no '%'. However if I
> change to the build directory I get a '%', even though git status shows
> no untracked files. I see that git-completion.sh is using git ls-files
> to check this and that function does indeed show output when in my build
> directory. So the question here: Is git-completion.sh using ls-files
> improperly or is ls-files behaving improperly?
>
Neither, but: output between status and ls-files is inconsistent. More
specifically, different commands behave differently with respect to the
treatment of subdirs. ls-files assumes "." implicitly, status does not.
"git status ." should give you the same behavior is "git ls-files" in
this regard.
Michael
^ permalink raw reply
* Re: [PATCH 2/3] base85: No need to initialize the decode table in encode_85
From: Michael J Gruber @ 2010-01-08 15:46 UTC (permalink / raw)
To: Andreas Gruenbacher; +Cc: git
In-Reply-To: <1262958000-27181-2-git-send-email-agruen@suse.de>
Andreas Gruenbacher venit, vidit, dixit 08.01.2010 14:39:
> Signed-off-by: Andreas Gruenbacher <agruen@suse.de>
> ---
For the less informed it may be worthwhile to have an explanation in the
commit message why encode_85() does not need to initialize the table. (I
strongly suspect it's a matter of de vs. en, i.e. "because it only
encodes but does not decode."...)
> base85.c | 2 --
> 1 files changed, 0 insertions(+), 2 deletions(-)
>
> diff --git a/base85.c b/base85.c
> index 1d165d9..7204ce2 100644
> --- a/base85.c
> +++ b/base85.c
> @@ -84,8 +84,6 @@ int decode_85(char *dst, const char *buffer, int len)
>
> void encode_85(char *buf, const unsigned char *data, int bytes)
> {
> - prep_base85();
> -
> say("encode 85");
> while (bytes) {
> unsigned acc = 0;
^ permalink raw reply
* Re: [PATCH 2/3] base85: No need to initialize the decode table in encode_85
From: Junio C Hamano @ 2010-01-08 15:55 UTC (permalink / raw)
To: Michael J Gruber; +Cc: Andreas Gruenbacher, git
In-Reply-To: <4B475361.60506@drmicha.warpmail.net>
Michael J Gruber <git@drmicha.warpmail.net> writes:
> Andreas Gruenbacher venit, vidit, dixit 08.01.2010 14:39:
>> Signed-off-by: Andreas Gruenbacher <agruen@suse.de>
>> ---
>
> For the less informed it may be worthwhile to have an explanation in the
> commit message why encode_85() does not need to initialize the table. (I
> strongly suspect it's a matter of de vs. en, i.e. "because it only
> encodes but does not decode."...)
The title can be reworded to
base85: encode85() does not use the decode table
^ 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