Here's v5 of the performance tracing patch series, now including a bunch of
cleanups and adding timestamp, file and line to all trace output.
I'm particularly interested in feedback for the output format. As file names
have different lengths, printing file:line as prefix results in unaligned
ou
Also include direct dependencies (strbuf.h and git-compat-util.h for
__attribute__) so that trace.h can be used independently of cache.h, e.g.
in test programs.
Signed-off-by: Karsten Blees
---
cache.h | 13 ++---
trace.h | 17 +
2 files changed, 19 insertions(+), 11 dele
trace_printf_key() is the only non-static function that duplicates the
printf format attribute in the .c file, remove it for consistency.
Signed-off-by: Karsten Blees
---
trace.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/trace.c b/trace.c
index 37a7fa9..3e31558 100644
--- a/trace.c
+++
The format parameter to trace_printf functions is sometimes abbreviated
'fmt'. Rename to 'format' everywhere (consistent with POSIX' printf
specification).
Signed-off-by: Karsten Blees
---
trace.c | 22 +++---
trace.h | 2 +-
2 files changed, 12 insertions(+), 12 deletions(-)
d
Opening and writing to the trace file is currently duplicated in
trace_strbuf() and trace_argv_printf(). Factor out this logic to prepare
for adding timestamp and file:line to trace output.
In case of trace_argv_printf(), this adds an additional trace_want() check
to prevent unnecessary string for
To be able to add a common prefix or suffix to all trace output (e.g.
a timestamp or file:line of the caller), factor out common setup and
cleanup tasks of the trace* functions.
When adding a common prefix, it makes sense that the output of each trace
call starts on a new line. Add '\n' in case th
This is useful to tell apart trace output of separate test runs.
It can also be used for basic, coarse-grained performance analysis. Note
that the accuracy is tainted by writing to the trace file, and you have to
calculate the deltas yourself (which is next to impossible if multiple
threads or pro
No functional changes, just move stuff around so that the next patch isn't
that ugly...
Signed-off-by: Karsten Blees
---
trace.c | 36 ++--
trace.h | 12
2 files changed, 26 insertions(+), 22 deletions(-)
diff --git a/trace.c b/trace.c
index 5a3393a.
This is useful to see where trace output came from.
Add 'const char *file, int line' parameters to the printing functions and
rename them to *_fl.
Add trace_printf* and trace_strbuf macros resolving to the *_fl functions
and let the preprocessor fill in __FILE__ and __LINE__.
As the trace_printf
Add a getnanotime() function that returns nanoseconds since 01/01/1970 as
unsigned 64-bit integer (i.e. overflows in july 2554). This is easier to
work with than e.g. struct timeval or struct timespec. Basing the timer on
the epoch allows using the results (div 10e9) with other time-related APIs.
Add trace_performance and trace_performance_since macros that print a
duration and an optional printf-formatted text to the file specified in
environment variable GIT_TRACE_PERFORMANCE.
These macros, in conjunction with getnanotime(), are intended to simplify
performance measurements from within t
Use trace_performance to measure and print execution time and command line
arguments of the entire main() function. In constrast to the shell's 'time'
utility, which measures total time of the parent process, this logs all
involved git commands recursively. This is particularly useful to debug
perf
Hi Michael,
On 05/18/2014 11:17 PM, Michael S. Tsirkin wrote:
> As a maintainer, I often get patches by mail, then
> acked-by,reviewed-by etc responses are sent by separate
> mail.
>
> I like making acks commits,
> this way they are easy to keep track of
> as part of git history.
In order to ful
On Mon, Jun 9, 2014 at 6:19 PM, Jeremiah Mahler wrote:
> Version 2 of the patch set to add strbuf_set operations.
>
> Includes suggestions from Eric Sunshine [1]:
>
> [...snip...]
>
> Using strbuf_set before a sequence of adds can be confusing. But using
> strbuf_add when nothing important was be
Am 11.06.2014 10:01, schrieb Karsten Blees:
> the epoch allows using the results (div 10e9) with other time-related APIs.
s/10e9/1e9/
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.
On Mon, Jun 9, 2014 at 6:19 PM, Jeremiah Mahler wrote:
> Currently, the data in a strbuf is modified using add operations. To
> set the buffer to some data a reset must be performed before an add.
>
> strbuf_reset(buf);
> strbuf_add(buf, cb.buf.buf, cb.buf.len);
>
> And this is a common seque
On Wed, Jun 11, 2014 at 10:05:46AM +0200, Fabian Ruch wrote:
> Hi Michael,
>
> On 05/18/2014 11:17 PM, Michael S. Tsirkin wrote:
> > As a maintainer, I often get patches by mail, then
> > acked-by,reviewed-by etc responses are sent by separate
> > mail.
> >
> > I like making acks commits,
> > thi
It is not C. The code would break under mksh when 'pull.ff' is set:
$ git pull
/usr/lib/git-core/git-pull[67]: break: can't break
Already up-to-date.
Signed-off-by: Jacek Konieczny
---
git-pull.sh | 2 --
1 file changed, 2 deletions(-)
diff --git a/git-pull.sh b/git-pull.sh
index 6cd8ebc
Am 10.06.2014 12:17, schrieb Heiko Voigt:
> On Fri, Jun 06, 2014 at 07:52:03PM +0200, Karsten Blees wrote:
>> Am 05.06.2014 08:06, schrieb Heiko Voigt:
>>> This allows a reader to immediately know which options can be used and
>>> what this parameter is about.
>>>
>> [...]
>>> -void hashmap_free(st
On 06/05/2014 04:51 PM, Robert Dailey wrote:
> I've never contributed to the Git project before. I'm a Windows user,
> so I use msysgit, but I'd be happy to install linux just so I can help
> implement this feature if everyone feels it would be useful.
>
> Right now AFAIK, there is no way to prune
From: Johannes Schindelin
Date: Mon, 28 May 2012 21:21:39 -0500
This is in the great tradition of POSIX. Original fix by Olivier Refalo.
Signed-off-by: Johannes Schindelin
Signed-off-by: Stepan Kasal
---
compat/mingw.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/c
From: Karsten Blees
Date: Sun, 16 Jan 2011 18:27:53 +0100
Convert command line arguments from UTF-8 to UTF-16 when creating other
processes.
Signed-off-by: Karsten Blees
Signed-off-by: Stepan Kasal
---
compat/mingw.c | 18 ++
1 file changed, 14 insertions(+), 4 deletions(-)
d
From: Karsten Blees
Date: Sun, 16 Jan 2011 18:28:27 +0100
Convert command line arguments from UTF-16 to UTF-8 on startup.
Signed-off-by: Karsten Blees
Signed-off-by: Stepan Kasal
---
compat/mingw.c | 42 --
1 file changed, 40 insertions(+), 2 deletions(
From: Karsten Blees
Date: Fri, 7 Jan 2011 18:04:16 +0100
...by removing a static buffer in do_stat_internal.
Signed-off-by: Karsten Blees
Signed-off-by: Erik Faye-Lund
Signed-off-by: Stepan Kasal
---
compat/mingw.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/compat/mi
From: Karsten Blees
Date: Fri, 7 Jan 2011 19:52:20 +0100
MingwRT listens to _CRT_glob to decide if __getmainargs should
perform globbing, with the default being that it should.
Unfortunately, __getmainargs globbing is sub-par; for instance
patterns like "*.c" will only match c-sources in the curr
This is the second part of the time-proven unicode suport branch from msysgit.
This batch is a collection of small independent changes, limited to mingw.c.
The only exception is the last patch: it changes gitk and git-gui.
(The third and last part of msysgit/unicode branch will all be about
enviro
From: Karsten Blees
Date: Fri, 25 Nov 2011 21:33:17 +0100
The only public spawn function that needs to tweak the environment is
mingw_spawnvpe (called from start_command). Nevertheless, all internal
spawn* functions take an env parameter and needlessly pass the global
char **environ around. Remov
From: Karsten Blees
Date: Sat, 4 Feb 2012 21:54:36 +0100
Assumes file names in git tree objects are UTF-8 encoded.
On most unix systems, the system encoding (and thus the TCL system
encoding) will be UTF-8, so file names will be displayed correctly.
On Windows, it is impossible to set the syste
Hi,
I'm banging my head on this problem: I have a central repo cloned by SSH, and a
fork on the same server. The central remote is origin, and the fork is
chbrosso-wip.
$ git remote -v | grep origin
origin chbrosso@lltech:/git/lightct.git (fetch)
origin chbrosso@lltech:/git/lightct.git (push)
Hi All
When I was tagging, I think I might have discovered a git client bug.
HOW TO REPRODUCE:
- Clone a repo into 2 separate directories. Presume there is a tag
"v0.1" already in there and it is set on say 10 commits ago.
- In first directory change the tag to a different place and push it
to t
On Tue, Jun 10, 2014 at 10:18 AM, Pasha Bolokhov
wrote:
>> On Thu, Jun 5, 2014 at 3:15 AM, Pasha Bolokhov
>> wrote:
>>> + /* only add it if GIT_DIR does not end with '.git' or '/.git' */
>>> + if (len < 4 || strcmp(n_git + len - 4, ".git") ||
>>> + (len > 4 && n_git[len - 5
On 11.06.2014 12:21, Wojciech Przybył wrote:
> Hi All
>
> When I was tagging, I think I might have discovered a git client bug.
>
> HOW TO REPRODUCE:
> - Clone a repo into 2 separate directories. Presume there is a tag
> "v0.1" already in there and it is set on say 10 commits ago.
>
> - In first
On Wed, Jun 11, 2014 at 1:48 AM, Junio C Hamano wrote:
> Nguyễn Thái Ngọc Duy writes:
>
>> Commit 4ad8332 (t0001: test git init when run via an alias -
>> 2010-11-26) noted breakages when running init via alias. The problem
>> is for alias to be used, $GIT_DIR must be searched, but 'init' and
>>
Hi
Thanks for your quick reply. Just read the link and I agree it is not
the right thing to do, especially when someone else has already picked
up the tag. In such case, I fully agree, the developer should say "I
messed up, sorry".
Simultaneously, once such situation occurs, I think git should no
Hi
I'm trying to find a setup which allows me to interact with a
writeprotected repository.
Orig: This is a SVN repo which i cannot check out with git svn. Dunno
why, but thats not the problem. I just create a new Git branch and
check it out inside. After the merge, this repo can be deleted.
Del
On 06/10/2014 12:19 AM, Jeremiah Mahler wrote:
> Currently, the data in a strbuf is modified using add operations. To
> set the buffer to some data a reset must be performed before an add.
>
> strbuf_reset(buf);
> strbuf_add(buf, cb.buf.buf, cb.buf.len);
>
> And this is a common sequence of
Hi!
I am rebasing a branch to combine a couple of commits. One is a revert
of a previous commit. Since there are commits in-between, I do
"squash" to make sure I get everything, and then add the actual change
on top of that. The problem is that rebase stops with a confusing
error message (fro
On Tue, Jun 10, 2014 at 06:39:58PM -0400, Pete Wyckoff wrote:
> frrr...@gmail.com wrote on Tue, 10 Jun 2014 13:14 +0100:
> > b4073bb387ef303c9ac3c044f46d6a8ae6e190f0 broke git p4 submit, here
> > is a proper fix, including proper handling for windows end of lines.
>
> I guess we don't have test co
b4073bb387ef303c9ac3c044f46d6a8ae6e190f0 broke git p4 submit, here
is a proper fix, including proper handling for windows end of lines.
Signed-off-by: Maxime Coste
Acked-by: Pete Wyckoff
---
git-p4.py | 12 ++--
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/git-p4.py b/
frrr...@gmail.com wrote on Wed, 11 Jun 2014 14:06 +0100:
> On Tue, Jun 10, 2014 at 06:39:58PM -0400, Pete Wyckoff wrote:
> > frrr...@gmail.com wrote on Tue, 10 Jun 2014 13:14 +0100:
> > > b4073bb387ef303c9ac3c044f46d6a8ae6e190f0 broke git p4 submit, here
> > > is a proper fix, including proper hand
Tanay Abhra writes:
> I have run the tests and debug the code using custom functions and it works
> fine.
I understand that you wrote the custom functions for you, but didn't
include them in the patch, right?
If so, wouldn't it make sense to include these as unit-tests for your
code? See what G
Signed-off-by: Marc Branchaud
---
Documentation/git-fetch.txt| 4 ++--
Documentation/pull-fetch-param.txt | 18 ++
2 files changed, 16 insertions(+), 6 deletions(-)
On 14-06-05 06:12 PM, Junio C Hamano wrote:
>
>> + parameters are not normally specified on the comma
On 2014-06-10 21:16, brian m. carlson wrote:
> On Tue, Jun 10, 2014 at 04:28:46PM -0400, Richard Hansen wrote:
>> On 2014-06-10 16:06, Torsten Bögershausen wrote:
>>> zsh --version
>>> zsh 4.3.9 (i386-apple-darwin10.0)
>>
>> zsh 4.3.9 is over 5 years old (2008-11-03). Is that young enough that
>>
On Wed, Jun 11, 2014 at 8:49 AM, Peter Krefting wrote:
> I am rebasing a branch to combine a couple of commits. One is a revert of a
> previous commit. Since there are commits in-between, I do "squash" to make
> sure I get everything, and then add the actual change on top of that. The
> problem
Reported-by: Hartmut Henkel
Signed-off-by: Ralf Thielow
---
po/de.po | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/po/de.po b/po/de.po
index b777ef4..88d10ed 100644
--- a/po/de.po
+++ b/po/de.po
@@ -10551,13 +10551,13 @@ msgstr "Bitte committen Sie die Änderungen oder
b
Phil Hord:
What does it mean when you say it worked as expected? Did it leave
the empty commit, omit the empty commit, or leave some un-squashed
commit?
Actually, it did not work as expected I noted afterward, it just
dropped the reversion commit, and did not squash the next commit into
it
Done.
Thanks.
On Tue, Jun 10, 2014 at 3:49 PM, Jonathan Nieder wrote:
> Ronnie Sahlberg wrote:
>
>> --- a/refs.c
>> +++ b/refs.c
>> @@ -2510,16 +2510,38 @@ static int repack_without_ref(const char *refname)
> [...]
>> +static int unlink_or_err(const char *file, struct strbuf *err)
>> +{
>> +
This patch allows people to set commit.verbose to implicitly send
--verbose to git-commit. It also introduces --no-verbose to override the
configuration setting.
This version incorporates changes suggested by Eric Sunshine, Duy
Nguyen, and Jeremiah Mahler.
It introduces several cleanup patches to
Some of the tests in t/t7507-commit-verbose.sh were still using
git-config to set configuration. Change them to use the test_config
helper.
Signed-off-by: Caleb Thompson
---
t/t7507-commit-verbose.sh | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/t/t7507-commit-verbose.s
Add a new configuration variable commit.verbose to implicitly pass
`--verbose` to `git-commit`. Add `--no-verbose` to commit to negate that
setting.
Signed-off-by: Caleb Thompson
---
Documentation/config.txt | 5 +
Documentation/git-commit.txt | 8 +++-
builtin/
t/t7507-commit-verbose.sh was using a global test_set_editor call to
build its environment.
Improve robustness against global state changes by having only tests
which intend to use the $EDITOR to check for presence of a diff in the
editor set up the test-editor to use check-for-diff rather than re
Use write_script from t/test-lib-functions.sh instead of cat, shebang,
and chmod. This protects us from potential shell meta-characters in the
name of our trash directory, which would be interpreted if we set
$EDITOR directly.
Signed-off-by: Caleb Thompson
---
t/t7507-commit-verbose.sh | 6 ++---
Thanks.
Done.
I added a function to stop leaking commands too.
On Tue, Jun 10, 2014 at 4:18 PM, Jonathan Nieder wrote:
> Ronnie Sahlberg wrote:
>
>> --- a/builtin/receive-pack.c
>> +++ b/builtin/receive-pack.c
>> @@ -46,6 +46,7 @@ static void *head_name_to_free;
>> static int sent_capabilities;
On Wed, Jun 11, 2014 at 1:57 PM, Peter Krefting wrote:
> Phil Hord:
>
>
>> What does it mean when you say it worked as expected? Did it leave
>> the empty commit, omit the empty commit, or leave some un-squashed
>> commit?
>
>
> Actually, it did not work as expected I noted afterward, it just dro
On 6. Juni 2014 16:15:28 MESZ, Michael J Gruber
wrote:
>Commit signatures can be verified using "git show -s --show-signature"
>or the "%G?" pretty format and parsing the output, which is well suited
>for user inspection, but not for scripting.
>
>Provide a command "verify-commit" which is anal
Jacek Konieczny writes:
> It is not C. The code would break under mksh when 'pull.ff' is set:
>
> $ git pull
> /usr/lib/git-core/git-pull[67]: break: can't break
> Already up-to-date.
>
> Signed-off-by: Jacek Konieczny
> ---
Thanks for spotting; I cannot believe this somehow got through
u
Am 11.06.2014 20:24, schrieb ca...@calebthompson.io:
Add a new configuration variable commit.verbose to implicitly pass
`--verbose` to `git-commit`. Add `--no-verbose` to commit to negate that
setting.
Signed-off-by: Caleb Thompson
---
Documentation/config.txt | 5 +
Docume
The fix seems reasonable to me. See below for a couple of suggestions
regarding the commit message.
On 06/10/2014 02:37 AM, Fabian Ruch wrote:
> [...]
> -- >8 --
> Subject: rebase -i: Remember merge options beyond continue actions
>
> If the user explicitly specified a merge strategy or strategy
On Wed, Jun 11, 2014, at 01:41 PM, René Scharfe wrote:
>> @@ -1556,7 +1560,7 @@ int cmd_commit(int argc, const char **argv, const char
>> *prefix)
>> static struct wt_status s;
>> static struct option builtin_commit_options[] = {
>>OPT__QUIET(&quiet, N_("suppress summary after successful com
It is possible to have two refs which are the same but for case.
This works great on the case-sensitive filesystems, but not so well on
case-insensitive filesystems. It is fairly typical to have
case-insensitive clients (Macs, say) with a case-sensitive server
(GNU/Linux).
Should a user attempt t
This issue bit us again recently.
In talking with some colleagues, I realized that the previous version
of this patch, in addition to being potentially slow, was incomplete.
Specifically, it didn't handle the case of refs/heads/case/one vs
refs/heads/CASE/two; these are case clones even though the
When an explicit '--git-dir' option points to a directory inside
the work tree, git treats it as if it were any other directory.
In particular, 'git status' lists it as untracked, while 'git add -A'
stages the metadata directory entirely
Add GIT_DIR to the list of excludes in a dedicated function
Setting the option allows to list files in submodules.
Signed-off-by: Roland Schulz
---
Documentation/git-ls-files.txt | 4
builtin/ls-files.c | 3 +++
2 files changed, 7 insertions(+)
diff --git a/Documentation/git-ls-files.txt b/Documentation/git-ls-files.txt
index e26f01f..7
On Wed, Jun 11, 2014 at 11:27:23AM -0400, Richard Hansen wrote:
> On 2014-06-10 21:16, brian m. carlson wrote:
> > Skipping them on older versions (maybe using is-at-least) would be
> > fine by me.
>
> I don't think we'll need to skip the tests on old zsh versions --
> running 'zsh -c' should stil
Kedves Email felhasználói;
Ön túllépte a tárolási határt 23.432 az e-postafiók beállítva a
WEB SERVICE / Administrator, és akkor problémái küldés
és a bejövő üzenetek, amíg meg újból érvényesíti az e-mail címét. A
szükséges eljárások
nyújtottak be az alábbi a véleménye, ellenőrizze kattintva
az
Am 12.06.2014 01:28, schrieb Pasha Bolokhov:
> +test_expect_success "setup" '
> + mkdir repo-inside/ &&
> + (
> + cd repo-inside/ &&
> + for f in a b c d
> + do
> + echo "DATA" >"$f" || exit 1
> + done &&
> + mk
66 matches
Mail list logo