[PATCH] gnu: Add git-subtree.

  • Done
  • quality assurance status badge
Details
4 participants
  • Gábor Boskovits
  • Leo Famulari
  • Ludovic Courtès
  • Ricardo Wurmus
Owner
unassigned
Submitted by
Ricardo Wurmus
Severity
normal
R
R
Ricardo Wurmus wrote on 4 Jan 2018 13:26
(address . guix-patches@gnu.org)(name . Ricardo Wurmus)(address . ricardo.wurmus@mdc-berlin.de)
20180104122635.7097-1-ricardo.wurmus@mdc-berlin.de
* gnu/packages/version-control.scm (git-subtree): New variable.
---
gnu/packages/version-control.scm | 28 +++++++++++++++++++++++++++-
1 file changed, 27 insertions(+), 1 deletion(-)

Toggle diff (55 lines)
diff --git a/gnu/packages/version-control.scm b/gnu/packages/version-control.scm
index cbf5ce7d8..d4c8acb51 100644
--- a/gnu/packages/version-control.scm
+++ b/gnu/packages/version-control.scm
@@ -8,7 +8,7 @@
;;; Copyright © 2014, 2016 Eric Bavier <bavier@member.fsf.org>
;;; Copyright © 2015, 2016, 2017 Efraim Flashner <efraim@flashner.co.il>
;;; Copyright © 2015 Kyle Meyer <kyle@kyleam.com>
-;;; Copyright © 2015, 2017 Ricardo Wurmus <rekado@elephly.net>
+;;; Copyright © 2015, 2017, 2018 Ricardo Wurmus <rekado@elephly.net>
;;; Copyright © 2016, 2017 Leo Famulari <leo@famulari.name>
;;; Copyright © 2016, 2017 ng0 <contact.ng0@cryptolab.net>
;;; Copyright © 2017 Tobias Geerinckx-Rice <me@tobias.gr>
@@ -50,6 +50,7 @@
#:use-module (gnu packages autotools)
#:use-module (gnu packages documentation)
#:use-module (gnu packages base)
+ #:use-module (gnu packages bash)
#:use-module (gnu packages bison)
#:use-module (gnu packages boost)
#:use-module (gnu packages cook)
@@ -375,6 +376,31 @@ everything from small to very large projects with speed and efficiency.")
(license license:gpl2)
(home-page "https://git-scm.com/")))
+(define-public git-subtree
+ (package (inherit git)
+ (name "git-subtree")
+ (outputs '("out"))
+ (arguments
+ `(#:make-flags
+ (list (string-append "prefix=" (assoc-ref %outputs "out"))
+ (string-append "SHELL_PATH="
+ (assoc-ref %build-inputs "bash")
+ "/bin/sh"))
+ ;; Don't run tests because this assumes that we've built git in a
+ ;; parent directory.
+ #:tests? #f
+ #:phases
+ (modify-phases %standard-phases
+ (replace 'configure
+ (lambda _ (chdir "contrib/subtree"))))))
+ (native-inputs
+ `(("bash" ,bash)))
+ (inputs '())
+ (synopsis "Merge git subtrees and split repository into subtrees")
+ (description "This package provides the @code{subtree} subcommand for git.
+Subtrees allow subprojects to be included within a subdirectory of the main
+project, optionally including the subproject's entire history.")))
+
(define-public libgit2
(package
(name "libgit2")
--
2.15.1
L
L
Leo Famulari wrote on 4 Jan 2018 19:02
(name . Ricardo Wurmus)(address . ricardo.wurmus@mdc-berlin.de)(address . 29976@debbugs.gnu.org)
20180104180228.GA9302@jasmine.lan
On Thu, Jan 04, 2018 at 01:26:35PM +0100, Ricardo Wurmus wrote:
Toggle quote (2 lines)
> * gnu/packages/version-control.scm (git-subtree): New variable.

Why not include this in the regular Git package?
-----BEGIN PGP SIGNATURE-----

iQIzBAABCAAdFiEEsFFZSPHn08G5gDigJkb6MLrKfwgFAlpObDQACgkQJkb6MLrK
fwgb1w//YxSJkitLSoyP1kbGwIdEVuUh5c/pMyfuHrWrG7BgqikSXU38DB4AVjm6
XpczDAV3hS8SUGZz2OllGP3q/8p3Hj0VChPRIgPuEmFkHXS+Wvnx42C9hO8v1lbF
mTVfYJcsrSoRD5FnjuPKlvxnr78xhpD7rcM7KrD6QD33GhDVDjib48s07Zif4nS5
7jnm12kEEPXF33cNw+qK6Dt0H2ER9FvdtGsFxj9WMoUp2XBV84GLNB4FITCGAs8x
gm+YgZWL/u88z6457PEdH2i96zonIL/MxNLEld5ey9z1wnA3gEl0TvtXdefc83m5
Sks7RheMEGBs+HkNB+Lrq1AgG9TL3m04rbBHO5SZHwlNVxZEgLfqzdyv8jUF8+WX
SrUDOjKhzk4A7rtTFZK8+hHa49LwLPb5QEAvf/5jiIA8cP2be9w64w0AxawcYxAG
oL+U9d7U28mgOYNfuJsU6TFCJwSO59bVG64KInJh9K9JWiuop31ssaVEbXz4wZ34
HBffKPuQ0yJs8d+Rnv9WMyTK4ZYLs0paxkW02g2p4UzAJN7tIltPV7vSaQt1y56g
h9tWIMVZEFwx3uhUT+Qg026S72IE7CNazCp2Nm6fZpA2U8ULYxqG8x+0EbFm8F/6
768eOBemBixmnjL5uKol8UChpFzAc9DLRrbyKd+rHWagu2bdrKU=
=Itye
-----END PGP SIGNATURE-----


R
R
Ricardo Wurmus wrote on 4 Jan 2018 22:28
(name . Leo Famulari)(address . leo@famulari.name)(address . 29976@debbugs.gnu.org)
87r2r548lp.fsf@mdc-berlin.de
Leo Famulari <leo@famulari.name> writes:

Toggle quote (5 lines)
> On Thu, Jan 04, 2018 at 01:26:35PM +0100, Ricardo Wurmus wrote:
>> * gnu/packages/version-control.scm (git-subtree): New variable.
>
> Why not include this in the regular Git package?

I just wanted to use git-subtree without having to rebuild all packages
that use git for fetching the sources.

We could make this part of the regular git package, but only on
(the next) core-updates.

--
Ricardo
L
L
Leo Famulari wrote on 4 Jan 2018 22:49
(name . Ricardo Wurmus)(address . ricardo.wurmus@mdc-berlin.de)(address . 29976@debbugs.gnu.org)
20180104214951.GA12186@jasmine.lan
On Thu, Jan 04, 2018 at 10:28:18PM +0100, Ricardo Wurmus wrote:
Toggle quote (14 lines)
>
> Leo Famulari <leo@famulari.name> writes:
>
> > On Thu, Jan 04, 2018 at 01:26:35PM +0100, Ricardo Wurmus wrote:
> >> * gnu/packages/version-control.scm (git-subtree): New variable.
> >
> > Why not include this in the regular Git package?
>
> I just wanted to use git-subtree without having to rebuild all packages
> that use git for fetching the sources.
>
> We could make this part of the regular git package, but only on
> (the next) core-updates.

I didn't realize this was an issue. We update the Git package whenever
there is a new release.
-----BEGIN PGP SIGNATURE-----

iQIzBAABCAAdFiEEsFFZSPHn08G5gDigJkb6MLrKfwgFAlpOoXwACgkQJkb6MLrK
fwg0zBAAsk7voojYVMbBdAaDquxHsxQe+vpL/12jlfmCsFMlPNOPXhBOkpYnoH3R
cYFKMMCy3TTqT+JnobbblQXaLpwe6KCX+XeulMMDZQxu1oOyrwDAjbaWh03rYC2K
PjxxcmlR0a+Kvd99JsHIhywUtlDfQzhrWzjAAa/RBiZoIFfVMyFMqXek02AI6Pzo
v0uGlQWDiqWo7blSJXKrAUHlb1chJ5iplpbO5vSdyILvajkqxKnhVmdl/jlyUW2f
jJF9yYJ25WLcbu+r24QaXzSdj+/UrykePl8NvZWSPpEt6SZjZnxKCiG0vCL7gLE1
4TWhLS1aMuOmf+SVsOkzceLA1n4MWkGkWyT1dIBSnl1hG+pWkGGkJCTXQ8E3gWmR
Mo0fi1jSPNmPuxgl2u5qJzl/6LlK1H7emnkiv4VnjrN3LNEldqkpfWD1XnxULsSL
CD3HzUDDeRPlsQoxpXJoaq5OYlr6RuyJ+ZDcPCC2KWajVTXkvecynYx6xE1q7JUX
rnrRqncaCS2fAh8Yb6qnzub/j1e1hbe43Mi700VkmGIj3iz2CQ53ksXlDyNKuSaw
a9sKEeMDaiocr/PjJm33o7zDc1BgZmPJYeKEXEdyKvlVogFCI3VcvwfAsOTM3VQx
9uBxg8zABvADM/solpmSWhE3IebI9nfn/VO3EzKlzWlBGp8/bk8=
=S8f9
-----END PGP SIGNATURE-----


L
L
Leo Famulari wrote on 4 Jan 2018 22:54
(name . Ricardo Wurmus)(address . ricardo.wurmus@mdc-berlin.de)(address . 29976@debbugs.gnu.org)
20180104215445.GA13254@jasmine.lan
On Thu, Jan 04, 2018 at 04:49:51PM -0500, Leo Famulari wrote:
Toggle quote (9 lines)
> > I just wanted to use git-subtree without having to rebuild all packages
> > that use git for fetching the sources.
> >
> > We could make this part of the regular git package, but only on
> > (the next) core-updates.
>
> I didn't realize this was an issue. We update the Git package whenever
> there is a new release.

Thinking about it for another minute, shouldn't those packages not need
to be rebuilt, since origins are fixed-output derivations?
-----BEGIN PGP SIGNATURE-----

iQIzBAABCAAdFiEEsFFZSPHn08G5gDigJkb6MLrKfwgFAlpOoqUACgkQJkb6MLrK
fwitbw//aCRSf65kwnDlgiXV2+JD3ng55ofiGP+Wbnnqe6yEZKyApq6+p7muyxMD
Dqw6ACOufAvfOodoEZCUNVQGZOazGidwLmCYc+E5Nyo/0rQjARRE2FtWm7I3KSgW
RyK2VxTs2gZMh00ysGICUdlznQshokWOPs0LeNqtQ5sZy3v3/U2gu2pWE3ycg1gC
TqY1Jno/YWvaFTnwMQ6sSv4nzrAGRAhaGoU3VSBgaFINMZvdJJiGfczb/NVObN2k
V43mDxCFDUbctN8477ztcwwbb19MJVZKy3poK380GGMq/OGVcuasyYzAN0m26sdO
oReH1ZmIJ6rZ4Uf2mrnHIrhpuLQrQiS4LqqTRbTQ4FBLQb1/SXMxUmdag2kBbRpZ
AOfcRyvZFnc1zvkzHF0xLAnLyAQfS3VN4AqcNnBSv6fU0a0pgjzih+s91PaoUfaK
iaQROc0XDclXHqvAvXBNBK2s0q7rXYkS1YHNO4ma0Q3S1XRhMZatsQ1esvBcRktu
XO9L3jFqp4CHdIFlioy0oHcJ8jnHD1RCFSK4B/7AD7POzBTcHNftuZldKnHwnyjc
92bVa7beyRpajASPmnmFb6I1NdtqH60OP8XN3Rb/ec+LF28U2MegHUbDe/oax+hi
7RDjv7VkbaHYR5BVG7YfSKOZS2obrrzhEq9giK1giwH+Hx9PSqY=
=K4jA
-----END PGP SIGNATURE-----


R
R
Ricardo Wurmus wrote on 5 Jan 2018 07:50
(name . Leo Famulari)(address . leo@famulari.name)(address . 29976@debbugs.gnu.org)
87po6o4x5c.fsf@mdc-berlin.de
Leo Famulari <leo@famulari.name> writes:

Toggle quote (13 lines)
> On Thu, Jan 04, 2018 at 04:49:51PM -0500, Leo Famulari wrote:
>> > I just wanted to use git-subtree without having to rebuild all packages
>> > that use git for fetching the sources.
>> >
>> > We could make this part of the regular git package, but only on
>> > (the next) core-updates.
>>
>> I didn't realize this was an issue. We update the Git package whenever
>> there is a new release.
>
> Thinking about it for another minute, shouldn't those packages not need
> to be rebuilt, since origins are fixed-output derivations?

Yes, you are right. I didn’t think of this.
So, I’m going to add this as a phase to the git package.

--
Ricardo
L
L
Ludovic Courtès wrote on 23 Apr 2018 15:01
(name . Ricardo Wurmus)(address . ricardo.wurmus@mdc-berlin.de)
87y3he13ho.fsf@gnu.org
Hello,

Any update on this one?

Ludo'.
G
G
Gábor Boskovits wrote on 25 Jun 2018 12:06
gnu: Add git-subtree.
(address . 29976-done@debbugs.gnu.org)
CAE4v=pg49RJCJf6-w_k4uX25G9fpecLB_ufW+pKx08U4=Pr+BA@mail.gmail.com
Should be done as part of git build.
Attachment: file
Closed
?