Re: [PATCH v13] [GSOC] commit: add --trailer option
- From
ZheNing Hu <adlternative@gmail.com>
- Date
- Mar 23, 2021, 06:29 UTC
- Message-ID
- <CAOLTT8S09oTZYjDArMNhQSLAaHtikrw=H4Z8WHF9GvWukQytaQ@mail.gmail.com>
- In-Reply-To
- <CAP8UFD275WiHC2sUJjsnLd1yonfMO-SVda=BZ6mMkgDxGs959g@mail.gmail.com>
Christian Couder <christian.couder@gmail.com> 于2021年3月23日周二 上午5:55写道:
Show 10 quoted lines
> > On Mon, Mar 22, 2021 at 11:23 AM ZheNing Hu <adlternative@gmail.com> wrote: > > > 2. > > `git interpret-trailers --in-place` seem like work on git top-dir, > > If I am in a sub-dir `b` and I want to change a file such as `d.c`, > > then I must use `git interpret-trailers --in-place b/d.c` to add some > > trailers. > > What happens without --in-place? Are the input files read correctly?
It's still wrong. the git die() in `read_input_file` of "trailer.c".
Show 9 quoted lines
> > > I think the original intention of `--in-place` is to modify a file similar to > > "$COMMIT_MSG_FILE", so make it run at top-dir, but this is not reflected > > in the git documentation. This at least confuses people who use this > > option for the first time. Is it worth modifying? Or is there something > > wrong with the design of `--in-place`? > > I haven't checked but there is perhaps a bug in > create_in_place_tempfile() in "trailer.c".
I haven't check finished. But I think it may do something like `chdir()`.
Thanks.