[prev in list] [next in list] [prev in thread] [next in thread] 

List:       gameoftrees
Subject:    Re: got.1: commit examples
From:       Stefan Sperling <stsp () stsp ! name>
Date:       2020-05-20 17:43:54
Message-ID: 20200520174354.GC21112 () ted ! stsp ! name
[Download RAW message or body]

On Wed, May 20, 2020 at 12:23:05PM -0400, Scott Bennett wrote:
> > Could we explicitly state here that the user is expected to read a prepared
> > log message file into the editor's buffer? That might make this example easier
> > to follow for readers who don't already know what vi's :r command does.
> 
> Yes I think that would be a good hint. Perhaps something like below?

Yes, looks good to me. I have just applied this. Thank you!


FYI, both diffs you sent required manual tweaking before they would
apply. Seems to be due to a wrapped line:

> diff --git a/got/got.1 b/got/got.1
> index 37523a3..15bd5b8 100644
> --- a/got/got.1
> +++ b/got/got.1
> @@ -1968,10 +1968,23 @@ Add new files and remove obsolete files in a
> work tree directory:

I could apply the patch only after removing the line 'work tree directory:'
above. Otherwise I got this error from patch(1):

|
|diff --git a/got/got.1 b/got/got.1
|index 37523a3..15bd5b8 100644
|--- a/got/got.1
|+++ b/got/got.1
--------------------------
Patching file got/got.1 using Plan A...
patch: **** malformed patch at line 56: work tree directory:

>  Create a new commit from local changes in a work tree directory
>  with a pre-defined log message.
>  .Pp
>  .Dl $ got commit -m 'unify the buffer cache'
>  .Pp
> +Alternatively, create a new commit from local changes in a work tree
> +directory with a log message that has been prepared in the file
> +.Pa /tmp/msg .
> +If
> +.Xr vi 1
> +is set as the
> +.Ev EDITOR ,
> +.Pa /tmp/msg
> +can be read into the buffer for review:
> +.Pp
> +.Dl $ got commit
> +.Dl :r /tmp/msg
> +.Pp
>  Update any work tree checked out from the
>  .Dq unified-buffer-cache
>  branch to the latest commit on this branch:
>  .Pp
>  .Dl $ got update
> 



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic