* Re: [PATCH 2/7] Merge with_raw, with_stat and summary variables to output_format
From: Johannes Schindelin @ 2006-06-24 23:20 UTC (permalink / raw)
To: Timo Hirvonen; +Cc: junkio, git
In-Reply-To: <20060625005654.627e176b.tihirvon@gmail.com>
Hi,
On Sun, 25 Jun 2006, Timo Hirvonen wrote:
> Johannes Schindelin <Johannes.Schindelin@gmx.de> wrote:
>
> > On Sat, 24 Jun 2006, Timo Hirvonen wrote:
> >
> > > @@ -818,17 +817,12 @@ void show_combined_diff(struct combine_d
> > > struct diff_options *opt = &rev->diffopt;
> > > if (!p->len)
> > > return;
> > > - switch (opt->output_format) {
> > > - case DIFF_FORMAT_RAW:
> > > - case DIFF_FORMAT_NAME_STATUS:
> > > - case DIFF_FORMAT_NAME:
> > > + if (opt->output_format & (DIFF_FORMAT_RAW |
> > > + DIFF_FORMAT_NAME |
> > > + DIFF_FORMAT_NAME_STATUS)) {
> > > show_raw_diff(p, num_parent, rev);
> > > - return;
> > > - case DIFF_FORMAT_PATCH:
> > > + } else if (opt->output_format & DIFF_FORMAT_PATCH) {
> >
> > Not that it matters, but this "else" could go. (Otherwise, "--raw -p"
> > would be the same as "--raw", right?)
>
> Just tested, ./git log -p --raw displays both raw and patch. I think it
> works because I changed diff_tree_combined() to use show_raw_diff() and
> show_patch_diff() directly.
>
> It feels 'wrong' to check flags and then call a function which checks
> the flags again. This combined diff stuff is confusing.
Sorry for not checking the result, but just the patch. I also find this
behaviour confusing. Junio?
> > > + int inter_name_termination = '\t';
> > > + int line_termination = options->line_termination;
> > > +
> > > + if (!line_termination)
> > > + inter_name_termination = 0;
> >
> > <nit type=minor>
> > This should be part of patch 1/7.
> > </nit>
>
> That clean up was possible only after I made other changes to the code,
> I think. At least it wasn't obvious when I wrote 1/7.
It is just a minor nit, I do not think it is necessary to change the
patch.
> > > show_stats(diffstat);
> > > free(diffstat);
> >
> > Why not go the full nine yards, and make diffstat not a pointer, but the
> > struct itself? You would avoid calloc()ing and free()ing. (Of course,
> > instead of calloc()ing you have to memset() it to 0.)
>
> I was blind :)
;-) In my experience, after staring at the code too long, you turn blind.
This is why I like a second pair of eyeballs so much.
> > > + if (output_format & DIFF_FORMAT_PATCH) {
> > > + if (output_format & (DIFF_FORMAT_DIFFSTAT |
> > > + DIFF_FORMAT_SUMMARY)) {
> > > + if (options->stat_sep)
> > > + fputs(options->stat_sep, stdout);
> > > + else
> > > + putchar(options->line_termination);
> >
> > Are we sure we do not want something like
> >
> > if (output_format / DIFF_FORMAT_DIFFSTAT > 1)
> > /* output separator */
> >
> > after each format (this example being after the diffstat), the condition
> > being: if there is still an output format to come, add the separator?
>
> I'm not sure what you mean.
>
> It outputs separator between (diffstat and/or summary) and patch.
> There's no separator between diffstat and summary or raw and diffstat.
> Should there be one?
IMHO there should be one.
> Thanks for your comments. Should I patch the patch or send a fixed one?
I cannot speak for Junio, but I think an additional patch to clean things
up would be the way to go.
Ciao,
Dscho
^ permalink raw reply
* Re: [RFC] GIT user survey
From: Matthias Kestenholz @ 2006-06-24 22:15 UTC (permalink / raw)
To: git
In-Reply-To: <94fc236b0606241455m22c4d285led04846a915267a2@mail.gmail.com>
* Adrien Beau (adrienbeau@gmail.com) wrote:
>
> The results of the Mercurial survey have been posted there:
> http://www.selenic.com/mercurial/wiki/index.cgi/UserSurvey
>
> An interesting read.
I find the answers to the question, what people most like to see
improved interesting: The improvement which got mentioned most often
was "merge across rename", something which git does already.
It seems, that partial checkouts and truncated history are the
only things left to implement for git from this list.
I am looking forward to a git user survey!
Matthias
^ permalink raw reply
* Re: [RFC] GIT user survey
From: Petr Baudis @ 2006-06-24 22:09 UTC (permalink / raw)
To: Linus Torvalds; +Cc: Randal L. Schwartz, Paolo Ciarrocchi, Git Mailing List
In-Reply-To: <Pine.LNX.4.64.0606241344450.6483@g5.osdl.org>
Dear diary, on Sat, Jun 24, 2006 at 10:52:04PM CEST, I got a letter
where Linus Torvalds <torvalds@osdl.org> said that...
> Pasky, the homepage seems a bit pointless. Each individual page is so
> small that splitting it up into six different pages is just
> counter-productive.
Wow, finally some more feedback on the homepage!
> I'd almost suggest making it _one_ page, perhaps with some shortcuts
> within it (ie a "http://git.or.cz/index.html#tools" shortcut within the
> page instead of having a separate "http://git.or.cz/tools.html" page)
Good point. When designing the multi-page layout I expected much more
stuff to end up on the homepage but it sort of didn't happen and now the
Wiki seems to work pretty well, so I have folded it all back to a single
page. I ain't no webdesign-ka but it could've turned out worse; as
usual, I'm taking patches.
The menubar should be now actually useful for quick navigation between
various Git-related resources (going to Git's gitweb using this path
should be much faster than over kernel.org, especially when gitweb.cgi
has its bad days over there).
> I don't know about everybody else, but I get irritated at webpages that
> force me to just switch to another page to get any information. It's like
> how some web journalists split up a story over 20 pages, and each page is
> just a few paragraphs and some graphic (and the commercials, of course).
We could put up some commercials as well and use them for funding pizza
distributed in a round-robin fashion between the developers.
--
Petr "Pasky" Baudis
Stuff: http://pasky.or.cz/
A person is just about as big as the things that make them angry.
^ permalink raw reply
* Re: [PATCH 2/7] Merge with_raw, with_stat and summary variables to output_format
From: Timo Hirvonen @ 2006-06-24 21:56 UTC (permalink / raw)
To: Johannes Schindelin; +Cc: junkio, git
In-Reply-To: <Pine.LNX.4.63.0606242219320.29667@wbgn013.biozentrum.uni-wuerzburg.de>
Johannes Schindelin <Johannes.Schindelin@gmx.de> wrote:
> Hi,
>
> thank you very much for doing the extra step and using the original
> constant names. I appreciate that.
>
> On Sat, 24 Jun 2006, Timo Hirvonen wrote:
>
> > @@ -818,17 +817,12 @@ void show_combined_diff(struct combine_d
> > struct diff_options *opt = &rev->diffopt;
> > if (!p->len)
> > return;
> > - switch (opt->output_format) {
> > - case DIFF_FORMAT_RAW:
> > - case DIFF_FORMAT_NAME_STATUS:
> > - case DIFF_FORMAT_NAME:
> > + if (opt->output_format & (DIFF_FORMAT_RAW |
> > + DIFF_FORMAT_NAME |
> > + DIFF_FORMAT_NAME_STATUS)) {
> > show_raw_diff(p, num_parent, rev);
> > - return;
> > - case DIFF_FORMAT_PATCH:
> > + } else if (opt->output_format & DIFF_FORMAT_PATCH) {
>
> Not that it matters, but this "else" could go. (Otherwise, "--raw -p"
> would be the same as "--raw", right?)
Just tested, ./git log -p --raw displays both raw and patch. I think it
works because I changed diff_tree_combined() to use show_raw_diff() and
show_patch_diff() directly.
It feels 'wrong' to check flags and then call a function which checks
the flags again. This combined diff stuff is confusing.
> > @@ -856,19 +846,18 @@ void diff_tree_combined(const unsigned c
> > [...]
> >
> > - if (do_diffstat && rev->loginfo)
> > - show_log(rev, rev->loginfo,
> > - opt->with_stat ? "---\n" : "\n");
> > + if (opt->output_format & DIFF_FORMAT_DIFFSTAT && rev->loginfo)
> > + show_log(rev, rev->loginfo, "---\n");
> > diff_flush(&diffopts);
> > - if (opt->with_stat)
> > + if (opt->output_format & DIFF_FORMAT_DIFFSTAT)
> > putchar('\n');
> > }
>
> Just a remark: this hunk actually changes behaviour. "with_stat" meant
> that the stat was prepended before something like a patch, and therefore a
> separator was needed. If you pass only "--stat", the separator will be
> printed anyway now.
You are right, it now prints --- when it should print empty line.
> > + int inter_name_termination = '\t';
> > + int line_termination = options->line_termination;
> > +
> > + if (!line_termination)
> > + inter_name_termination = 0;
>
> <nit type=minor>
> This should be part of patch 1/7.
> </nit>
That clean up was possible only after I made other changes to the code,
I think. At least it wasn't obvious when I wrote 1/7.
> > show_stats(diffstat);
> > free(diffstat);
>
> Why not go the full nine yards, and make diffstat not a pointer, but the
> struct itself? You would avoid calloc()ing and free()ing. (Of course,
> instead of calloc()ing you have to memset() it to 0.)
I was blind :)
> > + if (output_format & DIFF_FORMAT_PATCH) {
> > + if (output_format & (DIFF_FORMAT_DIFFSTAT |
> > + DIFF_FORMAT_SUMMARY)) {
> > + if (options->stat_sep)
> > + fputs(options->stat_sep, stdout);
> > + else
> > + putchar(options->line_termination);
>
> Are we sure we do not want something like
>
> if (output_format / DIFF_FORMAT_DIFFSTAT > 1)
> /* output separator */
>
> after each format (this example being after the diffstat), the condition
> being: if there is still an output format to come, add the separator?
I'm not sure what you mean.
It outputs separator between (diffstat and/or summary) and patch.
There's no separator between diffstat and summary or raw and diffstat.
Should there be one?
Thanks for your comments. Should I patch the patch or send a fixed one?
I'm currently too tired to write any code.
--
http://onion.dynserv.net/~timo/
^ permalink raw reply
* Re: [RFC] GIT user survey
From: Adrien Beau @ 2006-06-24 21:55 UTC (permalink / raw)
To: Paolo Ciarrocchi; +Cc: Git Mailing List
In-Reply-To: <4d8e3fd30606240918m6b452314m6514b5e5fc86f147@mail.gmail.com>
On 6/24/06, Paolo Ciarrocchi <paolo.ciarrocchi@gmail.com> wrote:
>
> I was wondering whether it could be a good idea to have a kind of "GIT
> users survey" when google pointed my eyes to this page:
> http://www.selenic.com/pipermail/mercurial/2006-April/007513.html
>
> So I modified the content of the survey and published a DRAF here:
> http://paolo.ciarrocchi.googlepages.com/GITSurvey
>
> (...)
>
> What do people living in this ML think about this suvery?
> Do you have any suggestion?
> Do you think it worth the effort?
The results of the Mercurial survey have been posted there:
http://www.selenic.com/mercurial/wiki/index.cgi/UserSurvey
An interesting read.
^ permalink raw reply
* Re: [PATCH 2/7] Merge with_raw, with_stat and summary variables to output_format
From: Johannes Schindelin @ 2006-06-24 20:52 UTC (permalink / raw)
To: Timo Hirvonen; +Cc: junkio, git
In-Reply-To: <20060624202153.1001a66c.tihirvon@gmail.com>
Hi,
thank you very much for doing the extra step and using the original
constant names. I appreciate that.
On Sat, 24 Jun 2006, Timo Hirvonen wrote:
> @@ -818,17 +817,12 @@ void show_combined_diff(struct combine_d
> struct diff_options *opt = &rev->diffopt;
> if (!p->len)
> return;
> - switch (opt->output_format) {
> - case DIFF_FORMAT_RAW:
> - case DIFF_FORMAT_NAME_STATUS:
> - case DIFF_FORMAT_NAME:
> + if (opt->output_format & (DIFF_FORMAT_RAW |
> + DIFF_FORMAT_NAME |
> + DIFF_FORMAT_NAME_STATUS)) {
> show_raw_diff(p, num_parent, rev);
> - return;
> - case DIFF_FORMAT_PATCH:
> + } else if (opt->output_format & DIFF_FORMAT_PATCH) {
Not that it matters, but this "else" could go. (Otherwise, "--raw -p"
would be the same as "--raw", right?)
> show_patch_diff(p, num_parent, dense, rev);
> - return;
> - default:
> - return;
> }
> }
> @@ -856,19 +846,18 @@ void diff_tree_combined(const unsigned c
> [...]
>
> - if (do_diffstat && rev->loginfo)
> - show_log(rev, rev->loginfo,
> - opt->with_stat ? "---\n" : "\n");
> + if (opt->output_format & DIFF_FORMAT_DIFFSTAT && rev->loginfo)
> + show_log(rev, rev->loginfo, "---\n");
> diff_flush(&diffopts);
> - if (opt->with_stat)
> + if (opt->output_format & DIFF_FORMAT_DIFFSTAT)
> putchar('\n');
> }
Just a remark: this hunk actually changes behaviour. "with_stat" meant
that the stat was prepended before something like a patch, and therefore a
separator was needed. If you pass only "--stat", the separator will be
printed anyway now.
> diff --git a/diff.c b/diff.c
> index f358546..bfed79c 100644
> --- a/diff.c
> +++ b/diff.c
> @@ -1372,23 +1372,27 @@ int diff_setup_done(struct diff_options
> (0 <= options->rename_limit && !options->detect_rename))
> return -1;
>
> + if (options->output_format & DIFF_FORMAT_NO_OUTPUT)
> + options->output_format = 0;
> +
> + if (options->output_format & (DIFF_FORMAT_NAME |
> + DIFF_FORMAT_NAME_STATUS |
> + DIFF_FORMAT_CHECKDIFF |
> + DIFF_FORMAT_NO_OUTPUT))
The DIFF_FORMAT_NO_OUTPUT here makes no sense (if it was set, you unset it
above).
> @@ -1671,15 +1674,17 @@ const char *diff_unique_abbrev(const uns
> [...]
>
> static void diff_flush_raw(struct diff_filepair *p,
> - int line_termination,
> - int inter_name_termination,
> - struct diff_options *options,
> - int output_format)
> + struct diff_options *options)
> {
> int two_paths;
> char status[10];
> int abbrev = options->abbrev;
> const char *path_one, *path_two;
> + int inter_name_termination = '\t';
> + int line_termination = options->line_termination;
> +
> + if (!line_termination)
> + inter_name_termination = 0;
<nit type=minor>
This should be part of patch 1/7.
</nit>
> @@ -2041,55 +2028,61 @@ static void diff_summary(struct diff_fil
> [...]
>
> - if (options->with_raw) {
> + if (output_format & (DIFF_FORMAT_RAW |
> + DIFF_FORMAT_NAME |
> + DIFF_FORMAT_NAME_STATUS |
> + DIFF_FORMAT_CHECKDIFF)) {
> for (i = 0; i < q->nr; i++) {
> struct diff_filepair *p = q->queue[i];
> - flush_one_pair(p, DIFF_FORMAT_RAW, options, NULL);
> + if (check_pair_status(p))
> + flush_one_pair(p, options);
This is a very nice cleanup.
> }
> - if (options->with_stat) {
> +
> + if (output_format & DIFF_FORMAT_DIFFSTAT) {
> + struct diffstat_t *diffstat;
> +
> + diffstat = xcalloc(sizeof (struct diffstat_t), 1);
> + diffstat->xm.consume = diffstat_consume;
> for (i = 0; i < q->nr; i++) {
> struct diff_filepair *p = q->queue[i];
> - flush_one_pair(p, DIFF_FORMAT_DIFFSTAT, options,
> - diffstat);
> + if (check_pair_status(p))
> + diff_flush_stat(p, options, diffstat);
Again, very nice.
> }
> show_stats(diffstat);
> free(diffstat);
Why not go the full nine yards, and make diffstat not a pointer, but the
struct itself? You would avoid calloc()ing and free()ing. (Of course,
instead of calloc()ing you have to memset() it to 0.)
> + if (output_format & DIFF_FORMAT_PATCH) {
> + if (output_format & (DIFF_FORMAT_DIFFSTAT |
> + DIFF_FORMAT_SUMMARY)) {
> + if (options->stat_sep)
> + fputs(options->stat_sep, stdout);
> + else
> + putchar(options->line_termination);
Are we sure we do not want something like
if (output_format / DIFF_FORMAT_DIFFSTAT > 1)
/* output separator */
after each format (this example being after the diffstat), the condition
being: if there is still an output format to come, add the separator?
All in all, I like this patch.
Ciao,
Dscho
^ permalink raw reply
* Re: [RFC] GIT user survey
From: Linus Torvalds @ 2006-06-24 20:52 UTC (permalink / raw)
To: Petr Baudis; +Cc: Randal L. Schwartz, Paolo Ciarrocchi, Git Mailing List
In-Reply-To: <20060624200401.GV21864@pasky.or.cz>
On Sat, 24 Jun 2006, Petr Baudis wrote:
>
> It is also linked from the homepage, although not as prominently as it
> should be; it grew nicely over the time so it probably deserves a more
> visible link now. I will add it on the front page.
Pasky, the homepage seems a bit pointless. Each individual page is so
small that splitting it up into six different pages is just
counter-productive.
I'd almost suggest making it _one_ page, perhaps with some shortcuts
within it (ie a "http://git.or.cz/index.html#tools" shortcut within the
page instead of having a separate "http://git.or.cz/tools.html" page)
Hmm?
In contrast, the wiki frontpage actually works pretty well - it's got more
of that kind of "multiple sub-headers all on the same page" kind of
layout, with just extra _details_ behind the links.
I don't know about everybody else, but I get irritated at webpages that
force me to just switch to another page to get any information. It's like
how some web journalists split up a story over 20 pages, and each page is
just a few paragraphs and some graphic (and the commercials, of course).
I'd much rather _scroll_ a bit, or use ^F to _search_, than have to click
through links.
Linus
^ permalink raw reply
* Re: PPC SHA-1 Updates in "pu"
From: Linus Torvalds @ 2006-06-24 20:42 UTC (permalink / raw)
To: Junio C Hamano; +Cc: git, Petr Baudis
In-Reply-To: <7vhd2atid1.fsf@assigned-by-dhcp.cox.net>
On Sat, 24 Jun 2006, Junio C Hamano wrote:
> Linus Torvalds <torvalds@osdl.org> writes:
>
> > Also, "pu" in general is totally unusable. It doesn't even compile.
>
> Care to share problems with Pasky and I to take a look at,
> please?
Don't everybody see them?
In file included from Git.xs:8:
../cache.h:6:10: error: #include expects "FILENAME" or <FILENAME>
In file included from /usr/lib/perl5/5.8.8/ppc-linux-thread-multi/CORE/perl.h:756,
from Git.xs:15:
/usr/lib/perl5/5.8.8/ppc-linux-thread-multi/CORE/embed.h:4195:1: warning: "die" redefined
Git.xs:11:1: warning: this is the location of the previous definition
Git.xs: In function 'boot_Git':
Git.xs:57: warning: passing argument 1 of 'set_error_routine' from incompatible pointer type
Git.xs:58: warning: passing argument 1 of 'set_die_routine' makes qualified function pointer from unqualified
make[1]: *** [Git.o] Error 1
make[1]: Leaving directory `/home/torvalds/git/perl'
make: *** [all] Error 2
how does that compile for anybody else, when -DSHA1_HEADER isn't set
correctly? The quotes have gone missing:
-DSHA1_HEADER='ppc/sha1.h'
don't ask me why.
Linus
^ permalink raw reply
* Re: PPC SHA-1 Updates in "pu"
From: Junio C Hamano @ 2006-06-24 20:21 UTC (permalink / raw)
To: Linus Torvalds; +Cc: git, Petr Baudis
In-Reply-To: <Pine.LNX.4.64.0606241147480.6483@g5.osdl.org>
Linus Torvalds <torvalds@osdl.org> writes:
> Also, "pu" in general is totally unusable. It doesn't even compile.
Care to share problems with Pasky and I to take a look at,
please?
> I think that "Git.xs" thing is fine for random hacks, but please please
> PLEASE don't make any central program depend on it.
I agree. I got really disgusted when I tentatively pulled the
current Git.xs into "next" and installed it for my own use to
notice that it broke git-fmt-merge-msg hence git-pull workflow.
Pasky, can we first iron out kinks in the build procedure and
installation before converting existing programs further? The
things I worry about currently are:
- the SITELIBARCH gotcha I sent you a message about (and you
responded to it already -- was that an Acked-by?);
- RPM target -- we probably acquired a new build-dependency in
which case the .spec file needs to be updated;
- Make sure Git.xs builds and installed result works fine on
all platforms we care about, including Cygwin and other
non-Linux boxes.
I'd even suggest we revert the changes to git-fmt-merge-msg to
keep it working for now, until the above worries are resolved.
Otherwise we cannot have it in "next" safely (and I REALLY _do_
want to have Git.pm infrastructure in "next" soonish).
We can start using Git.xs and friends in some _new_ ancillary
programs, once we solve building and installing problems for
everybody. That way it would help us gain portability and
confidence without disrupting existing users.
^ permalink raw reply
* Re: [PATCH] Introduce Git.pm (v3)
From: Johannes Schindelin @ 2006-06-24 20:10 UTC (permalink / raw)
To: Junio C Hamano; +Cc: git
In-Reply-To: <7vzmg35pkt.fsf@assigned-by-dhcp.cox.net>
Hi,
On Fri, 23 Jun 2006, Junio C Hamano wrote:
> By the way, I noticed NO_ACCURATE_DIFF is a compile time option
> to cause git-apply to accept diff output from implementations
> that botch "\No newline at the end of file", and I think it is
> wrong -- it should be a run time option to git-apply if we would
> want to support it, because the version of diff you have does
> not have much to do with which implementations of diff were used
> to generate patches you would receive and apply.
>
> Thoughts?
My original idea: on a machine where you have no accurate diff, you at
least want to pass the tests, and you want to ensure you can apply a diff
you generated on that machine.
But I was wrong. This patch is just compile tested, but obviously correct
(lacking usage() and Documentation updates as usual, since I do not want
to do that work before I know the patch is applied):
---
[PATCH] apply: add --no-accurate-diff and --accurate-diff options
You can still set the default behaviour in the Makefile, but at least you
can override it.
Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
---
builtin-apply.c | 32 +++++++++++++++++++++++---------
1 files changed, 23 insertions(+), 9 deletions(-)
diff --git a/builtin-apply.c b/builtin-apply.c
index e113c74..2d26ade 100644
--- a/builtin-apply.c
+++ b/builtin-apply.c
@@ -125,6 +125,7 @@ #define BINARY_LITERAL_DEFLATED 2
unsigned long deflate_origlen;
int lines_added, lines_deleted;
int score;
+ int no_accurate_diff:1;
struct fragment *fragments;
char *result;
unsigned long resultsize;
@@ -1333,7 +1334,8 @@ static int apply_line(char *output, cons
return plen;
}
-static int apply_one_fragment(struct buffer_desc *desc, struct fragment *frag)
+static int apply_one_fragment(struct buffer_desc *desc, struct fragment *frag,
+ int no_accurate_diff)
{
int match_beginning, match_end;
char *buf = desc->buffer;
@@ -1386,13 +1388,11 @@ static int apply_one_fragment(struct buf
size -= len;
}
-#ifdef NO_ACCURATE_DIFF
- if (oldsize > 0 && old[oldsize - 1] == '\n' &&
+ if (no_accurate_diff && oldsize > 0 && old[oldsize - 1] == '\n' &&
newsize > 0 && new[newsize - 1] == '\n') {
oldsize--;
newsize--;
}
-#endif
oldlines = old;
newlines = new;
@@ -1614,7 +1614,7 @@ static int apply_fragments(struct buffer
return apply_binary(desc, patch);
while (frag) {
- if (apply_one_fragment(desc, frag) < 0)
+ if (apply_one_fragment(desc, frag, patch->no_accurate_diff) < 0)
return error("patch failed: %s:%ld",
name, frag->oldpos);
frag = frag->next;
@@ -2097,7 +2097,7 @@ static int use_patch(struct patch *p)
return 1;
}
-static int apply_patch(int fd, const char *filename)
+static int apply_patch(int fd, const char *filename, int no_accurate_diff)
{
unsigned long offset, size;
char *buffer = read_patch_file(fd, &size);
@@ -2113,6 +2113,7 @@ static int apply_patch(int fd, const cha
int nr;
patch = xcalloc(1, sizeof(*patch));
+ patch->no_accurate_diff = no_accurate_diff;
nr = parse_chunk(buffer + offset, size, patch);
if (nr < 0)
break;
@@ -2180,6 +2181,11 @@ int cmd_apply(int argc, const char **arg
{
int i;
int read_stdin = 1;
+#ifdef NO_ACCURATE_DIFF
+ int no_accurate_diff = 1;
+#else
+ int no_accurate_diff = 0;
+#endif
const char *whitespace_option = NULL;
for (i = 1; i < argc; i++) {
@@ -2188,7 +2194,7 @@ int cmd_apply(int argc, const char **arg
int fd;
if (!strcmp(arg, "-")) {
- apply_patch(0, "<stdin>");
+ apply_patch(0, "<stdin>", no_accurate_diff);
read_stdin = 0;
continue;
}
@@ -2265,6 +2271,14 @@ int cmd_apply(int argc, const char **arg
parse_whitespace_option(arg + 13);
continue;
}
+ if (!strcmp(arg, "--no-accurate-diff")) {
+ no_accurate_diff = 1;
+ continue;
+ }
+ if (!strcmp(arg, "--accurate-diff")) {
+ no_accurate_diff = 0;
+ continue;
+ }
if (check_index && prefix_length < 0) {
prefix = setup_git_directory();
@@ -2281,12 +2295,12 @@ int cmd_apply(int argc, const char **arg
usage(apply_usage);
read_stdin = 0;
set_default_whitespace_mode(whitespace_option);
- apply_patch(fd, arg);
+ apply_patch(fd, arg, no_accurate_diff);
close(fd);
}
set_default_whitespace_mode(whitespace_option);
if (read_stdin)
- apply_patch(0, "<stdin>");
+ apply_patch(0, "<stdin>", no_accurate_diff);
if (whitespace_error) {
if (squelch_whitespace_errors &&
squelch_whitespace_errors < whitespace_error) {
^ permalink raw reply related
* Re: [RFC] GIT user survey
From: Petr Baudis @ 2006-06-24 20:04 UTC (permalink / raw)
To: Randal L. Schwartz; +Cc: Paolo Ciarrocchi, Git Mailing List
In-Reply-To: <863bduba81.fsf@blue.stonehenge.com>
Dear diary, on Sat, Jun 24, 2006 at 09:54:38PM CEST, I got a letter
where "Randal L. Schwartz" <merlyn@stonehenge.com> said that...
> I think my point is that I read this list regularly, but
> I had no idea there was a wiki. Where is it being promoted?
> Surely not on git(1). Was it announced here? How often?
It was announced in
15227 F May 03 Petr Baudis ( 1.1K) [ANNOUNCE] Git wiki
spawning a 61-mails thread. ;-)
It is also linked from the homepage, although not as prominently as it
should be; it grew nicely over the time so it probably deserves a more
visible link now. I will add it on the front page.
--
Petr "Pasky" Baudis
Stuff: http://pasky.or.cz/
A person is just about as big as the things that make them angry.
^ permalink raw reply
* Re: [RFC] GIT user survey
From: Randal L. Schwartz @ 2006-06-24 19:54 UTC (permalink / raw)
To: Paolo Ciarrocchi; +Cc: Git Mailing List
In-Reply-To: <4d8e3fd30606241008w6cf9e6c0hf230ff1091194a7c@mail.gmail.com>
>>>>> "Paolo" == Paolo Ciarrocchi <paolo.ciarrocchi@gmail.com> writes:
Paolo> On 24 Jun 2006 10:05:33 -0700, Randal L. Schwartz <merlyn@stonehenge.com> wrote:
>> >>>>> "Paolo" == Paolo Ciarrocchi <paolo.ciarrocchi@gmail.com> writes:
>>
Paolo> 1. Do you use the GIT wiki? If yes, do you find it useful?
>>
>> There's a git wiki??
Paolo> Yup.
Paolo> http://git.or.cz/gitwiki/FrontPage
I think my point is that I read this list regularly, but
I had no idea there was a wiki. Where is it being promoted?
Surely not on git(1). Was it announced here? How often?
--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<merlyn@stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!
^ permalink raw reply
* Re: From b65bc21e7d8dc8cafc70dfa6354cb66b8874b2d9 Mon Sep 17 00:00:00 2001 [PATCH] Makefile: add framework to verify and bench sha1 implementations.
From: Junio C Hamano @ 2006-06-24 19:47 UTC (permalink / raw)
To: linux; +Cc: git, junkio
In-Reply-To: <20060624092921.32165.qmail@science.horizon.com>
linux@horizon.com writes:
> Nice work, but I might point out that the original PPC SHA bug was hashing
> more than 0.5G of contiguous data in a *single* call to SHA1_Update,
> while your test program works with 8K buffers.
Blush. I realized it and updated the version in "pu" after I
sen the message.
^ permalink raw reply
* Re: [PATCH] diff --color: use $GIT_DIR/config
From: Johannes Schindelin @ 2006-06-24 19:44 UTC (permalink / raw)
To: Junio C Hamano; +Cc: git, Linus Torvalds
In-Reply-To: <7v7j36yfh1.fsf_-_@assigned-by-dhcp.cox.net>
Hi,
On Sat, 24 Jun 2006, Junio C Hamano wrote:
> BTW, while doing this, I noticed that the patch does not do the
> color output for combined diffs. Care to look into it after
> Timo's output format series settles?
You mean just copying the relevant parts from your patch, which I missed,
and do minimal testing? Sure ;-)
But first, by way of thanks to Martin, I have to reintroduce into
format-patch the check for patches which are already upstream.
Ciao,
Dscho
^ permalink raw reply
* Re: [PATCH] cvsimport: setup indexes correctly for ancestors and incremental imports
From: Johannes Schindelin @ 2006-06-24 19:42 UTC (permalink / raw)
To: Martin Langhoff; +Cc: git, junkio
In-Reply-To: <11511475882820-git-send-email-martin@catalyst.net.nz>
Hi,
almost happy.
On Sat, 24 Jun 2006, Martin Langhoff wrote:
> unless ($index{$branch}) {
> $index{$branch} = tmpnam();
> $ENV{GIT_INDEX_FILE} = $index{$branch};
> - system("git-read-tree", $branch);
> + }
> + if ($ancestor) {
> + system("git-read-tree", $ancestor);
> die "read-tree failed: $?\n" if $?;
> } else {
> + unless ($index{$branch}) {
> + $index{$branch} = tmpnam();
> + $ENV{GIT_INDEX_FILE} = $index{$branch};
> + system("git-read-tree", $branch);
> + die "read-tree failed: $?\n" if $?;
> + }
> + }
This line ^ seems to have white space at the end.
Also, in my case, this is still broken. $index{$branch} is set, $ancestor
not, but $ENV{GIT_INDEX_FILE} ne $index{$branch}.
You can reproduce this by importing into branch origin while branch master
(which is not equal to origin) is checked out.
Plus, the initial setting of GIT_INDEX_FILE forgot to perform a
git-read-tree.
How about this on top of your patch (which fixes things with my setup):
---
[PATCH] cvsimport: always set $ENV{GIT_INDEX_FILE} to $index{$branch}
Also, make sure that the initial git-read-tree is performed.
Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
---
git-cvsimport | 15 ++++++++-------
1 files changed, 8 insertions(+), 7 deletions(-)
--- git-cvsimport.perl 2006-06-24 20:30:33.000000000 +0200
+++ git-cvsimport 2006-06-24 21:35:42.000000000 +0200
@@ -470,6 +470,9 @@
$index{$opt_o} = tmpnam();
$ENV{GIT_INDEX_FILE} = $index{$opt_o};
+system("git-read-tree", $opt_o);
+die "read-tree failed: $?\n" if $?;
+
unless(-d $git_dir) {
system("git-init-db");
die "Cannot init the GIT db at $git_tree: $?\n" if $?;
@@ -813,17 +816,15 @@
unless ($index{$branch}) {
$index{$branch} = tmpnam();
$ENV{GIT_INDEX_FILE} = $index{$branch};
+ system("git-read-tree", $branch);
+ die "read-tree failed: $?\n" if $?;
}
+ # just in case
+ $ENV{GIT_INDEX_FILE} = $index{$branch};
if ($ancestor) {
+ print "have ancestor $ancestor" if $opt_v;
system("git-read-tree", $ancestor);
die "read-tree failed: $?\n" if $?;
- } else {
- unless ($index{$branch}) {
- $index{$branch} = tmpnam();
- $ENV{GIT_INDEX_FILE} = $index{$branch};
- system("git-read-tree", $branch);
- die "read-tree failed: $?\n" if $?;
- }
}
} else {
# just in case
^ permalink raw reply
* Re: [PATCH] cvsimport - streamline temp index file creation and avoid creating empty tmpfiles
From: Johannes Schindelin @ 2006-06-24 19:05 UTC (permalink / raw)
To: Junio C Hamano; +Cc: git, Martin Langhoff
In-Reply-To: <7vslluyika.fsf@assigned-by-dhcp.cox.net>
Hi,
On Sat, 24 Jun 2006, Junio C Hamano wrote:
> Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:
>
> > I would not care too strongly about that. Eventually, I really would like
> > this file to reside in $GIT_DIR, not /tmp, but whatever. That is not my
> > biggest concern right now. That I cannot update since June 18th, however,
> > is.
>
> Would reverting 8f732649 in the meantime be an option for you?
I think it is worth fixing instead of working around.
Ciao,
Dscho
^ permalink raw reply
* Re: PPC SHA-1 Updates in "pu"
From: Linus Torvalds @ 2006-06-24 18:55 UTC (permalink / raw)
To: Junio C Hamano; +Cc: git
In-Reply-To: <7vwtb6yip5.fsf@assigned-by-dhcp.cox.net>
On Sat, 24 Jun 2006, Junio C Hamano wrote:
>
> If somebody has time and inclination, please try updated PPC SHA-1
> from linux@horizon.com that is in "pu" (say make check-sha1) and
> report impressions.
"make check-sha1" passes.
Before:
[torvalds@g5 linux]$ /usr/bin/time git-fsck-objects --full
101.90user 4.66system 1:46.72elapsed 99%CPU (0avgtext+0avgdata 0maxresident)k
0inputs+0outputs (0major+1787158minor)pagefaults 0swaps
After:
[torvalds@g5 linux]$ /usr/bin/time ~/git/git-fsck-objects --full
101.16user 4.32system 1:45.56elapsed 99%CPU (0avgtext+0avgdata 0maxresident)k
0inputs+0outputs (0major+1787127minor)pagefaults 0swaps
which doesn't seem to really imply anything seriously changed (in fact,
rerunning it made the numbers even closer).
This is on a G5 powerpc.
Also, "pu" in general is totally unusable. It doesn't even compile.
I think that "Git.xs" thing is fine for random hacks, but please please
PLEASE don't make any central program depend on it.
Linus
^ permalink raw reply
* Re: [PATCH] git-commit: filter out log message lines only when editor was run.
From: Yann Dirson @ 2006-06-24 9:42 UTC (permalink / raw)
To: junkio, mcostalba; +Cc: GIT list
Junio wrote:
> I agree with this in principle but we would need to make sure
> that our own scripts do not expect that the message is cleaned
> up when feeding a commit log message via stdin, -m or -F, and if
> they do fix them before applying this patch.
The only tools in git.git I could identify as using git-commit rather
than commit-tree are:
git-revert.sh: OK
git-rebase.sh: only uses -C
cogito, stgit, and pg also use commit-tree. Only qgit seems to be
using git-commit, and probably makes use of this (mis)feature.
I guess the easiest way to get the 1.4.0 behaviour is to change
git-commit calls to "git-commit -e" with EDITOR=true in the
environment. I'm not sure it would be worth adding a new flag to
switch on/off log stripping.
Best regards,
--
Yann Dirson <ydirson@altern.org> |
Debian-related: <dirson@debian.org> | Support Debian GNU/Linux:
| Freedom, Power, Stability, Gratis
http://ydirson.free.fr/ | Check <http://www.debian.org/>
^ permalink raw reply
* Re: A series file for git?
From: Eric W. Biederman @ 2006-06-24 17:54 UTC (permalink / raw)
To: Junio C Hamano; +Cc: Linus Torvalds, Git Mailing List
In-Reply-To: <7vac83ylk6.fsf@assigned-by-dhcp.cox.net>
Junio C Hamano <junkio@cox.net> writes:
> ebiederm@xmission.com (Eric W. Biederman) writes:
>
>> I was using:
>> git-rev-list $revargs | tac > list
>> for sha1 in $(cat list); do git-cherry-pick -r $sha1 ; done
>>...
>> - Keeping patches in git and just remembering their sha1 is nice
>> but it has the downside that it can be really easy to loose
>> the sha1, and thus the patch. So some sort of history mechanism
>> so you can get back to where you were would be nice.
>
> Actually, the $revargs above is composed of your branch names
> (e.g. "^master this-topic that-topic"), so as long as you do not
> lose these branches they are protected.
Right but typically I have something that looks like.
"git-rev-list --pretty=oneline 2.6.17-rc6-mm2..HEAD | tac > list"
and HEAD changes.
I could be careful and before I do each operation save a branch
name.
>> - This is a similar technique to topic branches. However in some
>> of the more interesting cases a topic branch can't be used because
>> you have a whole series of little changes, that allow depend on
>> each other. So topic branches need not apply.
>
> Sorry I fail to see why. A series of little changes that depend
> on each other would be a string of pearls on a topic branch in
> the simplest case, or a handful of topic branches that
> occasionally merge with each other if you want to get fancier.
> Cherry-picking from a DAG of the latter kind with your rev-list
> piped to tac is no different than cherry-picking from a simple
> straight line of the former kind, isn't it?
It is exactly a string of perls on a topic branch. My point
is that when things are sufficiently interrelated that you
can't use more than one topic branch.
With topic branches when you find a small fix to an existing
perl you just commit it to that branch, and it works
because each branch really is composed of a single pearl.
(At least that is my intuition).
When you have multiple highly interrelated pearls and you
are testing you can easily put the fix for a pearl at
the end of the branch. But before you push your changes
upstream that fix needs to be merged with the original
pearl that it fixes. Which is fundamentally a history
editing kind of action.
>> - One of the places where we currently uses series files
>> (patch-scripts && quilt), and heavy cherry picking is for patch
>> aging. That is letting patches sit in a testing branch for
>> a while so people have a chance to test and look at them.
>
> I agree that patch aging and updating does not mesh well with
> how git inherently works, as git regards commits immutable
> objects. Even then, I use my "pu" branch (and topics that
> hasn't merged to "next" but in "pu") pretty much as patch aging
> area and I regularly do "git commit --amend" to update them.
> This however is cumbersome with core git tools alone, and I
> suspect is better done with StGIT.
I have a similar suspicion. I am glad we pretty much see
the same problem.
>> If we create a meta data branch with just the series file
>> we can remove the risk of loosing things, as we always
>> have a path back to the old history if we want it.
>
> I am not sure about that. What does the series file contain,
> and what other things the meta data branch contain? If you are
> listing commit SHA1 in the series file, you _do_ have the risk
> of losing things -- git-fsck-objects needs to look at such blob
> object and consider that as the root of reachability chain; to
> me that seems too specialized hack.
When described that way I agree. The best I can imagine
is to list those commits as ancestors of the current commit.
Hmm. Or possibly I could collect up tag objects and work
with them. In any case representing this in a non-hackish
way is my goal.
> I have a feeling that I really should study how well StGIT does
> things before talking about this further. It may suit your
> needs perfectly. What do you feel is lacking in StGIT that you
> need?
What I want and what I see lacking in the git and StGit is
the ability to record the history of editing the history
of a branch.
A mundane example. It would be nice if I rebased a branch if
I could record in some fashion what that branch was before
I rebased it.
So I am trying to figure out how to construct a meta branch
that records that kind of information about a branch.
Intuitively this feels like the history of a series file
to me. Did I add commits? Did I remove commits? Did
I reorder commits? Did I merge commits?
Andrew in his patch-scripts documentation recommends using
CVS to record this information (The documentation predates
git). I think this is something that got lost with quilt when Andrews
patch-scripts were cleaned up and made more general.
I need to look some more but I don't think recording the history
of editing a branch is problem that has been solved in any of
the git flavors.
I will certainly look at StGit more and at the core git data
structures some more and see if I can come up with a creative
way of representing the history of branch edit operations
that will not break existing tools.
Eric
^ permalink raw reply
* [PATCH 7/7] Remove awkward compatibility warts
From: Timo Hirvonen @ 2006-06-24 17:28 UTC (permalink / raw)
To: junkio; +Cc: git
In-Reply-To: <20060624201843.a5b4f7b9.tihirvon@gmail.com>
Signed-off-by: Timo Hirvonen <tihirvon@gmail.com>
---
builtin-diff-files.c | 7 -------
builtin-diff.c | 7 -------
2 files changed, 0 insertions(+), 14 deletions(-)
diff --git a/builtin-diff-files.c b/builtin-diff-files.c
index a655eea..3361898 100644
--- a/builtin-diff-files.c
+++ b/builtin-diff-files.c
@@ -47,12 +47,5 @@ int cmd_diff_files(int argc, const char
if (rev.pending.nr ||
rev.min_age != -1 || rev.max_age != -1)
usage(diff_files_usage);
- /*
- * Backward compatibility wart - "diff-files -s" used to
- * defeat the common diff option "-s" which asked for
- * DIFF_FORMAT_NO_OUTPUT.
- */
- if (rev.diffopt.output_format == DIFF_FORMAT_NO_OUTPUT)
- rev.diffopt.output_format = DIFF_FORMAT_RAW;
return run_diff_files(&rev, silent);
}
diff --git a/builtin-diff.c b/builtin-diff.c
index 47e0a37..076eb09 100644
--- a/builtin-diff.c
+++ b/builtin-diff.c
@@ -56,13 +56,6 @@ static int builtin_diff_files(struct rev
if (revs->max_count < 0 &&
(revs->diffopt.output_format & DIFF_FORMAT_PATCH))
revs->combine_merges = revs->dense_combined_merges = 1;
- /*
- * Backward compatibility wart - "diff-files -s" used to
- * defeat the common diff option "-s" which asked for
- * DIFF_FORMAT_NO_OUTPUT.
- */
- if (revs->diffopt.output_format == DIFF_FORMAT_NO_OUTPUT)
- revs->diffopt.output_format = DIFF_FORMAT_RAW;
return run_diff_files(revs, silent);
}
--
1.4.1.rc1.g8637
^ permalink raw reply related
* [PATCH 6/7] --name-only, --name-status, --check and -s are mutually exclusive
From: Timo Hirvonen @ 2006-06-24 17:26 UTC (permalink / raw)
To: junkio; +Cc: git
In-Reply-To: <20060624201843.a5b4f7b9.tihirvon@gmail.com>
Signed-off-by: Timo Hirvonen <tihirvon@gmail.com>
---
diff.c | 13 +++++++++++++
1 files changed, 13 insertions(+), 0 deletions(-)
diff --git a/diff.c b/diff.c
index 6be31e7..4b1b4eb 100644
--- a/diff.c
+++ b/diff.c
@@ -1366,6 +1366,19 @@ void diff_setup(struct diff_options *opt
int diff_setup_done(struct diff_options *options)
{
+ int count = 0;
+
+ if (options->output_format & DIFF_FORMAT_NAME)
+ count++;
+ if (options->output_format & DIFF_FORMAT_NAME_STATUS)
+ count++;
+ if (options->output_format & DIFF_FORMAT_CHECKDIFF)
+ count++;
+ if (options->output_format & DIFF_FORMAT_NO_OUTPUT)
+ count++;
+ if (count > 1)
+ die("--name-only, --name-status, --check and -s are mutually exclusive");
+
if ((options->find_copies_harder &&
options->detect_rename != DIFF_DETECT_COPY) ||
(0 <= options->rename_limit && !options->detect_rename))
--
1.4.1.rc1.g8637
^ permalink raw reply related
* [PATCH 5/7] DIFF_FORMAT_RAW is not default anymore
From: Timo Hirvonen @ 2006-06-24 17:25 UTC (permalink / raw)
To: junkio; +Cc: git
In-Reply-To: <20060624201843.a5b4f7b9.tihirvon@gmail.com>
diff_setup() used to initialize output_format to DIFF_FORMAT_RAW. Now
the default is 0 (no output) so don't compare against DIFF_FORMAT_RAW to
see if any diff format command line flags were given.
Signed-off-by: Timo Hirvonen <tihirvon@gmail.com>
---
builtin-log.c | 5 +----
revision.c | 3 +--
2 files changed, 2 insertions(+), 6 deletions(-)
diff --git a/builtin-log.c b/builtin-log.c
index 65f9527..f173070 100644
--- a/builtin-log.c
+++ b/builtin-log.c
@@ -24,11 +24,8 @@ static int cmd_log_wc(int argc, const ch
rev->verbose_header = 1;
argc = setup_revisions(argc, argv, rev, "HEAD");
if (rev->always_show_header) {
- if (rev->diffopt.pickaxe || rev->diffopt.filter) {
+ if (rev->diffopt.pickaxe || rev->diffopt.filter)
rev->always_show_header = 0;
- if (rev->diffopt.output_format == DIFF_FORMAT_RAW)
- rev->diffopt.output_format = DIFF_FORMAT_NO_OUTPUT;
- }
}
if (argc > 1)
diff --git a/revision.c b/revision.c
index b963f2a..ae4ca82 100644
--- a/revision.c
+++ b/revision.c
@@ -851,8 +851,7 @@ int setup_revisions(int argc, const char
}
if (revs->combine_merges) {
revs->ignore_merges = 0;
- if (revs->dense_combined_merges &&
- (revs->diffopt.output_format != DIFF_FORMAT_DIFFSTAT))
+ if (revs->dense_combined_merges && !revs->diffopt.output_format)
revs->diffopt.output_format = DIFF_FORMAT_PATCH;
}
revs->diffopt.abbrev = revs->abbrev;
--
1.4.1.rc1.g8637
^ permalink raw reply related
* [PATCH 1/7] Clean up diff.c
From: Timo Hirvonen @ 2006-06-24 17:20 UTC (permalink / raw)
To: junkio; +Cc: git
In-Reply-To: <20060624201843.a5b4f7b9.tihirvon@gmail.com>
Signed-off-by: Timo Hirvonen <tihirvon@gmail.com>
---
diff.c | 18 ++++++------------
1 files changed, 6 insertions(+), 12 deletions(-)
diff --git a/diff.c b/diff.c
index ad77543..f358546 100644
--- a/diff.c
+++ b/diff.c
@@ -203,7 +203,7 @@ static void emit_rewrite_diff(const char
static int fill_mmfile(mmfile_t *mf, struct diff_filespec *one)
{
if (!DIFF_FILE_VALID(one)) {
- mf->ptr = ""; /* does not matter */
+ mf->ptr = (char *)""; /* does not matter */
mf->size = 0;
return 0;
}
@@ -395,7 +395,7 @@ static void show_stats(struct diffstat_t
}
for (i = 0; i < data->nr; i++) {
- char *prefix = "";
+ const char *prefix = "";
char *name = data->files[i]->name;
int added = data->files[i]->added;
int deleted = data->files[i]->deleted;
@@ -918,7 +918,7 @@ int diff_populate_filespec(struct diff_f
err_empty:
err = -1;
empty:
- s->data = "";
+ s->data = (char *)"";
s->size = 0;
return err;
}
@@ -1409,7 +1409,7 @@ int diff_setup_done(struct diff_options
return 0;
}
-int opt_arg(const char *arg, int arg_short, const char *arg_long, int *val)
+static int opt_arg(const char *arg, int arg_short, const char *arg_long, int *val)
{
char c, *eq;
int len;
@@ -1725,16 +1725,12 @@ static void diff_flush_raw(struct diff_f
free((void*)path_two);
}
-static void diff_flush_name(struct diff_filepair *p,
- int inter_name_termination,
- int line_termination)
+static void diff_flush_name(struct diff_filepair *p, int line_termination)
{
char *path = p->two->path;
if (line_termination)
path = quote_one(p->two->path);
- else
- path = p->two->path;
printf("%s%c", path, line_termination);
if (p->two->path != path)
free(path);
@@ -1955,9 +1951,7 @@ static void flush_one_pair(struct diff_f
options, diff_output_format);
break;
case DIFF_FORMAT_NAME:
- diff_flush_name(p,
- inter_name_termination,
- line_termination);
+ diff_flush_name(p, line_termination);
break;
case DIFF_FORMAT_NO_OUTPUT:
break;
--
1.4.1.rc1.g8637
^ permalink raw reply related
* [PATCH 2/7] Merge with_raw, with_stat and summary variables to output_format
From: Timo Hirvonen @ 2006-06-24 17:21 UTC (permalink / raw)
To: junkio; +Cc: git
In-Reply-To: <20060624201843.a5b4f7b9.tihirvon@gmail.com>
DIFF_FORMAT_* are now bit-flags instead of enumerated values.
Signed-off-by: Timo Hirvonen <tihirvon@gmail.com>
---
builtin-diff.c | 2 -
builtin-log.c | 4 -
combine-diff.c | 55 +++++++----------
diff.c | 183 +++++++++++++++++++++++++++-----------------------------
diff.h | 27 +++++---
log-tree.c | 9 ++-
6 files changed, 136 insertions(+), 144 deletions(-)
diff --git a/builtin-diff.c b/builtin-diff.c
index 99a2f76..3b44296 100644
--- a/builtin-diff.c
+++ b/builtin-diff.c
@@ -56,7 +56,7 @@ static int builtin_diff_files(struct rev
3 < revs->max_count)
usage(builtin_diff_usage);
if (revs->max_count < 0 &&
- (revs->diffopt.output_format == DIFF_FORMAT_PATCH))
+ (revs->diffopt.output_format & DIFF_FORMAT_PATCH))
revs->combine_merges = revs->dense_combined_merges = 1;
/*
* Backward compatibility wart - "diff-files -s" used to
diff --git a/builtin-log.c b/builtin-log.c
index 5a8a50b..5c656bc 100644
--- a/builtin-log.c
+++ b/builtin-log.c
@@ -176,11 +176,9 @@ int cmd_format_patch(int argc, const cha
rev.commit_format = CMIT_FMT_EMAIL;
rev.verbose_header = 1;
rev.diff = 1;
- rev.diffopt.with_raw = 0;
- rev.diffopt.with_stat = 1;
rev.combine_merges = 0;
rev.ignore_merges = 1;
- rev.diffopt.output_format = DIFF_FORMAT_PATCH;
+ rev.diffopt.output_format = DIFF_FORMAT_DIFFSTAT | DIFF_FORMAT_PATCH;
git_config(git_format_config);
rev.extra_headers = extra_headers;
diff --git a/combine-diff.c b/combine-diff.c
index 64b20cc..3daa8cb 100644
--- a/combine-diff.c
+++ b/combine-diff.c
@@ -771,7 +771,7 @@ static void show_raw_diff(struct combine
if (rev->loginfo)
show_log(rev, rev->loginfo, "\n");
- if (opt->output_format == DIFF_FORMAT_RAW) {
+ if (opt->output_format & DIFF_FORMAT_RAW) {
offset = strlen(COLONS) - num_parent;
if (offset < 0)
offset = 0;
@@ -791,8 +791,7 @@ static void show_raw_diff(struct combine
printf(" %s ", diff_unique_abbrev(p->sha1, opt->abbrev));
}
- if (opt->output_format == DIFF_FORMAT_RAW ||
- opt->output_format == DIFF_FORMAT_NAME_STATUS) {
+ if (opt->output_format & (DIFF_FORMAT_RAW | DIFF_FORMAT_NAME_STATUS)) {
for (i = 0; i < num_parent; i++)
putchar(p->parent[i].status);
putchar(inter_name_termination);
@@ -818,17 +817,12 @@ void show_combined_diff(struct combine_d
struct diff_options *opt = &rev->diffopt;
if (!p->len)
return;
- switch (opt->output_format) {
- case DIFF_FORMAT_RAW:
- case DIFF_FORMAT_NAME_STATUS:
- case DIFF_FORMAT_NAME:
+ if (opt->output_format & (DIFF_FORMAT_RAW |
+ DIFF_FORMAT_NAME |
+ DIFF_FORMAT_NAME_STATUS)) {
show_raw_diff(p, num_parent, rev);
- return;
- case DIFF_FORMAT_PATCH:
+ } else if (opt->output_format & DIFF_FORMAT_PATCH) {
show_patch_diff(p, num_parent, dense, rev);
- return;
- default:
- return;
}
}
@@ -842,13 +836,9 @@ void diff_tree_combined(const unsigned c
struct diff_options diffopts;
struct combine_diff_path *p, *paths = NULL;
int i, num_paths;
- int do_diffstat;
- do_diffstat = (opt->output_format == DIFF_FORMAT_DIFFSTAT ||
- opt->with_stat);
diffopts = *opt;
- diffopts.with_raw = 0;
- diffopts.with_stat = 0;
+ diffopts.output_format &= ~(DIFF_FORMAT_RAW | DIFF_FORMAT_DIFFSTAT);
diffopts.recursive = 1;
/* find set of paths that everybody touches */
@@ -856,19 +846,18 @@ void diff_tree_combined(const unsigned c
/* show stat against the first parent even
* when doing combined diff.
*/
- if (i == 0 && do_diffstat)
- diffopts.output_format = DIFF_FORMAT_DIFFSTAT;
+ if (i == 0 && opt->output_format & DIFF_FORMAT_DIFFSTAT)
+ diffopts.output_format |= DIFF_FORMAT_DIFFSTAT;
else
- diffopts.output_format = DIFF_FORMAT_NO_OUTPUT;
+ diffopts.output_format |= DIFF_FORMAT_NO_OUTPUT;
diff_tree_sha1(parent[i], sha1, "", &diffopts);
diffcore_std(&diffopts);
paths = intersect_paths(paths, i, num_parent);
- if (do_diffstat && rev->loginfo)
- show_log(rev, rev->loginfo,
- opt->with_stat ? "---\n" : "\n");
+ if (opt->output_format & DIFF_FORMAT_DIFFSTAT && rev->loginfo)
+ show_log(rev, rev->loginfo, "---\n");
diff_flush(&diffopts);
- if (opt->with_stat)
+ if (opt->output_format & DIFF_FORMAT_DIFFSTAT)
putchar('\n');
}
@@ -878,17 +867,21 @@ void diff_tree_combined(const unsigned c
num_paths++;
}
if (num_paths) {
- if (opt->with_raw) {
- int saved_format = opt->output_format;
- opt->output_format = DIFF_FORMAT_RAW;
+ if (opt->output_format & (DIFF_FORMAT_RAW |
+ DIFF_FORMAT_NAME |
+ DIFF_FORMAT_NAME_STATUS)) {
for (p = paths; p; p = p->next) {
- show_combined_diff(p, num_parent, dense, rev);
+ if (p->len)
+ show_raw_diff(p, num_parent, rev);
}
- opt->output_format = saved_format;
putchar(opt->line_termination);
}
- for (p = paths; p; p = p->next) {
- show_combined_diff(p, num_parent, dense, rev);
+ if (opt->output_format & DIFF_FORMAT_PATCH) {
+ for (p = paths; p; p = p->next) {
+ if (p->len)
+ show_patch_diff(p, num_parent, dense,
+ rev);
+ }
}
}
diff --git a/diff.c b/diff.c
index f358546..bfed79c 100644
--- a/diff.c
+++ b/diff.c
@@ -1372,23 +1372,27 @@ int diff_setup_done(struct diff_options
(0 <= options->rename_limit && !options->detect_rename))
return -1;
+ if (options->output_format & DIFF_FORMAT_NO_OUTPUT)
+ options->output_format = 0;
+
+ if (options->output_format & (DIFF_FORMAT_NAME |
+ DIFF_FORMAT_NAME_STATUS |
+ DIFF_FORMAT_CHECKDIFF |
+ DIFF_FORMAT_NO_OUTPUT))
+ options->output_format &= ~(DIFF_FORMAT_RAW |
+ DIFF_FORMAT_DIFFSTAT |
+ DIFF_FORMAT_SUMMARY |
+ DIFF_FORMAT_PATCH);
+
/*
* These cases always need recursive; we do not drop caller-supplied
* recursive bits for other formats here.
*/
- if ((options->output_format == DIFF_FORMAT_PATCH) ||
- (options->output_format == DIFF_FORMAT_DIFFSTAT) ||
- (options->output_format == DIFF_FORMAT_CHECKDIFF))
+ if (options->output_format & (DIFF_FORMAT_PATCH |
+ DIFF_FORMAT_DIFFSTAT |
+ DIFF_FORMAT_CHECKDIFF))
options->recursive = 1;
- /*
- * These combinations do not make sense.
- */
- if (options->output_format == DIFF_FORMAT_RAW)
- options->with_raw = 0;
- if (options->output_format == DIFF_FORMAT_DIFFSTAT)
- options->with_stat = 0;
-
if (options->detect_rename && options->rename_limit < 0)
options->rename_limit = diff_rename_limit_default;
if (options->setup & DIFF_SETUP_USE_CACHE) {
@@ -1460,22 +1464,20 @@ int diff_opt_parse(struct diff_options *
{
const char *arg = av[0];
if (!strcmp(arg, "-p") || !strcmp(arg, "-u"))
- options->output_format = DIFF_FORMAT_PATCH;
+ options->output_format |= DIFF_FORMAT_PATCH;
else if (opt_arg(arg, 'U', "unified", &options->context))
- options->output_format = DIFF_FORMAT_PATCH;
+ options->output_format |= DIFF_FORMAT_PATCH;
else if (!strcmp(arg, "--patch-with-raw")) {
- options->output_format = DIFF_FORMAT_PATCH;
- options->with_raw = 1;
+ options->output_format |= DIFF_FORMAT_PATCH | DIFF_FORMAT_RAW;
}
else if (!strcmp(arg, "--stat"))
- options->output_format = DIFF_FORMAT_DIFFSTAT;
+ options->output_format |= DIFF_FORMAT_DIFFSTAT;
else if (!strcmp(arg, "--check"))
- options->output_format = DIFF_FORMAT_CHECKDIFF;
+ options->output_format |= DIFF_FORMAT_CHECKDIFF;
else if (!strcmp(arg, "--summary"))
- options->summary = 1;
+ options->output_format |= DIFF_FORMAT_SUMMARY;
else if (!strcmp(arg, "--patch-with-stat")) {
- options->output_format = DIFF_FORMAT_PATCH;
- options->with_stat = 1;
+ options->output_format |= DIFF_FORMAT_PATCH | DIFF_FORMAT_DIFFSTAT;
}
else if (!strcmp(arg, "-z"))
options->line_termination = 0;
@@ -1484,19 +1486,20 @@ int diff_opt_parse(struct diff_options *
else if (!strcmp(arg, "--full-index"))
options->full_index = 1;
else if (!strcmp(arg, "--binary")) {
- options->output_format = DIFF_FORMAT_PATCH;
+ options->output_format |= DIFF_FORMAT_PATCH;
options->full_index = options->binary = 1;
}
else if (!strcmp(arg, "--name-only"))
- options->output_format = DIFF_FORMAT_NAME;
+ options->output_format |= DIFF_FORMAT_NAME;
else if (!strcmp(arg, "--name-status"))
- options->output_format = DIFF_FORMAT_NAME_STATUS;
+ options->output_format |= DIFF_FORMAT_NAME_STATUS;
else if (!strcmp(arg, "-R"))
options->reverse_diff = 1;
else if (!strncmp(arg, "-S", 2))
options->pickaxe = arg + 2;
- else if (!strcmp(arg, "-s"))
- options->output_format = DIFF_FORMAT_NO_OUTPUT;
+ else if (!strcmp(arg, "-s")) {
+ options->output_format |= DIFF_FORMAT_NO_OUTPUT;
+ }
else if (!strncmp(arg, "-O", 2))
options->orderfile = arg + 2;
else if (!strncmp(arg, "--diff-filter=", 14))
@@ -1671,15 +1674,17 @@ const char *diff_unique_abbrev(const uns
}
static void diff_flush_raw(struct diff_filepair *p,
- int line_termination,
- int inter_name_termination,
- struct diff_options *options,
- int output_format)
+ struct diff_options *options)
{
int two_paths;
char status[10];
int abbrev = options->abbrev;
const char *path_one, *path_two;
+ int inter_name_termination = '\t';
+ int line_termination = options->line_termination;
+
+ if (!line_termination)
+ inter_name_termination = 0;
path_one = p->one->path;
path_two = p->two->path;
@@ -1708,7 +1713,7 @@ static void diff_flush_raw(struct diff_f
two_paths = 0;
break;
}
- if (output_format != DIFF_FORMAT_NAME_STATUS) {
+ if (!(options->output_format & DIFF_FORMAT_NAME_STATUS)) {
printf(":%06o %06o %s ",
p->one->mode, p->two->mode,
diff_unique_abbrev(p->one->sha1, abbrev));
@@ -1917,48 +1922,30 @@ static void diff_resolve_rename_copy(voi
diff_debug_queue("resolve-rename-copy done", q);
}
-static void flush_one_pair(struct diff_filepair *p,
- int diff_output_format,
- struct diff_options *options,
- struct diffstat_t *diffstat)
+static int check_pair_status(struct diff_filepair *p)
{
- int inter_name_termination = '\t';
- int line_termination = options->line_termination;
- if (!line_termination)
- inter_name_termination = 0;
-
switch (p->status) {
case DIFF_STATUS_UNKNOWN:
- break;
+ return 0;
case 0:
die("internal error in diff-resolve-rename-copy");
- break;
default:
- switch (diff_output_format) {
- case DIFF_FORMAT_DIFFSTAT:
- diff_flush_stat(p, options, diffstat);
- break;
- case DIFF_FORMAT_CHECKDIFF:
- diff_flush_checkdiff(p, options);
- break;
- case DIFF_FORMAT_PATCH:
- diff_flush_patch(p, options);
- break;
- case DIFF_FORMAT_RAW:
- case DIFF_FORMAT_NAME_STATUS:
- diff_flush_raw(p, line_termination,
- inter_name_termination,
- options, diff_output_format);
- break;
- case DIFF_FORMAT_NAME:
- diff_flush_name(p, line_termination);
- break;
- case DIFF_FORMAT_NO_OUTPUT:
- break;
- }
+ return 1;
}
}
+static void flush_one_pair(struct diff_filepair *p, struct diff_options *opt)
+{
+ int fmt = opt->output_format;
+
+ if (fmt & DIFF_FORMAT_CHECKDIFF)
+ diff_flush_checkdiff(p, opt);
+ else if (fmt & (DIFF_FORMAT_RAW | DIFF_FORMAT_NAME_STATUS))
+ diff_flush_raw(p, opt);
+ else if (fmt & DIFF_FORMAT_NAME)
+ diff_flush_name(p, opt->line_termination);
+}
+
static void show_file_mode_name(const char *newdelete, struct diff_filespec *fs)
{
if (fs->mode)
@@ -2041,55 +2028,61 @@ static void diff_summary(struct diff_fil
void diff_flush(struct diff_options *options)
{
struct diff_queue_struct *q = &diff_queued_diff;
- int i;
- int diff_output_format = options->output_format;
- struct diffstat_t *diffstat = NULL;
+ int i, output_format = options->output_format;
- if (diff_output_format == DIFF_FORMAT_DIFFSTAT || options->with_stat) {
- diffstat = xcalloc(sizeof (struct diffstat_t), 1);
- diffstat->xm.consume = diffstat_consume;
- }
+ /*
+ * Order: raw, stat, summary, patch
+ * or: name/name-status/checkdiff (other bits clear)
+ */
- if (options->with_raw) {
+ if (output_format & (DIFF_FORMAT_RAW |
+ DIFF_FORMAT_NAME |
+ DIFF_FORMAT_NAME_STATUS |
+ DIFF_FORMAT_CHECKDIFF)) {
for (i = 0; i < q->nr; i++) {
struct diff_filepair *p = q->queue[i];
- flush_one_pair(p, DIFF_FORMAT_RAW, options, NULL);
+ if (check_pair_status(p))
+ flush_one_pair(p, options);
}
- putchar(options->line_termination);
}
- if (options->with_stat) {
+
+ if (output_format & DIFF_FORMAT_DIFFSTAT) {
+ struct diffstat_t *diffstat;
+
+ diffstat = xcalloc(sizeof (struct diffstat_t), 1);
+ diffstat->xm.consume = diffstat_consume;
for (i = 0; i < q->nr; i++) {
struct diff_filepair *p = q->queue[i];
- flush_one_pair(p, DIFF_FORMAT_DIFFSTAT, options,
- diffstat);
+ if (check_pair_status(p))
+ diff_flush_stat(p, options, diffstat);
}
show_stats(diffstat);
free(diffstat);
- diffstat = NULL;
- if (options->summary)
- for (i = 0; i < q->nr; i++)
- diff_summary(q->queue[i]);
- if (options->stat_sep)
- fputs(options->stat_sep, stdout);
- else
- 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);
}
- if (diffstat) {
- show_stats(diffstat);
- free(diffstat);
+ if (output_format & DIFF_FORMAT_SUMMARY) {
+ for (i = 0; i < q->nr; i++)
+ diff_summary(q->queue[i]);
}
- for (i = 0; i < q->nr; i++) {
- if (diffstat && options->summary)
- diff_summary(q->queue[i]);
- diff_free_filepair(q->queue[i]);
+ if (output_format & DIFF_FORMAT_PATCH) {
+ if (output_format & (DIFF_FORMAT_DIFFSTAT |
+ DIFF_FORMAT_SUMMARY)) {
+ if (options->stat_sep)
+ fputs(options->stat_sep, stdout);
+ else
+ putchar(options->line_termination);
+ }
+
+ for (i = 0; i < q->nr; i++) {
+ struct diff_filepair *p = q->queue[i];
+ if (check_pair_status(p))
+ diff_flush_patch(p, options);
+ }
}
+ for (i = 0; i < q->nr; i++)
+ diff_free_filepair(q->queue[i]);
free(q->queue);
q->queue = NULL;
q->nr = q->alloc = 0;
diff --git a/diff.h b/diff.h
index b61fdc8..2b6dc0c 100644
--- a/diff.h
+++ b/diff.h
@@ -20,19 +20,31 @@ typedef void (*add_remove_fn_t)(struct d
const unsigned char *sha1,
const char *base, const char *path);
+#define DIFF_FORMAT_RAW 0x0001
+#define DIFF_FORMAT_DIFFSTAT 0x0002
+#define DIFF_FORMAT_SUMMARY 0x0004
+#define DIFF_FORMAT_PATCH 0x0008
+
+/* These override all above */
+#define DIFF_FORMAT_NAME 0x0010
+#define DIFF_FORMAT_NAME_STATUS 0x0020
+#define DIFF_FORMAT_CHECKDIFF 0x0040
+
+/* Same as output_format = 0 but we know that -s flag was given
+ * and we should not give default value to output_format.
+ */
+#define DIFF_FORMAT_NO_OUTPUT 0x0080
+
struct diff_options {
const char *filter;
const char *orderfile;
const char *pickaxe;
unsigned recursive:1,
- with_raw:1,
- with_stat:1,
tree_in_recursive:1,
binary:1,
full_index:1,
silent_on_remove:1,
find_copies_harder:1,
- summary:1,
color_diff:1;
int context;
int break_opt;
@@ -151,15 +163,6 @@ #define COMMON_DIFF_OPTIONS_HELP \
" show all files diff when -S is used and hit is found.\n"
extern int diff_queue_is_empty(void);
-
-#define DIFF_FORMAT_RAW 1
-#define DIFF_FORMAT_PATCH 2
-#define DIFF_FORMAT_NO_OUTPUT 3
-#define DIFF_FORMAT_NAME 4
-#define DIFF_FORMAT_NAME_STATUS 5
-#define DIFF_FORMAT_DIFFSTAT 6
-#define DIFF_FORMAT_CHECKDIFF 7
-
extern void diff_flush(struct diff_options*);
/* diff-raw status letters */
diff --git a/log-tree.c b/log-tree.c
index ebb49f2..7d4c51f 100644
--- a/log-tree.c
+++ b/log-tree.c
@@ -163,8 +163,13 @@ int log_tree_diff_flush(struct rev_info
return 0;
}
- if (opt->loginfo && !opt->no_commit_id)
- show_log(opt, opt->loginfo, opt->diffopt.with_stat ? "---\n" : "\n");
+ if (opt->loginfo && !opt->no_commit_id) {
+ if (opt->diffopt.output_format & DIFF_FORMAT_DIFFSTAT) {
+ show_log(opt, opt->loginfo, "---\n");
+ } else {
+ show_log(opt, opt->loginfo, "\n");
+ }
+ }
diff_flush(&opt->diffopt);
return 1;
}
--
1.4.1.rc1.g8637
^ permalink raw reply related
* [PATCH 3/7] Make --raw option available for all diff commands
From: Timo Hirvonen @ 2006-06-24 17:23 UTC (permalink / raw)
To: junkio; +Cc: git
In-Reply-To: <20060624201843.a5b4f7b9.tihirvon@gmail.com>
Signed-off-by: Timo Hirvonen <tihirvon@gmail.com>
---
builtin-diff.c | 48 ++++++++++++------------------------------------
diff.c | 2 ++
2 files changed, 14 insertions(+), 36 deletions(-)
diff --git a/builtin-diff.c b/builtin-diff.c
index 3b44296..91235a1 100644
--- a/builtin-diff.c
+++ b/builtin-diff.c
@@ -39,8 +39,6 @@ static int builtin_diff_files(struct rev
revs->max_count = 3;
else if (!strcmp(arg, "-q"))
silent = 1;
- else if (!strcmp(arg, "--raw"))
- revs->diffopt.output_format = DIFF_FORMAT_RAW;
else
usage(builtin_diff_usage);
argv++; argc--;
@@ -107,14 +105,9 @@ static int builtin_diff_b_f(struct rev_i
/* Blob vs file in the working tree*/
struct stat st;
- while (1 < argc) {
- const char *arg = argv[1];
- if (!strcmp(arg, "--raw"))
- revs->diffopt.output_format = DIFF_FORMAT_RAW;
- else
- usage(builtin_diff_usage);
- argv++; argc--;
- }
+ if (argc > 1)
+ usage(builtin_diff_usage);
+
if (lstat(path, &st))
die("'%s': %s", path, strerror(errno));
if (!(S_ISREG(st.st_mode) || S_ISLNK(st.st_mode)))
@@ -137,14 +130,9 @@ static int builtin_diff_blobs(struct rev
*/
unsigned mode = canon_mode(S_IFREG | 0644);
- while (1 < argc) {
- const char *arg = argv[1];
- if (!strcmp(arg, "--raw"))
- revs->diffopt.output_format = DIFF_FORMAT_RAW;
- else
- usage(builtin_diff_usage);
- argv++; argc--;
- }
+ if (argc > 1)
+ usage(builtin_diff_usage);
+
stuff_change(&revs->diffopt,
mode, mode,
blob[1].sha1, blob[0].sha1,
@@ -162,8 +150,6 @@ static int builtin_diff_index(struct rev
const char *arg = argv[1];
if (!strcmp(arg, "--cached"))
cached = 1;
- else if (!strcmp(arg, "--raw"))
- revs->diffopt.output_format = DIFF_FORMAT_RAW;
else
usage(builtin_diff_usage);
argv++; argc--;
@@ -185,14 +171,9 @@ static int builtin_diff_tree(struct rev_
{
const unsigned char *(sha1[2]);
int swap = 0;
- while (1 < argc) {
- const char *arg = argv[1];
- if (!strcmp(arg, "--raw"))
- revs->diffopt.output_format = DIFF_FORMAT_RAW;
- else
- usage(builtin_diff_usage);
- argv++; argc--;
- }
+
+ if (argc > 1)
+ usage(builtin_diff_usage);
/* We saw two trees, ent[0] and ent[1].
* if ent[1] is unintesting, they are swapped
@@ -214,14 +195,9 @@ static int builtin_diff_combined(struct
const unsigned char (*parent)[20];
int i;
- while (1 < argc) {
- const char *arg = argv[1];
- if (!strcmp(arg, "--raw"))
- revs->diffopt.output_format = DIFF_FORMAT_RAW;
- else
- usage(builtin_diff_usage);
- argv++; argc--;
- }
+ if (argc > 1)
+ usage(builtin_diff_usage);
+
if (!revs->dense_combined_merges && !revs->combine_merges)
revs->dense_combined_merges = revs->combine_merges = 1;
parent = xmalloc(ents * sizeof(*parent));
diff --git a/diff.c b/diff.c
index bfed79c..6e5ae77 100644
--- a/diff.c
+++ b/diff.c
@@ -1467,6 +1467,8 @@ int diff_opt_parse(struct diff_options *
options->output_format |= DIFF_FORMAT_PATCH;
else if (opt_arg(arg, 'U', "unified", &options->context))
options->output_format |= DIFF_FORMAT_PATCH;
+ else if (!strcmp(arg, "--raw"))
+ options->output_format |= DIFF_FORMAT_RAW;
else if (!strcmp(arg, "--patch-with-raw")) {
options->output_format |= DIFF_FORMAT_PATCH | DIFF_FORMAT_RAW;
}
--
1.4.1.rc1.g8637
^ permalink raw reply related
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