[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Criteria for Acceptable Git to ChangeLog
From: |
John Darrington |
Subject: |
Re: Criteria for Acceptable Git to ChangeLog |
Date: |
Thu, 17 May 2018 16:44:38 +0200 |
User-agent: |
Mutt/1.5.23 (2014-03-12) |
I did a few experiments and it seems to me, that GNU diff's -p option
already does what you want. Can you check the following example to
see if it does what you require (the entities are in the lines marked
with ************** at the end of this mail).
Example: File old.c:
struct this
{
int x;
long y;
short z;
};
union that
{
char a;
unsigned char b;
signed char c;
};
static struct this foo;
int
main (int argc, char **argv)
{
/* A comment */
/* Another comment */
return 0;
}
And File new.c:
struct this
{
int x;
long y;
short z;
char n;
};
union that
{
char a;
unsigned char b;
signed char c;
void *ppp;
};
static struct this foo;
int
main (int argc, char **argv)
{
/* A comment */
/* Another comment */
int xx;
return 0;
}
When compared using diff -p old.c new.c gives:
*** old.c Thu May 17 16:39:13 2018
--- new.c Thu May 17 16:39:34 2018
*************** struct this
*** 3,8 ****
--- 3,10 ----
int x;
long y;
short z;
+
+ char n;
};
*************** union that
*** 11,16 ****
--- 13,19 ----
char a;
unsigned char b;
signed char c;
+ void *ppp;
};
*************** main (int argc, char **argv)
*** 21,25 ****
--- 24,29 ----
{
/* A comment */
/* Another comment */
+ int xx;
return 0;
}
signature.asc
Description: Digital signature
- Re: Using VC for change descriptions, (continued)
- Criteria for Acceptable Git to ChangeLog, John Darrington, 2018/05/12
- Re: Criteria for Acceptable Git to ChangeLog, Richard Stallman, 2018/05/12
- Re: Criteria for Acceptable Git to ChangeLog, John Darrington, 2018/05/15
- Re: Criteria for Acceptable Git to ChangeLog, Richard Stallman, 2018/05/15
- Re: Criteria for Acceptable Git to ChangeLog, John Darrington, 2018/05/16
- Re: Criteria for Acceptable Git to ChangeLog, Richard Stallman, 2018/05/16
- Re: Criteria for Acceptable Git to ChangeLog,
John Darrington <=
- Re: Using VC for change descriptions, Richard Stallman, 2018/05/14
- Re: Using VC for change descriptions, Joseph Myers, 2018/05/14