unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Some question about code line count when sign GPL paper
@ 2021-02-17  2:18 tumashu
  2021-02-17  4:21 ` Stefan Monnier
  2021-02-18  6:02 ` Richard Stallman
  0 siblings, 2 replies; 3+ messages in thread
From: tumashu @ 2021-02-17  2:18 UTC (permalink / raw)
  To: emacs-devel@gnu.org


* Case 1

** I have a function in my package.
(defun test1 ()
  (let ((a 1)
        (b 2)
        (c 3)
        (d 4)
        (e 5))
    (print "test1")))


** Contributer add another new function which is very similar test1. 

(defun test2 ()            
  (let ((a 1)
        (b 2)
        (c 3)
        (d 4)
        (e 5))
    (print "test2")))  ;; the only different line from test1


should I count this countribution 7 lines or 1 line?

* Case2

If I can't let a contributer to sign GPL paper, How should I do:

1. just rewrite or revert his code and do not need to wash repo history?
2. remove his commit, by wash repo history?





^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Some question about code line count when sign GPL paper
  2021-02-17  2:18 Some question about code line count when sign GPL paper tumashu
@ 2021-02-17  4:21 ` Stefan Monnier
  2021-02-18  6:02 ` Richard Stallman
  1 sibling, 0 replies; 3+ messages in thread
From: Stefan Monnier @ 2021-02-17  4:21 UTC (permalink / raw)
  To: tumashu; +Cc: emacs-devel@gnu.org

> ** Contributer add another new function which is very similar test1. 
[...]
>     (print "test2")))  ;; the only different line from test1
>
> should I count this countribution 7 lines or 1 line?

The "line count" is approximative, it's really best to think of
"information content" (similar to kolmogorov complexity, in a sense), so
I think I'd count it more like 1 than like 7.

> * Case2
>
> If I can't let a contributer to sign GPL paper, How should I do:
>
> 1. just rewrite or revert his code and do not need to wash repo history?
> 2. remove his commit, by wash repo history?

It's best if it doesn't get into the repo's history, but it's usually
not worth the trouble "washing" the repo's history, no.

BTW, for your above example, I'd take the change as-is and then add
a new change on top of it which combines the two functions into one to
reduce the code redundancy.  It will also have the side-benefit of
clarifying that his contribution is really just that one line.


        Stefan




^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Some question about code line count when sign GPL paper
  2021-02-17  2:18 Some question about code line count when sign GPL paper tumashu
  2021-02-17  4:21 ` Stefan Monnier
@ 2021-02-18  6:02 ` Richard Stallman
  1 sibling, 0 replies; 3+ messages in thread
From: Richard Stallman @ 2021-02-18  6:02 UTC (permalink / raw)
  To: tumashu; +Cc: emacs-devel

[[[ To any NSA and FBI agents reading my email: please consider    ]]]
[[[ whether defending the US Constitution against all enemies,     ]]]
[[[ foreign or domestic, requires you to follow Snowden's example. ]]]

  >     (print "test2")))  ;; the only different line from test1


  > should I count this countribution 7 lines or 1 line?

The changes are limited to one line, but the change in that line
is trivial.  Perhaps it should count as 0.1 line.

There is no hard and fast rule here.  Ten lines of complex code
are much more significant than ten lines of trivial changes like that.

I'm trying to give a simple rule that approximates a judgment call.
There is no obvious correct way to do it.

-- 
Dr Richard Stallman
Chief GNUisance of the GNU Project (https://gnu.org)
Founder, Free Software Foundation (https://fsf.org)
Internet Hall-of-Famer (https://internethalloffame.org)





^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-02-18  6:02 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-17  2:18 Some question about code line count when sign GPL paper tumashu
2021-02-17  4:21 ` Stefan Monnier
2021-02-18  6:02 ` Richard Stallman

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).