* Re: Recent unresolved issues
From: Junio C Hamano @ 2006-04-15 6:18 UTC (permalink / raw)
To: Linus Torvalds; +Cc: git
In-Reply-To: <Pine.LNX.4.64.0604141751270.3701@g5.osdl.org>
Linus Torvalds <torvalds@osdl.org> writes:
> On Fri, 14 Apr 2006, Linus Torvalds wrote:
>>
>> I think you're right, and I've probably broken "--full-diff" (causing the
>> revparse to also use the empty set of paths). Gaah.
>
> In fact, it's broken path-limited revisions entirely. Duh. We should have
> a test for that, so I would have noticed.
>
> I think we need two diffopt structures there - one for the actual diff,
> and one for the pruning.
Although I've already decided to merge it up, there are small
fallout from this. I've fixed the ones I noticed, but there
probably remain some backward compatibility issues in commands
that I do not usually use. We'll see.
Also I merged the commit prettyprinter change, but I was hoping
we could instead pass down the commit object and commit format
to places where log message needs to be output and write it out
to the standard output instead of formatting in core.
^ permalink raw reply
* Re: Test fails on ubuntu breezy
From: Aneesh Kumar @ 2006-04-15 6:47 UTC (permalink / raw)
To: Junio C Hamano; +Cc: linux, Peter Eriksen, git, Carl Worth
In-Reply-To: <7vpsjl1ezb.fsf@assigned-by-dhcp.cox.net>
[-- Attachment #1: Type: text/plain, Size: 294 bytes --]
I am still having failure with the top of the tree. I guess it is
because git rm exit with status 0.
kvaneesh@home:/tmp/test$ git rm -f a
rm: cannot remove `a': Permission denied
kvaneesh@home:/tmp/test$ echo $?
0
kvaneesh@home:/tmp/test$
I am attaching the logs below
-aneesh
[-- Attachment #2: test2 --]
[-- Type: application/octet-stream, Size: 1435 bytes --]
+ touch -- foo bar baz 'space embedded' -q
+ git-add -- foo bar baz 'space embedded' -q
+ git-commit -m 'add normal files'
Committing initial tree e5c556e46aae6124ff4a2a466c95004e92d9a2e4
+ test_tabs=y
+ touch -- 'tab embedded' 'newline
embedded'
+ git-add -- 'tab embedded' 'newline
embedded'
+ git-commit -m 'add files with tabs and newlines'
+ :
+ chmod a-w .
+ rm -f test-file
rm: cannot remove `test-file': Permission denied
+ test -f test-file
+ test_failed_remove=y
+ chmod 775 .
+ rm -f test-file
+ test y = y
+ chmod a-w .
+ test_expect_failure 'Test that "git-rm -f" fails if its rm fails' 'git-rm -f baz'
+ test 2 = 2
+ say 'expecting failure: git-rm -f baz'
+ echo '* expecting failure: git-rm -f baz'
+ test_run_ 'git-rm -f baz'
+ eval 'git-rm -f baz'
+ eval_ret=0
+ return 0
+ '[' 0 = 0 -a 0 '!=' 0 ']'
+ test_failure_ 'Test that "git-rm -f" fails if its rm fails' 'git-rm -f baz'
++ expr 0 + 1
+ test_count=1
++ expr 0 + 1
+ test_failure=1
+ say 'FAIL 1: Test that "git-rm -f" fails if its rm fails'
+ echo '* FAIL 1: Test that "git-rm -f" fails if its rm fails'
* FAIL 1: Test that "git-rm -f" fails if its rm fails
+ shift
+ echo 'git-rm -f baz'
+ sed -e 's/^/ /'
git-rm -f baz
+ test '' = ''
+ chmod 775 .
+ test_done
+ trap - exit
+ case "$test_failure" in
+ say 'failed 1 among 1 test(s)'
+ echo '* failed 1 among 1 test(s)'
* failed 1 among 1 test(s)
+ exit 1
kvaneesh@home:~/git-work/git.build/t$
^ permalink raw reply
* Re: Test fails on ubuntu breezy
From: Junio C Hamano @ 2006-04-15 7:24 UTC (permalink / raw)
To: Aneesh Kumar; +Cc: git
In-Reply-To: <cc723f590604142347p7646aa40r52506a0d85b7d817@mail.gmail.com>
"Aneesh Kumar" <aneesh.kumar@gmail.com> writes:
> I am still having failure with the top of the tree. I guess it is
> because git rm exit with status 0.
Please don't guess, but validate (I know you are capable of
doing so).
What I would do to see what is happening would be to do
something like the attached patch and re-run the test.
BTW, you did "sh -x t3600-rm.sh" which is very good. I usually
do it when debugging hard-to-debug testsuite problem, especially
ones which I do not know intimately, written by somebody else,
like this:
sh -x tXXXX-that-test.sh -i
The -i option makes it immediately stop at the first test failure.
-- >8 --
diff --git a/git-rm.sh b/git-rm.sh
index fda4541..622ffca 100755
--- a/git-rm.sh
+++ b/git-rm.sh
@@ -43,6 +43,8 @@ case "$#" in
;;
esac
+set -x
+
if test -f "$GIT_DIR/info/exclude"
then
git-ls-files -z \
^ permalink raw reply related
* Re: Test fails on ubuntu breezy
From: Aneesh Kumar @ 2006-04-15 7:33 UTC (permalink / raw)
To: Junio C Hamano; +Cc: linux, Peter Eriksen, git, Carl Worth
In-Reply-To: <cc723f590604142347p7646aa40r52506a0d85b7d817@mail.gmail.com>
On 4/15/06, Aneesh Kumar <aneesh.kumar@gmail.com> wrote:
> I am still having failure with the top of the tree. I guess it is
> because git rm exit with status 0.
>
> kvaneesh@home:/tmp/test$ git rm -f a
> rm: cannot remove `a': Permission denied
> kvaneesh@home:/tmp/test$ echo $?
> 0
>
I think it is xargs
kvaneesh@home:/tmp/test$ echo a | xargs rm
rm: cannot remove `a': Permission denied
kvaneesh@home:/tmp/test$ echo $?
0
kvaneesh@home:/tmp/test$
on ubuntu Dapper it returns 123 status. I will file a bug report
against xargs.
-aneesh
^ permalink raw reply
* Re: Recent unresolved issues
From: Junio C Hamano @ 2006-04-15 8:57 UTC (permalink / raw)
To: Linus Torvalds; +Cc: git
In-Reply-To: <7vu08vjra5.fsf@assigned-by-dhcp.cox.net>
Junio C Hamano <junkio@cox.net> writes:
> Although I've already decided to merge it up, there are small
> fallout from this. I've fixed the ones I noticed, but there
> probably remain some backward compatibility issues in commands
> that I do not usually use. We'll see.
I am very to sorry to say this, but...
Pain
"git log" wants default abbrev (to show Merge: lines and
"whatchanged -r" output compactly) while "git diff-tree -r" by
default wants to show full SHA1 unless asked, which means
"memset(revs, 0, sizeof(*revs))" in revision.c::init_revisions()
needs to be defeated by the caller.
"git rev-list" wants to know if any --pretty was specified to
set verbose_header, but there is no way to tell if the user did
not say anything or said --pretty because revs->commit_format
will be CMIT_FMT_DEFAULT either way. This is the worst breakage
I found so far -- "git rev-list --pretty" no longer works,
although "git rev-list --header" works so you probably did not
notice the breakage with gitk.
Honestly, the longer I look at it, the more I feel that this way
might break more things than it fixes. I haven't even looked at
blame.c or http-push.c to see what's broken yet.
^ permalink raw reply
* [WISH] prepend diffstat in front of the patch
From: Marco Costalba @ 2006-04-15 9:07 UTC (permalink / raw)
To: Johannes.Schindelin; +Cc: junkio, git
>From today git tree
$ git-diff-tree -r -c -p --stat 84981f9
84981f9ad963f050abf4fe33ac07d36b4ea90c6d
---
diff.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
$ git-diff-tree -r -c --stat -p 84981f9
84981f9ad963f050abf4fe33ac07d36b4ea90c6d
diff --git a/diff.c b/diff.c
index c120239..f1b672d 100644
--- a/diff.c
+++ b/diff.c
@@ -438,8 +438,8 @@ static void builtin_diffstat(const char
xdemitcb_t ecb;
xpp.flags = XDF_NEED_MINIMAL;
- xecfg.ctxlen = 3;
- xecfg.flags = XDL_EMIT_FUNCNAMES;
+ xecfg.ctxlen = 0;
+ xecfg.flags = 0;
ecb.outf = xdiff_outf;
ecb.priv = diffstat;
xdl_diff(&mf1, &mf2, &xpp, &xecfg, &ecb);
Perhaps I missed something, but I would like to see --stat and -p as
_cumulative_ options .
Would be great if git-diff-tree -r -c --stat -p 84981f9 prepends
diffstat in front of the patch as Junio suggested some days ago.
Is it already planned?
Thanks
Marco
^ permalink raw reply related
* Re: [WISH] prepend diffstat in front of the patch
From: Junio C Hamano @ 2006-04-15 9:16 UTC (permalink / raw)
To: Marco Costalba; +Cc: git
In-Reply-To: <e5bfff550604150207h6fdb0042x3a9bbfa63269a8c8@mail.gmail.com>
"Marco Costalba" <mcostalba@gmail.com> writes:
> Perhaps I missed something, but I would like to see --stat and -p as
> _cumulative_ options .
Yes, you missed my write-up on "Recent unresolved issues",
especially this entry:
* Message-ID: <7vek02ynif.fsf@assigned-by-dhcp.cox.net>
diff --with-raw, --with-stat? (me)
and the thread that introduced the --stat option.
It is also what I want, but there is only 24 hours in a day and
there is this thing called day-job.
^ permalink raw reply
* Re: [WISH] prepend diffstat in front of the patch
From: Marco Costalba @ 2006-04-15 9:23 UTC (permalink / raw)
To: Junio C Hamano; +Cc: git
In-Reply-To: <7vejzzi4ft.fsf@assigned-by-dhcp.cox.net>
On 4/15/06, Junio C Hamano <junkio@cox.net> wrote:
> "Marco Costalba" <mcostalba@gmail.com> writes:
>
> > Perhaps I missed something, but I would like to see --stat and -p as
> > _cumulative_ options .
>
> Yes, you missed my write-up on "Recent unresolved issues",
> especially this entry:
>
> * Message-ID: <7vek02ynif.fsf@assigned-by-dhcp.cox.net>
> diff --with-raw, --with-stat? (me)
>
> and the thread that introduced the --stat option.
>
> It is also what I want, but there is only 24 hours in a day and
> there is this thing called day-job.
>
Sorry, I didn't mean to force anything, just asking.
Day-job thing is not unknown to me too.
Marco
^ permalink raw reply
* Re: git-svn and Author files question
From: Rutger Nijlunsing @ 2006-04-15 9:25 UTC (permalink / raw)
To: Seth Falcon; +Cc: git
In-Reply-To: <m21wvzx5e6.fsf@ziti.fhcrc.org>
On Fri, Apr 14, 2006 at 01:34:57PM -0700, Seth Falcon wrote:
> Hi all,
>
> I've been using git to manually track changes to a project that uses
> svn as its primary SCM.
>
> git-svn looks like it can help me streamline my workflow, but I'm
> getting stuck with the following:
>
> mkdir foo
> cd foo
> git-svn init $URL <--- the svn URL
> git-svn fetch
> Author: dfcimm3 not defined in file
>
> :-(
>
> Can someone point me to the file and the place that describes what I
> should put in it? There are many committers to the svn project. I'm
> hoping that I will not have to enumerate all of their names in some
> file.
I'm not familiar with git-svn, but the $GIT_DIR/svn-authors file used
by git-svnimport.perl and
http://www.wingding.demon.nl/git-svnconvert.rb contains lines like:
svn-author = Full Name <email@domain>
And yes, you've got to enumerate the names you want
transformed. Another option is to give no authors, but then the SVN
author names will be used (with email 'unknown' or something).
--
Rutger Nijlunsing ---------------------------------- eludias ed dse.nl
never attribute to a conspiracy which can be explained by incompetence
----------------------------------------------------------------------
^ permalink raw reply
* [PATCH] diff-options: add --patch-with-stat
From: Johannes Schindelin @ 2006-04-15 11:41 UTC (permalink / raw)
To: git, junkio
With this option, git prepends a diffstat in front of the patch.
Since I really, really do not know what a diffstat of a combined diff
("merge diff") should look like, the diffstat is not generated for these.
Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
---
Buggeth, and you shall be given.
BTW I really would like to have a diffstat for combined diffs.
Any ideas?
Documentation/diff-options.txt | 3 +++
diff.c | 17 ++++++++++++++++-
diff.h | 3 +++
3 files changed, 22 insertions(+), 1 deletions(-)
c06cf94fe5a2f0b004e7b46c0322554e7ec4ff99
diff --git a/Documentation/diff-options.txt b/Documentation/diff-options.txt
index 447e522..c183dc9 100644
--- a/Documentation/diff-options.txt
+++ b/Documentation/diff-options.txt
@@ -10,6 +10,9 @@
--stat::
Generate a diffstat instead of a patch.
+--patch-with-stat::
+ Generate patch and prepend its diffstat.
+
-z::
\0 line termination on output
diff --git a/diff.c b/diff.c
index f1b672d..1b33465 100644
--- a/diff.c
+++ b/diff.c
@@ -1049,6 +1049,10 @@ int diff_opt_parse(struct diff_options *
}
else if (!strcmp(arg, "--stat"))
options->output_format = DIFF_FORMAT_DIFFSTAT;
+ else if (!strcmp(arg, "--patch-with-stat")) {
+ options->output_format = DIFF_FORMAT_PATCH;
+ options->with_stat = 1;
+ }
else if (!strcmp(arg, "-z"))
options->line_termination = 0;
else if (!strncmp(arg, "-l", 2))
@@ -1518,7 +1522,7 @@ void diff_flush(struct diff_options *opt
int diff_output_format = options->output_format;
struct diffstat_t *diffstat = NULL;
- if (diff_output_format == DIFF_FORMAT_DIFFSTAT) {
+ if (diff_output_format == DIFF_FORMAT_DIFFSTAT || options->with_stat) {
diffstat = xcalloc(sizeof (struct diffstat_t), 1);
diffstat->xm.consume = diffstat_consume;
}
@@ -1530,6 +1534,17 @@ void diff_flush(struct diff_options *opt
}
putchar(options->line_termination);
}
+ if (options->with_stat) {
+ for (i = 0; i < q->nr; i++) {
+ struct diff_filepair *p = q->queue[i];
+ flush_one_pair(p, DIFF_FORMAT_DIFFSTAT, options,
+ diffstat);
+ }
+ show_stats(diffstat);
+ free(diffstat);
+ diffstat = NULL;
+ putchar(options->line_termination);
+ }
for (i = 0; i < q->nr; i++) {
struct diff_filepair *p = q->queue[i];
flush_one_pair(p, diff_output_format, options, diffstat);
diff --git a/diff.h b/diff.h
index 2f8aff2..f783bae 100644
--- a/diff.h
+++ b/diff.h
@@ -25,6 +25,7 @@ struct diff_options {
const char *pickaxe;
unsigned recursive:1,
with_raw:1,
+ with_stat:1,
tree_in_recursive:1,
full_index:1;
int break_opt;
@@ -120,6 +121,8 @@ #define COMMON_DIFF_OPTIONS_HELP \
" --patch-with-raw\n" \
" output both a patch and the diff-raw format.\n" \
" --stat show diffstat instead of patch.\n" \
+" --patch-with-stat\n" \
+" output a patch and prepend its diffstat.\n" \
" --name-only show only names of changed files.\n" \
" --name-status show names and status of changed files.\n" \
" --full-index show full object name on index lines.\n" \
--
1.3.0.rc4.ga1167e-dirty
^ permalink raw reply related
* Re: Recent unresolved issues
From: Johannes Schindelin @ 2006-04-15 11:46 UTC (permalink / raw)
To: Junio C Hamano; +Cc: git
In-Reply-To: <7vk69ri5cp.fsf@assigned-by-dhcp.cox.net>
Hi,
On Sat, 15 Apr 2006, Junio C Hamano wrote:
> Honestly, the longer I look at it, the more I feel that this way
> might break more things than it fixes. I haven't even looked at
> blame.c or http-push.c to see what's broken yet.
I do not have time to look at this closely, but it sounds to me like you
need a two-stage approach:
setup_diff_options(&options);
[... set defaults ...]
handle_cmdline_arguments(&options);
[... possibly check if the user overrode some defaults ...]
I think that the unified option parsing is the right approach.
Ciao,
Dscho
^ permalink raw reply
* Re: [WISH] prepend diffstat in front of the patch
From: Johannes Schindelin @ 2006-04-15 11:48 UTC (permalink / raw)
To: Marco Costalba; +Cc: git
In-Reply-To: <e5bfff550604150207h6fdb0042x3a9bbfa63269a8c8@mail.gmail.com>
Hi,
On Sat, 15 Apr 2006, Marco Costalba wrote:
> Perhaps I missed something, but I would like to see --stat and -p as
> _cumulative_ options .
>
> Would be great if git-diff-tree -r -c --stat -p 84981f9 prepends
> diffstat in front of the patch as Junio suggested some days ago.
>
> Is it already planned?
We are a little impatient, aren't we?
Anyway, as you probably saw already, I sent out a patch which does that. I
wanted to wait a little to introduce it, because I had the feeling that
the option parsing would be volatile for a few days.
Ciao,
Dscho
^ permalink raw reply
* Re: [PATCH] diff-options: add --patch-with-stat
From: Marco Costalba @ 2006-04-15 11:50 UTC (permalink / raw)
To: Johannes Schindelin; +Cc: git, junkio
In-Reply-To: <Pine.LNX.4.63.0604151340210.24303@wbgn013.biozentrum.uni-wuerzburg.de>
On 4/15/06, Johannes Schindelin <Johannes.Schindelin@gmx.de> wrote:
>
> With this option, git prepends a diffstat in front of the patch.
>
Thanks! qgit will set this as default!
>
> Buggeth, and you shall be given.
>
> BTW I really would like to have a diffstat for combined diffs.
> Any ideas?
>
Well..hem..why do not count the (shifted) + and - in the combined diffs ouput?
I suspect this can be a total idiocy, but now I'm missing why. :-)
Marco
^ permalink raw reply
* Re: [WISH] prepend diffstat in front of the patch
From: Johannes Schindelin @ 2006-04-15 11:51 UTC (permalink / raw)
To: Junio C Hamano; +Cc: git
In-Reply-To: <7vejzzi4ft.fsf@assigned-by-dhcp.cox.net>
Hi,
On Sat, 15 Apr 2006, Junio C Hamano wrote:
> [... speaking about --patch-with-stat ...]
>
> It is also what I want, but there is only 24 hours in a day and
> there is this thing called day-job.
I want to add that there is a real life also, and that in a few parts of
this lovely world, there is Easter right now.
And most importantly: an itch like that is a great opportunity for
non-veterans to get involved with git.
Ciao,
Dscho
^ permalink raw reply
* Re: [PATCH] diff-options: add --patch-with-stat
From: Johannes Schindelin @ 2006-04-15 11:56 UTC (permalink / raw)
To: Marco Costalba; +Cc: git
In-Reply-To: <e5bfff550604150450u37ce1660u2db4f6e97c586e13@mail.gmail.com>
Hi,
On Sat, 15 Apr 2006, Marco Costalba wrote:
> On 4/15/06, Johannes Schindelin <Johannes.Schindelin@gmx.de> wrote:
>
> > BTW I really would like to have a diffstat for combined diffs.
> > Any ideas?
>
> Well..hem..why do not count the (shifted) + and - in the combined diffs
> ouput?
This does not help. The combined diff is so useful, because it contains
the information as to which parent has this difference, and which parent
has not.
By just counting the plusses and minusses, this information is filtered
out.
Ciao,
Dscho
^ permalink raw reply
* log/diff option parsing unification
From: Junio C Hamano @ 2006-04-15 12:04 UTC (permalink / raw)
To: Linus Torvalds; +Cc: git
Linus,
I kept your log/diff option parsing stuff with a few fixups for
about 3 hours in the "next" branch, but dropped and replaced
them with an alternative with lesser impact. I freely admit
that what you write is nicer and cleaner than what I do 99.9% of
the time, but I think this time it is justified. We have been
telling people that their scripts can expect certain output
format out of the lowest level Plumbing such as rev-list and
diff-tree. I just do not want to break it, and doing things
with very unified way seemed to be too much hassle to keep
everything compatible.
On the other hand, I am much more relaxed if 'git-log' and
'git-whatchanged' output are not bit-for-bit identical to their
shell script versions. You (not "Linus, you" but figuratively
you) would be crazy if you have been feeding their output to
your own scripts with such an expectation. The rule-of-thumb I
apply here is that anything that has built-in pager is primarily
for human consumption, and the stability of its output format is
a fair game, especially when the modified behaviour results in
better output for humans.
I might regret this later when we try to do the internal "git
diff", but it is already tomorrow morning now, so I'll crash
first.
This option parsing unification will be post 1.3.0, but it is
important enough that I suspect it will be the first topic to be
merged and disrupt the "master" branch for a while after 1.3.0.
^ permalink raw reply
* Re: [WISH] prepend diffstat in front of the patch
From: Junio C Hamano @ 2006-04-15 12:12 UTC (permalink / raw)
To: Johannes Schindelin; +Cc: git
In-Reply-To: <Pine.LNX.4.63.0604151346270.25269@wbgn013.biozentrum.uni-wuerzburg.de>
Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:
> Anyway, as you probably saw already, I sent out a patch which does that. I
> wanted to wait a little to introduce it, because I had the feeling that
> the option parsing would be volatile for a few days.
Thanks for the consideration, but that's what topic branches are
for ;-).
Seriously, even the unified one (either Linus's or mine) handed
diff option parsing to an established function that is identical
to the "master" version, so the --patch-with-stat is probably a
no-impact merge.
JC "What's Easter" Hamano ;-)
^ permalink raw reply
* Re: [WISH] prepend diffstat in front of the patch
From: Johannes Schindelin @ 2006-04-15 12:30 UTC (permalink / raw)
To: Junio C Hamano; +Cc: git
In-Reply-To: <7vfykfghqs.fsf@assigned-by-dhcp.cox.net>
Hi,
On Sat, 15 Apr 2006, Junio C Hamano wrote:
> JC "What's Easter" Hamano ;-)
Just for the record: According to Douglas Adams, nearly two thousand years
ago, one man has been nailed to a tree for saying how great it would be to
be nice to people for a change. That's what Christians try to remember on
Easter.
Ciao,
Dscho
^ permalink raw reply
* Re: [PATCH] diff-options: add --patch-with-stat
From: Junio C Hamano @ 2006-04-15 12:33 UTC (permalink / raw)
To: Johannes Schindelin; +Cc: git
In-Reply-To: <Pine.LNX.4.63.0604151340210.24303@wbgn013.biozentrum.uni-wuerzburg.de>
Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:
> BTW I really would like to have a diffstat for combined diffs.
> Any ideas?
While I think combined diffs are somewhat overrated, I think
what makes some sense would be to count --cc output for each
parent's column, and show something like this:
Makefile | +- +-
debian/changelog | ++++++ ++++++++++++++++++++
2 files changed, 7 and 91 insertions(+), 1 and 0 deletions(-)
This is for "diff-tree --cc v1.0.0"; the hand-merge (or evil
merge) changed from first parent 7(+),1(-) and from second
parent 91(+),0(-) respectively.
Count the maximum change per each parent (the above example the
second file has the max for both parents but that may not always
be the case), add them up to determine how many columns to
allocate for each parent (while taking one column gap between
each parent into account) and draw normally.
The code that counted this (I did not write code to draw it) is
like this:
-- >8 --
#!/usr/bin/perl
use strict;
my $filename;
my $num_parents = -1;
my %stat;
while (<>) {
chomp;
if (/^diff --cc (.*)$/) {
$filename = $1;
$stat{$filename} = undef;
next;
}
if (/^(\@+) [-+0-9, ]* \1$/) {
$num_parents = length($1) - 1;
next;
}
next unless (/^([- +]{$num_parents})/);
my @pfx = split('', $1);
if (!defined $stat{$filename}) {
$stat{$filename} = [];
for (my $i = 0; $i < $num_parents; $i++) {
push @{$stat{$filename}}, [0, 0];
}
}
for (my $i = 0; $i < $num_parents; $i++) {
if ($pfx[$i] eq '+') {
$stat{$filename}[$i][0]++;
}
if ($pfx[$i] eq '-') {
$stat{$filename}[$i][1]++;
}
}
}
for my $filename (sort keys %stat) {
print "$filename ";
for (my $i = 0; $i < $num_parents; $i++) {
printf " +%d/-%d",
$stat{$filename}[$i][0], $stat{$filename}[$i][1];
}
print "\n";
}
^ permalink raw reply
* Re: [PATCH] diff-options: add --patch-with-stat
From: Johannes Schindelin @ 2006-04-15 12:37 UTC (permalink / raw)
To: Junio C Hamano; +Cc: git
In-Reply-To: <7v64lbggrd.fsf@assigned-by-dhcp.cox.net>
Hi,
On Sat, 15 Apr 2006, Junio C Hamano wrote:
> Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:
>
> > BTW I really would like to have a diffstat for combined diffs.
> > Any ideas?
>
> While I think combined diffs are somewhat overrated, I think
> what makes some sense would be to count --cc output for each
> parent's column, and show something like this:
>
> Makefile | +- +-
> debian/changelog | ++++++ ++++++++++++++++++++
> 2 files changed, 7 and 91 insertions(+), 1 and 0 deletions(-)
Okay. That is a start, altough it will look funny with 12 parents...
I'll do some hacking while you're sleeping.
Ciao,
Dscho
^ permalink raw reply
* Re: [PATCH] diff-options: add --patch-with-stat
From: Marco Costalba @ 2006-04-15 13:01 UTC (permalink / raw)
To: Johannes Schindelin; +Cc: Junio C Hamano, git
In-Reply-To: <Pine.LNX.4.63.0604151436280.6147@wbgn013.biozentrum.uni-wuerzburg.de>
On 4/15/06, Johannes Schindelin <Johannes.Schindelin@gmx.de> wrote:
> Hi,
>
> On Sat, 15 Apr 2006, Junio C Hamano wrote:
>
> > Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:
> >
> > > BTW I really would like to have a diffstat for combined diffs.
> > > Any ideas?
> >
Just another idea, from current git:
$ git-diff-tree -r -m --stat 4da8cbc23
4da8cbc234177d6a8cf749d4ef60bd05ec843898
---
blame.c | 20 ++++++++++++++------
diff-tree.c | 2 +-
diff.h | 6 +++++-
git.c | 15 +++++++++++++--
http-push.c | 1 +
rev-list.c | 1 +
revision.c | 26 ++++++++++++--------------
revision.h | 7 +++++--
tree-diff.c | 46 +++++++++++++++++++++++++---------------------
9 files changed, 77 insertions(+), 47 deletions(-)
4da8cbc234177d6a8cf749d4ef60bd05ec843898
---
Documentation/diff-options.txt | 3 +
Documentation/git-apply.txt | 8 ++-
Makefile | 14 ++++-
apply.c | 123 ++++++++++++++++++++++++++++++++++------
combine-diff.c | 12 ++++
diff.c | 83 ++++++++++++++++-----------
diff.h | 3 +
http-fetch.c | 8 +--
http-push.c | 6 +-
9 files changed, 199 insertions(+), 61 deletions(-)
$ git-diff-tree -r -c 4da8cbc23
4da8cbc234177d6a8cf749d4ef60bd05ec843898
::100644 100644 100644 c5372b984a457d0e5bddcf0b334a1a3cdc149cec
cc7cc627c88d135c3f8d814449813e73c1ea3430
236095fc9a1a6ffc056be8616c0f83e4e8c7ec2f MM diff.h
::100644 100644 100644 994ee90035c4ae5e055df79cea8621d294190a3f
aa0bc1f6f6a51fb39d54dc81b93805f86d19aa46
19a0f772e7bf729755c66ab38f5dfb64ae784f00 MM http-push.c
PROPOSED OUTPUT:
$ git-diff-tree -r -c --stat 4da8cbc23
4da8cbc234177d6a8cf749d4ef60bd05ec843898
---
diff.h | 6 +++++-
http-push.c | 1 +
2 files changed, 6 insertions(+), 1 deletions(-)
4da8cbc234177d6a8cf749d4ef60bd05ec843898
---
diff.h | 3 +++
http-push.c | 6 +++---
2 files changed, 6 insertions(+), 3 deletions(-)
I agree Junio ouput is nicer, this one is perhaps more consistent with
git-diff-tree -m --stat output.
Marco
^ permalink raw reply
* [RFC/PATCH] pager: do not fork a pager if environment variable PAGER is set to NONE
From: Johannes Schindelin @ 2006-04-15 13:16 UTC (permalink / raw)
To: git
This helps debugging tremendously.
Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
---
| 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
a91a9371e117555a03cfe7d24515787fb13005b6
--git a/pager.c b/pager.c
index 1364e15..1136adf 100644
--- a/pager.c
+++ b/pager.c
@@ -5,9 +5,8 @@ #include "cache.h"
* something different on Windows, for example.
*/
-static void run_pager(void)
+static void run_pager(const char *prog)
{
- const char *prog = getenv("PAGER");
if (!prog)
prog = "less";
setenv("LESS", "-S", 0);
@@ -16,10 +15,11 @@ static void run_pager(void)
void setup_pager(void)
{
+ const char *prog = getenv("PAGER");
pid_t pid;
int fd[2];
- if (!isatty(1))
+ if (!isatty(1) || (prog != NULL && !strcmp(prog, "NONE")))
return;
if (pipe(fd) < 0)
return;
@@ -43,6 +43,6 @@ void setup_pager(void)
close(fd[0]);
close(fd[1]);
- run_pager();
+ run_pager(prog);
exit(255);
}
--
1.3.0.rc4.g667c
^ permalink raw reply related
* Re: Test fails on ubuntu breezy
From: Aneesh Kumar @ 2006-04-15 15:43 UTC (permalink / raw)
To: Junio C Hamano; +Cc: git
In-Reply-To: <7vbqv3jo77.fsf@assigned-by-dhcp.cox.net>
On 4/15/06, Junio C Hamano <junkio@cox.net> wrote:
> "Aneesh Kumar" <aneesh.kumar@gmail.com> writes:
>
> > I am still having failure with the top of the tree. I guess it is
> > because git rm exit with status 0.
>
> Please don't guess, but validate (I know you are capable of
> doing so).
>
>
I did :). I sent another mail explaining it is xargs in breezy. I also
filed a bug. But they are not going to fix it in breezy. The below is
the response i got.
"As Ubuntu Breezy is a released probuct, only security-related fixes
are accepted. If you think this fix is important enough, you could
discuss the issue with the maintainers of Ubuntu backports, and see if
they are interested in making a backport available: "
Right now i am commenting out the test case to build the .deb file.
-aneesh
^ permalink raw reply
* Help please :-)
From: Paolo Ciarrocchi @ 2006-04-15 16:08 UTC (permalink / raw)
To: Git Mailing List
Hi all,
I'm used to keep updated my linux tree with cg-status,
I did that this morning but now I see the following:
paolo@Italia:~/linux-2.6$ cg-status
Heads:
>master 2c5362007bc0a46461a9d94958cdd53bb027004c
R origin 2c5362007bc0a46461a9d94958cdd53bb027004c
? arch/i386/kernel/smpboot.c.rej
? drivers/md/dm-stripe.c.rej
? drivers/net/chelsio/sge.c.rej
? drivers/net/e100.c.rej
? drivers/net/e1000/e1000_main.c.rej
? fs/9p/vfs_dir.c.rej
? fs/nfsctl.c.rej
? kernel/fork.c.rej
? kernel/posix-timers.c.rej
? kernel/timer.c.rej
? mm/memory.c.rej
? mm/mempolicy.c.rej
? mm/swap.c.rej
? net/ieee80211/ieee80211_crypt_ccmp.c.rej
? net/ieee80211/ieee80211_rx.c.rej
? scripts/kconfig/lkc_defs.h
? scripts/mod/modpost.c.rej
paolo@Italia:~/linux-2.6$ cg-diff
I'm a bit lost, the tree is correctly updated, no error message but
why I see all these .rej?
And how can I fix this problem?
git reset and cg-reset don't help...
Thanks!
--
Paolo
http://paolociarrocchi.googlepages.com
^ permalink raw reply
* Re: Recent unresolved issues
From: Linus Torvalds @ 2006-04-15 16:59 UTC (permalink / raw)
To: Junio C Hamano; +Cc: git
In-Reply-To: <7vk69ri5cp.fsf@assigned-by-dhcp.cox.net>
On Sat, 15 Apr 2006, Junio C Hamano wrote:
>
> Pain
>
> "git log" wants default abbrev (to show Merge: lines and
> "whatchanged -r" output compactly) while "git diff-tree -r" by
> default wants to show full SHA1 unless asked, which means
> "memset(revs, 0, sizeof(*revs))" in revision.c::init_revisions()
> needs to be defeated by the caller.
I'd suggest just moving the call to "init_revisions()" out from
"setup_revisions()" entirely.
So the calling sequence would be something like this:
init_revisions(&rev);
.. any localized setup ..
setup_revisions(&rev);
which isn't really all that painful, and allows us maximal flexibility for
different defaults etc.
Linus
^ 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