* [PATCH] builtin-log: respect diff configuration options
From: Eric Wong @ 2006-07-07 10:10 UTC (permalink / raw)
To: Junio C Hamano; +Cc: git, Eric Wong
In-Reply-To: <11522670473116-git-send-email-normalperson@yhbt.net>
The log commands are all capable of generating diffs, so we
should respect those configuration options for diffs here.
Signed-off-by: Eric Wong <normalperson@yhbt.net>
---
builtin-log.c | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/builtin-log.c b/builtin-log.c
index 864c6cd..698b71e 100644
--- a/builtin-log.c
+++ b/builtin-log.c
@@ -47,6 +47,7 @@ int cmd_whatchanged(int argc, const char
{
struct rev_info rev;
+ git_config(git_diff_config);
init_revisions(&rev);
rev.diff = 1;
rev.diffopt.recursive = 1;
@@ -61,6 +62,7 @@ int cmd_show(int argc, const char **argv
{
struct rev_info rev;
+ git_config(git_diff_config);
init_revisions(&rev);
rev.diff = 1;
rev.diffopt.recursive = 1;
@@ -77,6 +79,7 @@ int cmd_log(int argc, const char **argv,
{
struct rev_info rev;
+ git_config(git_diff_config);
init_revisions(&rev);
rev.always_show_header = 1;
cmd_log_init(argc, argv, envp, &rev);
@@ -102,7 +105,7 @@ static int git_format_config(const char
strcat(extra_headers, value);
return 0;
}
- return git_default_config(var, value);
+ return git_diff_config(var, value);
}
@@ -234,6 +237,7 @@ int cmd_format_patch(int argc, const cha
struct diff_options patch_id_opts;
char *add_signoff = NULL;
+ git_config(git_format_config);
init_revisions(&rev);
rev.commit_format = CMIT_FMT_EMAIL;
rev.verbose_header = 1;
@@ -243,7 +247,6 @@ int cmd_format_patch(int argc, const cha
rev.diffopt.msg_sep = "";
rev.diffopt.recursive = 1;
- git_config(git_format_config);
rev.extra_headers = extra_headers;
/*
--
1.4.1.g3dc65
^ permalink raw reply related
* Re: [PATCH] diff.c: respect diff.renames config option
From: Junio C Hamano @ 2006-07-07 10:22 UTC (permalink / raw)
To: Eric Wong; +Cc: git
In-Reply-To: <11522670473116-git-send-email-normalperson@yhbt.net>
Eric Wong <normalperson@yhbt.net> writes:
> diff.renames is mentioned several times in the documentation,
> but to my surprise it didn't do anything before this patch.
I am really reluctant to do this at this low-level, especially
since there is no way to defeat the settings from the command
line.
> @@ -120,6 +121,16 @@ int git_diff_config(const char *var, con
> diff_use_color_default = git_config_bool(var, value);
> return 0;
> }
> + if (!strcmp(var, "diff.renames")) {
> + if (!value)
> + diff_detect_rename_default = DIFF_DETECT_RENAME;
> + else if (!strcasecmp(value, "copies") ||
> + !strcasecmp(value, "copy"))
> + diff_detect_rename_default = DIFF_DETECT_COPY;
> + else
> + diff_detect_rename_default = git_config_bool(var,value);
> + return 0;
> + }
I suspect this works only because DIFF_DETECT_RENAME happens to
be 1?
^ permalink raw reply
* [PATCH] Do not drop data from '\0' until eol in patch output
From: Stephan Feder @ 2006-07-07 10:33 UTC (permalink / raw)
To: git
The binary file detection is just a heuristic which can well fail.
Do not produce garbage patches in these cases.
Signed-off-by: Stephan Feder <sf@b-i-t.de>
---
diff.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/diff.c b/diff.c
index 507e401..f0450a8 100644
--- a/diff.c
+++ b/diff.c
@@ -329,7 +329,9 @@ static void fn_out_consume(void *priv, c
}
if (len > 0 && line[len-1] == '\n')
len--;
- printf("%s%.*s%s\n", set, (int) len, line, reset);
+ fputs (set, stdout);
+ fwrite (line, len, 1, stdout);
+ puts (reset);
}
static char *pprint_rename(const char *a, const char *b)
--
1.4.1.gbc483
^ permalink raw reply related
* [PATCH] Teach --text option to diff
From: Stephan Feder @ 2006-07-07 10:33 UTC (permalink / raw)
To: git
Add new item text to struct diff_options.
If set then do not try to detect binary files.
Signed-off-by: Stephan Feder <sf@b-i-t.de>
---
I have to send patches of binary data to a customer but the builtin diff
was no help in this case.
Notes:
1. The shorthand -a for --text is not implemented. Is there a conflicting
shorthand?
2. For diffstat --text is ignored. It seems pointless because binary
patch data is not for human consumption anyway.
3. No documentation yet. If the patch is accepted I will add a short
description. To Documentation/diff-options.txt?
Regards
Stephan
diff.c | 5 ++++-
diff.h | 1 +
2 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/diff.c b/diff.c
index f0450a8..1f0219d 100644
--- a/diff.c
+++ b/diff.c
@@ -723,7 +723,7 @@ static void builtin_diff(const char *nam
if (fill_mmfile(&mf1, one) < 0 || fill_mmfile(&mf2, two) < 0)
die("unable to read files to diff");
- if (mmfile_is_binary(&mf1) || mmfile_is_binary(&mf2)) {
+ if (!o->text && (mmfile_is_binary(&mf1) || mmfile_is_binary(&mf2))) {
/* Quite common confusing case */
if (mf1.size == mf2.size &&
!memcmp(mf1.ptr, mf2.ptr, mf1.size))
@@ -1561,6 +1561,9 @@ int diff_opt_parse(struct diff_options *
options->output_format |= DIFF_FORMAT_PATCH;
options->full_index = options->binary = 1;
}
+ else if (!strcmp(arg, "--text")) {
+ options->text = 1;
+ }
else if (!strcmp(arg, "--name-only"))
options->output_format |= DIFF_FORMAT_NAME;
else if (!strcmp(arg, "--name-status"))
diff --git a/diff.h b/diff.h
index d557394..f80f646 100644
--- a/diff.h
+++ b/diff.h
@@ -42,6 +42,7 @@ struct diff_options {
unsigned recursive:1,
tree_in_recursive:1,
binary:1,
+ text:1,
full_index:1,
silent_on_remove:1,
find_copies_harder:1,
--
1.4.1.gbc483
^ permalink raw reply related
* Re: [PATCH] builtin-log: respect diff configuration options
From: Junio C Hamano @ 2006-07-07 10:43 UTC (permalink / raw)
To: Eric Wong; +Cc: git
In-Reply-To: <11522670482020-git-send-email-normalperson@yhbt.net>
Eric Wong <normalperson@yhbt.net> writes:
> The log commands are all capable of generating diffs, so we
> should respect those configuration options for diffs here.
>
> Signed-off-by: Eric Wong <normalperson@yhbt.net>
Makes sense. This makes "git log -p" more colorful ;-).
^ permalink raw reply
* Re: [PATCH] Do not drop data from '\0' until eol in patch output
From: Junio C Hamano @ 2006-07-07 10:52 UTC (permalink / raw)
To: Stephan Feder; +Cc: git
In-Reply-To: <1152268424350-git-send-email-sf@b-i-t.de>
Stephan Feder <sf@b-i-t.de> writes:
> The binary file detection is just a heuristic which can well fail.
> Do not produce garbage patches in these cases.
>
> Signed-off-by: Stephan Feder <sf@b-i-t.de>
Thanks.
I do not think this patch is _wrong_ per se, but I wonder what
you would use a patch like that for. Specifically, do you apply
such a patch with NUL and other binary data in it, and if so
what tool do you use?
^ permalink raw reply
* [BUGFIX][RESEND]git-cvsexportcommit can't handle merge commits correctly
From: Peter Baumann @ 2006-07-07 10:55 UTC (permalink / raw)
To: git; +Cc: Martin Langhoff, Junio C Hamano
git-cvsexportcommit should check if the parent (supplied on the cmdline) to use
for a merge commit is one of the real parents of the merge.
But it errors out if the _first_ parent doesn't match and never checks
the other parents.
Signed-off-by: Peter Baumann <siprbaum@stud.informatik.uni-erlangen.de>
---
This is a resend with an improved description, because my first attempt
didn't generate enough attention :-)
git-cvsexportcommit.perl | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/git-cvsexportcommit.perl b/git-cvsexportcommit.perl
index d1051d0..5dcb2f9 100755
--- a/git-cvsexportcommit.perl
+++ b/git-cvsexportcommit.perl
@@ -63,15 +63,15 @@ foreach my $p (@commit) {
}
if ($parent) {
+ my $found;
# double check that it's a valid parent
foreach my $p (@parents) {
- my $found;
if ($p eq $parent) {
$found = 1;
last;
}; # found it
- die "Did not find $parent in the parents for this commit!";
}
+ die "Did not find $parent in the parents for this commit!" if !$found;
} else { # we don't have a parent from the cmdline...
if (@parents == 1) { # it's safe to get it from the commit
$parent = $parents[0];
--
1.4.0
^ permalink raw reply related
* Re: [PATCH] Teach --text option to diff
From: Junio C Hamano @ 2006-07-07 11:06 UTC (permalink / raw)
To: Stephan Feder; +Cc: git
In-Reply-To: <11522684373987-git-send-email-sf@b-i-t.de>
Stephan Feder <sf@b-i-t.de> writes:
> I have to send patches of binary data to a customer but the builtin diff
> was no help in this case.
Given the previous patch, and also your point #2 below, I would
have expected you to introduce an option to force files to be
treated as binary even when they are otherwise misidentified as
text, but this patch is going the other way.
Interesting.
> 1. The shorthand -a for --text is not implemented. Is there a conflicting
> shorthand?
I do not think of one offhand, but it's the responsibility for
the party to propose such an enhancement to do the study ;-)
> 2. For diffstat --text is ignored. It seems pointless because binary
> patch data is not for human consumption anyway.
> 3. No documentation yet. If the patch is accepted I will add a short
> description. To Documentation/diff-options.txt?
Most likely that would be the place.
^ permalink raw reply
* Re: [PATCH 1/3] configure: Add test for Perl
From: Petr Baudis @ 2006-07-07 11:06 UTC (permalink / raw)
To: Timo Hirvonen; +Cc: Dennis Stosberg, git
In-Reply-To: <20060706161011.ccc2ea1c.tihirvon@gmail.com>
Dear diary, on Thu, Jul 06, 2006 at 03:10:11PM CEST, I got a letter
where Timo Hirvonen <tihirvon@gmail.com> said that...
> Dennis Stosberg <dennis@stosberg.net> wrote:
>
> > + echocheck "for perl"
> > + if test -z "$_perl" ; then
> > + _perl=`which perl`
> > + test "$_perl" || die "cannot find path to perl"
> > + fi
> > + echores "$_perl"
>
> "which" isn't portable. On SunOS 5.9 "which foo" prints error message to
> stdout and returns 0.
Wait, Git runs on SunOS 5.9?
--
Petr "Pasky" Baudis
Stuff: http://pasky.or.cz/
Snow falling on Perl. White noise covering line noise.
Hides all the bugs too. -- J. Putnam
^ permalink raw reply
* Re: [PATCH] diff.c: respect diff.renames config option
From: Junio C Hamano @ 2006-07-07 11:18 UTC (permalink / raw)
To: Eric Wong; +Cc: git
In-Reply-To: <20060707110123.GA23400@soma>
Eric Wong <normalperson@yhbt.net> writes:
> Nevertheless, it's still opt -in via repo-config, and most people will
> find renames useful unless they need to export to non-git
> systems.
I am more worried about somebody who opts-in finds breakage of
commands that happen to internally use low-level diff machinery
and expect the diff machinery does not automagically do funny
rename detection without being told.
For example, revision walking with path pruning uses diff
machinery without renames. I do not know what happens if I
override it with diff.renames to allow rename detection but I
fear something might horribly break.
That is why I said I do not want this at _that_ low level. I do
not have objections to have the configuration at a layer closer
to the UI, e.g. things in builtin-log.c and builtin-diff.c.
^ permalink raw reply
* Re: [PATCH] Do not drop data from '\0' until eol in patch output
From: sf @ 2006-07-07 11:18 UTC (permalink / raw)
To: git
In-Reply-To: <7vslld1ycq.fsf@assigned-by-dhcp.cox.net>
Junio C Hamano wrote:
> Stephan Feder <sf@b-i-t.de> writes:
>
>> The binary file detection is just a heuristic which can well fail.
>> Do not produce garbage patches in these cases.
>>
>> Signed-off-by: Stephan Feder <sf@b-i-t.de>
>
> Thanks.
>
> I do not think this patch is _wrong_ per se, but I wonder what
> you would use a patch like that for. Specifically, do you apply
> such a patch with NUL and other binary data in it, and if so
> what tool do you use?
>
GNU patch can apply patches with binary content which are typically
produced with GNU diff with --text option.
^ permalink raw reply
* Re: [PATCH 1/3] configure: Add test for Perl
From: Junio C Hamano @ 2006-07-07 11:20 UTC (permalink / raw)
To: Petr Baudis; +Cc: git
In-Reply-To: <20060707110655.GR29115@pasky.or.cz>
Petr Baudis <pasky@suse.cz> writes:
>> "which" isn't portable. On SunOS 5.9 "which foo" prints error message to
>> stdout and returns 0.
>
> Wait, Git runs on SunOS 5.9?
I thought so. In any case, the traditionalist way is to split $PATH
by hand with "IFS=:" -- somebody already posted that on this
thread.
^ permalink raw reply
* Re: [PATCH 1/3] configure: Add test for Perl
From: Timo Hirvonen @ 2006-07-07 11:23 UTC (permalink / raw)
To: Petr Baudis; +Cc: dennis, git
In-Reply-To: <20060707110655.GR29115@pasky.or.cz>
Petr Baudis <pasky@suse.cz> wrote:
> Dear diary, on Thu, Jul 06, 2006 at 03:10:11PM CEST, I got a letter
> where Timo Hirvonen <tihirvon@gmail.com> said that...
> > "which" isn't portable. On SunOS 5.9 "which foo" prints error message to
> > stdout and returns 0.
>
> Wait, Git runs on SunOS 5.9?
I have no idea. I noticed the problem with "which" when I ported my
cmus configure scripts to SunOS.
In the git Makefile there are:
ifeq ($(uname_S),SunOS)
...
ifeq ($(uname_R),5.8)
...
ifeq ($(uname_R),5.9)
so it at least tries to work ;) Oh and that 5.9 is apparently kernel
version, not OS version. Sorry for the confusion.
--
http://onion.dynserv.net/~timo/
^ permalink raw reply
* [PATCH] Makefile: export NO_SVN_TESTS
From: Johannes Schindelin @ 2006-07-07 11:26 UTC (permalink / raw)
To: git, junkio
Without this patch, it really is not sufficient to define NO_SVN_TESTS
in config.mak or the Makefile.
Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
---
Makefile | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/Makefile b/Makefile
index e5e536a..2aa0123 100644
--- a/Makefile
+++ b/Makefile
@@ -708,6 +708,7 @@ # However, the environment gets quite bi
# with that.
export NO_PYTHON
+export NO_SVN_TESTS
test: all
$(MAKE) -C t/ all
--
1.4.1.g2e7c-dirty
^ permalink raw reply related
* fatal: ambiguous argument '': unknown revision or path not in the working tree.
From: Michal Ludvig @ 2006-07-07 11:52 UTC (permalink / raw)
To: git
Hi all,
I'm getting this error from most cogito commands in my repository
(created with cg-init):
===
$ cg status
Heads:
>master 66ef937771695c865e38ff7227c077d9260759ce
? patches/series
fatal: ambiguous argument '': unknown revision or path not in the
working tree.
Use '--' to separate paths from revisions
===
I already have some commits and history in there that I'd prefer not to
loose. When I clone this repository the error disappears but I'd prefer
to fix it in place.
Any ideas?
Using cogito-0.17 and git-1.4.0
Thanks
Michal
^ permalink raw reply
* Re: [PATCH] Teach --text option to diff
From: sf @ 2006-07-07 11:53 UTC (permalink / raw)
To: git
In-Reply-To: <7v64i91xow.fsf@assigned-by-dhcp.cox.net>
Junio C Hamano wrote:
> Stephan Feder <sf@b-i-t.de> writes:
>
>> I have to send patches of binary data to a customer but the builtin diff
>> was no help in this case.
>
> Given the previous patch, and also your point #2 below, I would
> have expected you to introduce an option to force files to be
> treated as binary even when they are otherwise misidentified as
> text, but this patch is going the other way.
>
> Interesting.
Not really. I was surprised that the GNU diff option --text is
unsupported in the builtin diff.
>
>> 1. The shorthand -a for --text is not implemented. Is there a conflicting
>> shorthand?
>
> I do not think of one offhand, but it's the responsibility for
> the party to propose such an enhancement to do the study ;-)
Of course. I did not find any conflict but as the builtin diff and its
options are used by quite a lot of git commands I wanted to make sure.
If no objections arise I am going to add the shorthand.
>> 2. For diffstat --text is ignored. It seems pointless because binary
>> patch data is not for human consumption anyway.
>
>> 3. No documentation yet. If the patch is accepted I will add a short
>> description. To Documentation/diff-options.txt?
>
> Most likely that would be the place.
Good.
^ permalink raw reply
* Re: [PATCH] Do not drop data from '\0' until eol in patch output
From: Junio C Hamano @ 2006-07-07 12:03 UTC (permalink / raw)
To: sf; +Cc: git
In-Reply-To: <44AE431C.4090509@b-i-t.de>
sf <sf@b-i-t.de> writes:
> GNU patch can apply patches with binary content which are typically
> produced with GNU diff with --text option.
Hmph. Things must have improved since I looked at it the last
time, perhaps 6-7 years ago. I remember that I used "diff -a
-u0" as an el-cheapo way to deliber binary contents but found
that patch sometimes could not grok such, and ended up writing a
small customized C program.
^ permalink raw reply
* Re: [PATCH] diff.c: respect diff.renames config option
From: Junio C Hamano @ 2006-07-07 12:17 UTC (permalink / raw)
To: Eric Wong; +Cc: git
In-Reply-To: <7vpsghzmr1.fsf@assigned-by-dhcp.cox.net>
Junio C Hamano <junkio@cox.net> writes:
> I am more worried about somebody who opts-in finds breakage of
> commands that happen to internally use low-level diff machinery
> and expect the diff machinery does not automagically do funny
> rename detection without being told.
> ...
> That is why I said I do not want this at _that_ low level. I do
> not have objections to have the configuration at a layer closer
> to the UI, e.g. things in builtin-log.c and builtin-diff.c.
Upon closer look I think the revision pruning code is OK. So
let's cook this as is in "next" and see what happens.
^ permalink raw reply
* Re: [PATCH] diff.c: respect diff.renames config option
From: Junio C Hamano @ 2006-07-07 12:29 UTC (permalink / raw)
To: Eric Wong; +Cc: git
In-Reply-To: <7vpsghzmr1.fsf@assigned-by-dhcp.cox.net>
In the same spirit...
From: Junio C Hamano <junkio@cox.net>
Date: Fri, 7 Jul 2006 05:27:24 -0700
Subject: [PATCH] diff.c: --no-color to defeat diff.color configuration.
Signed-off-by: Junio C Hamano <junkio@cox.net>
---
diff.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/diff.c b/diff.c
index 2534fce..39e608f 100644
--- a/diff.c
+++ b/diff.c
@@ -1622,6 +1622,8 @@ int diff_opt_parse(struct diff_options *
}
else if (!strcmp(arg, "--color"))
options->color_diff = 1;
+ else if (!strcmp(arg, "--no-color"))
+ options->color_diff = 0;
else if (!strcmp(arg, "-w") || !strcmp(arg, "--ignore-all-space"))
options->xdl_opts |= XDF_IGNORE_WHITESPACE;
else if (!strcmp(arg, "-b") || !strcmp(arg, "--ignore-space-change"))
--
1.4.1.gfff4c
^ permalink raw reply related
* [PATCH] update Documentation/diff-options.txt
From: Junio C Hamano @ 2006-07-07 12:30 UTC (permalink / raw)
To: git
In-Reply-To: <7vpsghzmr1.fsf@assigned-by-dhcp.cox.net>
We've been lazy and left things undocumented for some time.
Signed-off-by: Junio C Hamano <junkio@cox.net>
---
Documentation/diff-options.txt | 24 +++++++++++++++++++++---
1 files changed, 21 insertions(+), 3 deletions(-)
diff --git a/Documentation/diff-options.txt b/Documentation/diff-options.txt
index f523ec2..fdcfd68 100644
--- a/Documentation/diff-options.txt
+++ b/Documentation/diff-options.txt
@@ -4,18 +4,21 @@
-u::
Synonym for "-p".
+--raw::
+ Generate the raw format.
+
--patch-with-raw::
- Generate patch but keep also the default raw diff output.
+ Synonym for "-p --raw".
--stat::
- Generate a diffstat instead of a patch.
+ Generate a diffstat.
--summary::
Output a condensed summary of extended header information
such as creations, renames and mode changes.
--patch-with-stat::
- Generate patch and prepend its diffstat.
+ Synonym for "-p --stat".
-z::
\0 line termination on output
@@ -26,11 +29,26 @@
--name-status::
Show only names and status of changed files.
+--color::
+ Show colored diff.
+
+--no-color::
+ Turn off colored diff, even when the configuration file
+ gives the default to color output.
+
+--no-renames::
+ Turn off rename detection, even when the configuration
+ file gives the default to do so.
+
--full-index::
Instead of the first handful characters, show full
object name of pre- and post-image blob on the "index"
line when generating a patch format output.
+--binary::
+ In addition to --full-index, output "binary diff" that
+ can be applied with "git apply".
+
--abbrev[=<n>]::
Instead of showing the full 40-byte hexadecimal object
name in diff-raw format output and diff-tree header
--
1.4.1.gfff4c
^ permalink raw reply related
* Re: [PATCH] Makefile: export NO_SVN_TESTS
From: Junio C Hamano @ 2006-07-07 12:41 UTC (permalink / raw)
To: Johannes Schindelin; +Cc: git
In-Reply-To: <Pine.LNX.4.63.0607071326030.29667@wbgn013.biozentrum.uni-wuerzburg.de>
Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:
> Without this patch, it really is not sufficient to define NO_SVN_TESTS
> in config.mak or the Makefile.
Good catch. I never use config.mak but always use the make
wrapper approach, so I did not notice it.
Thanks.
^ permalink raw reply
* [PATCH 3/3] diff-options: Explain --text and -a
From: Stephan Feder @ 2006-07-07 13:57 UTC (permalink / raw)
To: git
In-Reply-To: <44AE4B35.6060607@b-i-t.de>
Signed-off-by: Stephan Feder <sf@b-i-t.de>
---
Documentation/diff-options.txt | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/Documentation/diff-options.txt b/Documentation/diff-options.txt
index f523ec2..1a93629 100644
--- a/Documentation/diff-options.txt
+++ b/Documentation/diff-options.txt
@@ -94,5 +94,11 @@
Swap two inputs; that is, show differences from index or
on-disk file to tree contents.
+--text::
+ Treat all files as text.
+
+-a::
+ Shorthand for "--text".
+
For more detailed explanation on these common options, see also
link:diffcore.html[diffcore documentation].
--
1.4.1.gbc483
^ permalink raw reply related
* [PATCH 2/3] Add -a and --text to common diff options help
From: Stephan Feder @ 2006-07-07 13:57 UTC (permalink / raw)
To: git
In-Reply-To: <44AE4B35.6060607@b-i-t.de>
Signed-off-by: Stephan Feder <sf@b-i-t.de>
---
diff.h | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/diff.h b/diff.h
index f80f646..8ab0448 100644
--- a/diff.h
+++ b/diff.h
@@ -162,7 +162,8 @@ #define COMMON_DIFF_OPTIONS_HELP \
" -O<file> reorder diffs according to the <file>.\n" \
" -S<string> find filepair whose only one side contains the string.\n" \
" --pickaxe-all\n" \
-" show all files diff when -S is used and hit is found.\n"
+" show all files diff when -S is used and hit is found.\n" \
+" -a --text treat all files as text.\n"
extern int diff_queue_is_empty(void);
extern void diff_flush(struct diff_options*);
--
1.4.1.gbc483
^ permalink raw reply related
* [PATCH 1/3] Teach diff -a as shorthand for --text
From: Stephan Feder @ 2006-07-07 13:57 UTC (permalink / raw)
To: git
In-Reply-To: <44AE4B35.6060607@b-i-t.de>
Signed-off-by: Stephan Feder <sf@b-i-t.de>
---
diff.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/diff.c b/diff.c
index 1f0219d..b423491 100644
--- a/diff.c
+++ b/diff.c
@@ -1561,7 +1561,7 @@ int diff_opt_parse(struct diff_options *
options->output_format |= DIFF_FORMAT_PATCH;
options->full_index = options->binary = 1;
}
- else if (!strcmp(arg, "--text")) {
+ else if (!strcmp(arg, "-a") || !strcmp(arg, "--text")) {
options->text = 1;
}
else if (!strcmp(arg, "--name-only"))
--
1.4.1.gbc483
^ permalink raw reply related
* Re: fatal: ambiguous argument '': unknown revision or path not in the working tree.
From: Anand Kumria @ 2006-07-07 14:54 UTC (permalink / raw)
To: git
In-Reply-To: <44AE4B02.2050408@logix.cz>
On Fri, 07 Jul 2006 23:52:34 +1200, Michal Ludvig wrote:
> Hi all,
>
> I'm getting this error from most cogito commands in my repository
> (created with cg-init):
[snip]
> Using cogito-0.17 and git-1.4.0
You need to upgrade to cogito-0.17.2 with git-1.4.0
Cheers,
Anand
^ 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