nmh-workers
[Top] [All Lists]

Re: [Nmh-workers] Merging Source Files with git.

2017-11-11 10:01:27
On Fri, 10 Nov 2017 23:51:07 +0000, Ralph Corderoy said:

This suggests foo_{add,del,find,save,tweak}.c should in time become
foo.c, allowing globals to become statics in foo.c, and currently global
structs, etc., to also move to foo.c.  Is there a good way of doing
this, in multiple stages if necessary, that allows git to preserve the
chain of history?  Say telling it foo_add.c is now foo.c in one commit,
and then foo_del.c has merged with foo.c in the next.

"Say telling it foo_add.c is now foo.c in one commit,"

"git mv" has you covered.

"foo_del.c has merged with foo.c in the next."

Best practice here is to generate a commit that *only* does
the merge (plus any #include surgery, etc to make a clean compile),
and explain it was a code migration in the commit comment.

Attachment: pgpCyIuoEnzlz.pgp
Description: PGP signature

-- 
Nmh-workers
https://lists.nongnu.org/mailman/listinfo/nmh-workers
<Prev in Thread] Current Thread [Next in Thread>