* Potential bug: truncated diff output
@ 2014-01-16 6:19 Misha Penkov
2014-01-16 6:31 ` David Kastrup
2014-01-16 6:55 ` Johannes Sixt
0 siblings, 2 replies; 5+ messages in thread
From: Misha Penkov @ 2014-01-16 6:19 UTC (permalink / raw)
To: git
I have a file in a git repo. It has changed during the last two
commits. I want to see the changes made in these two commits. The
following command should work:
git diff HEAD^^
but that doesn't get me the expected results. Read on for details.
Last commit: I changed some stuff towards the end of the file, for
example, around line 3145. Here's the full diff (it's here for
reference, don't bother reading all of it):
$git diff HEAD^ HEAD ieicej.cls
diff --git a/ieicej.cls b/ieicej.cls
index ecf8beb..01debd9 100644
--- a/ieicej.cls
+++ b/ieicej.cls
@@ -2250,7 +2250,7 @@
%
%\renewcommand{\thesection}{\@arabic\c@section.}
\renewcommand{\thesection}{\@arabic\c@section}
-\renewcommand{\thesubsection}{\thesection\,\@arabic\c@subsection}
+\renewcommand{\thesubsection}{\thesection.\,\@arabic\c@subsection}
\renewcommand{\thesubsubsection}{%
\thesubsection.\,\@arabic\c@subsubsection}
\renewcommand{\theparagraph}{% (
@@ -2369,7 +2369,7 @@
\inhibitglue #1%
\else
\def\@makefnmark{\kern0pt\hbox to \z@{%
- $^{\mbox{\tiny \kern-.5zw (注\@thefnmark{})\kern-.5zw}}$\hss}}%
+ $^{\mbox{\tiny \kern-.5zw (\@thefnmark{})\kern-.5zw}}$\hss}}%
\kanjiskip\z@ \@plus 1fill \@minus 1fill\xkanjiskip=\kanjiskip
\jmathkanjiskip=\kanjiskip
\hbox to 5zw{\inhibitglue #1\hfil}%
@@ -3145,11 +3145,11 @@
\kern 2.715\p@}
\def\@makefnmark{\hbox{$^{\mbox{\tiny \kern-.5zw
- (注\kern.1zw\@thefnmark{})\kern-.5zw}}$}}
+ (\kern.1zw\@thefnmark{})\kern-.5zw}}$}}
\newcommand\@makefntext[1]{\parindent1zw
\noindent\hbox{\kern-.5zw
- (注\kern.1zw\@thefnmark{})\kern-.5zw\hbox to 1zw{\hss :\hss}}#1}
+ (\kern.1zw\@thefnmark{})\kern-.5zw\hbox to 1zw{\hss :\hss}}#1}
\def\thefootnote{\@arabic\c@footnote}
\def\thempfootnote{\@fnsymbol\c@mpfootnote}
Here's the second-last commit. I changed some things around line 1714.
Full commit diff (again, for reference only):
$git diff -p HEAD^^ HEAD^ ieicej.cls
diff --git a/ieicej.cls b/ieicej.cls
index 1c3b947..ecf8beb 100644
--- a/ieicej.cls
+++ b/ieicej.cls
@@ -1714,51 +1714,57 @@
\setbox\@tempboxa\vbox{%
\def\baselinestretch{\@titlepagebaselinestretch}%
\hskip8mm
- \vtop{\footnotesize\baselineskip3mm
- \hbox{社団法人\hskip1zw 電子情報通信学会}%
- \hbox{THE INSTITUTE OF ELECTRONICS,}%
- \hbox{INFORMATION AND COMMUNICATION ENGINEERS}%
- }\hfill
- \vtop{\footnotesize\baselineskip3mm
- \hbox{信学技報}%
- \hbox{TECHNICAL REPORT OF IEICE.}%
- \hbox{}%
- }\hskip8mm\hbox{}\par
+% \vtop{\footnotesize\baselineskip3mm
+% \hbox{社団法人\hskip1zw 電子情報通信学会}%
+% \hbox{THE INSTITUTE OF ELECTRONICS,}%
+% \hbox{INFORMATION AND COMMUNICATION ENGINEERS}%
+% }\hfill
+% \vtop{\footnotesize\baselineskip3mm
+% \hbox{信学技報}%
+% \hbox{TECHNICAL REPORT OF IEICE.}%
+% \hbox{}%
+% }\hskip8mm\hbox{}\par
\vskip\baselineskip
- \bgroup
- \centering
- {\fontsize{16}{23}\selectfont
- \@jtitle\par
- }%
- \vskip.25\baselineskip
- \ifx\@jsubtitle\empty
- \else
- {\huge
- \@jsubtitle\par
- }%
- \vskip.25\baselineskip
- \fi
- {\LARGE
- \@outputJauthorlist\par
- }%
- \vskip.5\baselineskip
- {\fontsize{10.5}{15}\selectfont
- \J@affiliate\par
- \Jp@affiliate\par
- \ifx\@MailAddress\empty
- \fmt@Ema
- \ifx\header@ma\empty
- \vskip.5\baselineskip
- \else
- E-mail: \Mail@ddress\par
- \vskip.5\baselineskip
- \fi
- \else
- E-mail: \@MailAddress
- \vskip.5\baselineskip
- \fi
- }%
- \egroup
+%
+% My paper doesn't have a Japanese title.
+% The template still insists on printing author names and
affiliations in Japanese.
+% Without a title, it author names and affiliations look kind of stupid.
+% I think this is the part that does it, so I'm commenting it out
in an effort to reduce the amount of stupid in this paper.
+%
+% \bgroup
+% \centering
+% {\fontsize{16}{23}\selectfont
+% \@jtitle\par
+% }%
+% \vskip.25\baselineskip
+% \ifx\@jsubtitle\empty
+% \else
+% {\huge
+% \@jsubtitle\par
+% }%
+% \vskip.25\baselineskip
+% \fi
+% {\LARGE
+% \@outputJauthorlist\par
+% }%
+% \vskip.5\baselineskip
+% {\fontsize{10.5}{15}\selectfont
+% \J@affiliate\par
+% \Jp@affiliate\par
+% \ifx\@MailAddress\empty
+% \fmt@Ema
+% \ifx\header@ma\empty
+% \vskip.5\baselineskip
+% \else
+% E-mail: \Mail@ddress\par
+% \vskip.5\baselineskip
+% \fi
+% \else
+% E-mail: \@MailAddress
+% \vskip.5\baselineskip
+% \fi
+% }%
+% \egroup
\bgroup\large
\leavevmode
\unhbox\jabstractbox\par
@@ -2239,7 +2245,11 @@
\newcounter{subsubsection}[subsection]
\newcounter{paragraph}[subsubsection]
\newcounter{subparagraph}[paragraph]
-\renewcommand{\thesection}{\@arabic\c@section.}
+%
+% Whoever thought it's a great idea to place periods after
section numbers should be shot.
+%
+%\renewcommand{\thesection}{\@arabic\c@section.}
+\renewcommand{\thesection}{\@arabic\c@section}
\renewcommand{\thesubsection}{\thesection\,\@arabic\c@subsection}
\renewcommand{\thesubsubsection}{%
\thesubsection.\,\@arabic\c@subsubsection}
@@ -2359,7 +2369,7 @@
\inhibitglue #1%
\else
\def\@makefnmark{\kern0pt\hbox to \z@{%
- $^{\mbox{\tiny \kern-.5zw (\@thefnmark{})\kern-.5zw}}$\hss}}%
+ $^{\mbox{\tiny \kern-.5zw (注\@thefnmark{})\kern-.5zw}}$\hss}}%
\kanjiskip\z@ \@plus 1fill \@minus 1fill\xkanjiskip=\kanjiskip
\jmathkanjiskip=\kanjiskip
\hbox to 5zw{\inhibitglue #1\hfil}%
@@ -3135,11 +3145,11 @@
\kern 2.715\p@}
\def\@makefnmark{\hbox{$^{\mbox{\tiny \kern-.5zw
- (\kern.1zw\@thefnmark{})\kern-.5zw}}$}}
+ (注\kern.1zw\@thefnmark{})\kern-.5zw}}$}}
\newcommand\@makefntext[1]{\parindent1zw
\noindent\hbox{\kern-.5zw
- (\kern.1zw\@thefnmark{})\kern-.5zw\hbox to 1zw{\hss :\hss}}#1}
+ (注\kern.1zw\@thefnmark{})\kern-.5zw\hbox to 1zw{\hss :\hss}}#1}
\def\thefootnote{\@arabic\c@footnote}
\def\thempfootnote{\@fnsymbol\c@mpfootnote}
As I mentioned in the first paragraph, I want to generate a patch that
includes both commits:
$git diff HEAD^^ HEAD ieicej.cls
diff --git a/ieicej.cls b/ieicej.cls
index 1c3b947..01debd9 100644
--- a/ieicej.cls
+++ b/ieicej.cls
@@ -1714,51 +1714,57 @@
\setbox\@tempboxa\vbox{%
\def\baselinestretch{\@titlepagebaselinestretch}%
\hskip8mm
- \vtop{\footnotesize\baselineskip3mm
- \hbox{社団法人\hskip1zw 電子情報通信学会}%
- \hbox{THE INSTITUTE OF ELECTRONICS,}%
- \hbox{INFORMATION AND COMMUNICATION ENGINEERS}%
- }\hfill
- \vtop{\footnotesize\baselineskip3mm
- \hbox{信学技報}%
- \hbox{TECHNICAL REPORT OF IEICE.}%
- \hbox{}%
- }\hskip8mm\hbox{}\par
+% \vtop{\footnotesize\baselineskip3mm
+% \hbox{社団法人\hskip1zw 電子情報通信学会}%
+% \hbox{THE INSTITUTE OF ELECTRONICS,}%
+% \hbox{INFORMATION AND COMMUNICATION ENGINEERS}%
+% }\hfill
+% \vtop{\footnotesize\baselineskip3mm
+% \hbox{信学技報}%
+% \hbox{TECHNICAL REPORT OF IEICE.}%
+% \hbox{}%
+% }\hskip8mm\hbox{}\par
\vskip\baselineskip
- \bgroup
- \centering
- {\fontsize{16}{23}\selectfont
- \@jtitle\par
- }%
- \vskip.25\baselineskip
- \ifx\@jsubtitle\empty
- \else
- {\huge
- \@jsubtitle\par
- }%
- \vskip.25\baselineskip
- \fi
- {\LARGE
- \@outputJauthorlist\par
- }%
- \vskip.5\baselineskip
- {\fontsize{10.5}{15}\selectfont
- \J@affiliate\par
- \Jp@affiliate\par
- \ifx\@MailAddress\empty
- \fmt@Ema
- \ifx\header@ma\empty
- \vskip.5\baselineskip
- \else
- E-mail: \Mail@ddress\par
- \vskip.5\baselineskip
- \fi
- \else
- E-mail: \@MailAddress
- \vskip.5\baselineskip
- \fi
- }%
- \egroup
+%
+% My paper doesn't have a Japanese title.
+% The template still insists on printing author names and
affiliations in Japanese.
+% Without a title, it author names and affiliations look kind of stupid.
+% I think this is the part that does it, so I'm commenting it out
in an effort to reduce the amount of stupid in this paper.
+%
+% \bgroup
+% \centering
+% {\fontsize{16}{23}\selectfont
+% \@jtitle\par
+% }%
+% \vskip.25\baselineskip
+% \ifx\@jsubtitle\empty
+% \else
+% {\huge
+% \@jsubtitle\par
+% }%
+% \vskip.25\baselineskip
+% \fi
+% {\LARGE
+% \@outputJauthorlist\par
+% }%
+% \vskip.5\baselineskip
+% {\fontsize{10.5}{15}\selectfont
+% \J@affiliate\par
+% \Jp@affiliate\par
+% \ifx\@MailAddress\empty
+% \fmt@Ema
+% \ifx\header@ma\empty
+% \vskip.5\baselineskip
+% \else
+% E-mail: \Mail@ddress\par
+% \vskip.5\baselineskip
+% \fi
+% \else
+% E-mail: \@MailAddress
+% \vskip.5\baselineskip
+% \fi
+% }%
+% \egroup
\bgroup\large
\leavevmode
\unhbox\jabstractbox\par
@@ -2239,8 +2245,12 @@
\newcounter{subsubsection}[subsection]
\newcounter{paragraph}[subsubsection]
\newcounter{subparagraph}[paragraph]
-\renewcommand{\thesection}{\@arabic\c@section.}
-\renewcommand{\thesubsection}{\thesection\,\@arabic\c@subsection}
+%
+% Whoever thought it's a great idea to place periods after
section numbers should be shot.
+%
+%\renewcommand{\thesection}{\@arabic\c@section.}
+\renewcommand{\thesection}{\@arabic\c@section}
+\renewcommand{\thesubsection}{\thesection.\,\@arabic\c@subsection}
\renewcommand{\thesubsubsection}{%
\thesubsection.\,\@arabic\c@subsubsection}
\renewcommand{\theparagraph}{% (
This looks wrong, since it doesn't include the last commit. For
example, changes to line 3145 are not there. It appears to include
changes from the second-last commit (e.g. the stuff around line 1714).
My questions:
1) What am I doing wrong?
2) How can I get the diff to include all the commits in their entirety?
3) Is this a bug?
Cheers,
Michael
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Potential bug: truncated diff output
2014-01-16 6:19 Potential bug: truncated diff output Misha Penkov
@ 2014-01-16 6:31 ` David Kastrup
2014-01-16 6:55 ` Johannes Sixt
1 sibling, 0 replies; 5+ messages in thread
From: David Kastrup @ 2014-01-16 6:31 UTC (permalink / raw)
To: git
Misha Penkov <misha.penkov@gmail.com> writes:
> I have a file in a git repo. It has changed during the last two
> commits. I want to see the changes made in these two commits. The
> following command should work:
>
> git diff HEAD^^
>
> but that doesn't get me the expected results. Read on for details.
> As I mentioned in the first paragraph, I want to generate a patch that
> includes both commits:
>
> $git diff HEAD^^ HEAD ieicej.cls
> This looks wrong, since it doesn't include the last commit. For
> example, changes to line 3145 are not there. It appears to include
> changes from the second-last commit (e.g. the stuff around line 1714).
>
> My questions:
>
> 1) What am I doing wrong?
You did not commit all your changes. Some of them are either only in
your working directory, or in working directory and index.
> 2) How can I get the diff to include all the commits in their
> entirety?
It did.
> 3) Is this a bug?
No.
--
David Kastrup
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Potential bug: truncated diff output
2014-01-16 6:19 Potential bug: truncated diff output Misha Penkov
2014-01-16 6:31 ` David Kastrup
@ 2014-01-16 6:55 ` Johannes Sixt
2014-01-16 7:04 ` David Kastrup
2014-01-16 7:06 ` Misha Penkov
1 sibling, 2 replies; 5+ messages in thread
From: Johannes Sixt @ 2014-01-16 6:55 UTC (permalink / raw)
To: Misha Penkov, git
Am 1/16/2014 7:19, schrieb Misha Penkov:
> I have a file in a git repo. It has changed during the last two
> commits. I want to see the changes made in these two commits. The
> following command should work:
>
> git diff HEAD^^
>
> but that doesn't get me the expected results. Read on for details.
>
> Last commit: I changed some stuff towards the end of the file, for
> example, around line 3145. Here's the full diff (it's here for
> reference, don't bother reading all of it):
>
> $git diff HEAD^ HEAD ieicej.cls
> diff --git a/ieicej.cls b/ieicej.cls
> index ecf8beb..01debd9 100644
> ...
> @@ -3145,11 +3145,11 @@
> \kern 2.715\p@}
>
> \def\@makefnmark{\hbox{$^{\mbox{\tiny \kern-.5zw
> - (注\kern.1zw\@thefnmark{})\kern-.5zw}}$}}
> + (\kern.1zw\@thefnmark{})\kern-.5zw}}$}}
>
> \newcommand\@makefntext[1]{\parindent1zw
> \noindent\hbox{\kern-.5zw
> - (注\kern.1zw\@thefnmark{})\kern-.5zw\hbox to 1zw{\hss :\hss}}#1}
> + (\kern.1zw\@thefnmark{})\kern-.5zw\hbox to 1zw{\hss :\hss}}#1}
>
> \def\thefootnote{\@arabic\c@footnote}
> \def\thempfootnote{\@fnsymbol\c@mpfootnote}
Here, you revert the change...
> Here's the second-last commit. I changed some things around line 1714.
> Full commit diff (again, for reference only):
>
> $git diff -p HEAD^^ HEAD^ ieicej.cls
> diff --git a/ieicej.cls b/ieicej.cls
> index 1c3b947..ecf8beb 100644
> ...
> @@ -3135,11 +3145,11 @@
> \kern 2.715\p@}
>
> \def\@makefnmark{\hbox{$^{\mbox{\tiny \kern-.5zw
> - (\kern.1zw\@thefnmark{})\kern-.5zw}}$}}
> + (注\kern.1zw\@thefnmark{})\kern-.5zw}}$}}
>
> \newcommand\@makefntext[1]{\parindent1zw
> \noindent\hbox{\kern-.5zw
> - (\kern.1zw\@thefnmark{})\kern-.5zw\hbox to 1zw{\hss :\hss}}#1}
> + (注\kern.1zw\@thefnmark{})\kern-.5zw\hbox to 1zw{\hss :\hss}}#1}
>
> \def\thefootnote{\@arabic\c@footnote}
> \def\thempfootnote{\@fnsymbol\c@mpfootnote}
... that you made here.
Unsurprisingly, the net effect is no change in that area -- and git diff
tells you exactly that.
-- Hannes
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Potential bug: truncated diff output
2014-01-16 6:55 ` Johannes Sixt
@ 2014-01-16 7:04 ` David Kastrup
2014-01-16 7:06 ` Misha Penkov
1 sibling, 0 replies; 5+ messages in thread
From: David Kastrup @ 2014-01-16 7:04 UTC (permalink / raw)
To: git
Johannes Sixt <j.sixt@viscovery.net> writes:
> Am 1/16/2014 7:19, schrieb Misha Penkov:
>> I have a file in a git repo. It has changed during the last two
>> commits. I want to see the changes made in these two commits. The
>> following command should work:
>>
>> git diff HEAD^^
>
> Here, you revert the change...
>
> ... that you made here.
>
> Unsurprisingly, the net effect is no change in that area -- and git diff
> tells you exactly that.
Looks like I should have looked into the diffs before making my guess
about what happened.
--
David Kastrup
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Potential bug: truncated diff output
2014-01-16 6:55 ` Johannes Sixt
2014-01-16 7:04 ` David Kastrup
@ 2014-01-16 7:06 ` Misha Penkov
1 sibling, 0 replies; 5+ messages in thread
From: Misha Penkov @ 2014-01-16 7:06 UTC (permalink / raw)
To: Johannes Sixt; +Cc: git
Ah, I see. Thank you.
Michael
On 16 January 2014 15:55, Johannes Sixt <j.sixt@viscovery.net> wrote:
> Am 1/16/2014 7:19, schrieb Misha Penkov:
>> I have a file in a git repo. It has changed during the last two
>> commits. I want to see the changes made in these two commits. The
>> following command should work:
>>
>> git diff HEAD^^
>>
>> but that doesn't get me the expected results. Read on for details.
>>
>> Last commit: I changed some stuff towards the end of the file, for
>> example, around line 3145. Here's the full diff (it's here for
>> reference, don't bother reading all of it):
>>
>> $git diff HEAD^ HEAD ieicej.cls
>> diff --git a/ieicej.cls b/ieicej.cls
>> index ecf8beb..01debd9 100644
>> ...
>> @@ -3145,11 +3145,11 @@
>> \kern 2.715\p@}
>>
>> \def\@makefnmark{\hbox{$^{\mbox{\tiny \kern-.5zw
>> - (注\kern.1zw\@thefnmark{})\kern-.5zw}}$}}
>> + (\kern.1zw\@thefnmark{})\kern-.5zw}}$}}
>>
>> \newcommand\@makefntext[1]{\parindent1zw
>> \noindent\hbox{\kern-.5zw
>> - (注\kern.1zw\@thefnmark{})\kern-.5zw\hbox to 1zw{\hss :\hss}}#1}
>> + (\kern.1zw\@thefnmark{})\kern-.5zw\hbox to 1zw{\hss :\hss}}#1}
>>
>> \def\thefootnote{\@arabic\c@footnote}
>> \def\thempfootnote{\@fnsymbol\c@mpfootnote}
>
> Here, you revert the change...
>
>> Here's the second-last commit. I changed some things around line 1714.
>> Full commit diff (again, for reference only):
>>
>> $git diff -p HEAD^^ HEAD^ ieicej.cls
>> diff --git a/ieicej.cls b/ieicej.cls
>> index 1c3b947..ecf8beb 100644
>> ...
>> @@ -3135,11 +3145,11 @@
>> \kern 2.715\p@}
>>
>> \def\@makefnmark{\hbox{$^{\mbox{\tiny \kern-.5zw
>> - (\kern.1zw\@thefnmark{})\kern-.5zw}}$}}
>> + (注\kern.1zw\@thefnmark{})\kern-.5zw}}$}}
>>
>> \newcommand\@makefntext[1]{\parindent1zw
>> \noindent\hbox{\kern-.5zw
>> - (\kern.1zw\@thefnmark{})\kern-.5zw\hbox to 1zw{\hss :\hss}}#1}
>> + (注\kern.1zw\@thefnmark{})\kern-.5zw\hbox to 1zw{\hss :\hss}}#1}
>>
>> \def\thefootnote{\@arabic\c@footnote}
>> \def\thempfootnote{\@fnsymbol\c@mpfootnote}
>
> ... that you made here.
>
> Unsurprisingly, the net effect is no change in that area -- and git diff
> tells you exactly that.
>
> -- Hannes
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2014-01-16 7:07 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-01-16 6:19 Potential bug: truncated diff output Misha Penkov
2014-01-16 6:31 ` David Kastrup
2014-01-16 6:55 ` Johannes Sixt
2014-01-16 7:04 ` David Kastrup
2014-01-16 7:06 ` Misha Penkov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox