All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jakub Narebski <jnareb@gmail.com>
To: Petr Baudis <pasky@suse.cz>
Cc: Christian Couder <chriscool@tuxfamily.org>,
	git@vger.kernel.org, Junio C Hamano <gitster@pobox.com>,
	Sverre Rabbelier <srabbelier@gmail.com>,
	Shawn O Pearce <spearce@spearce.org>,
	Scott Chacon <schacon@gmail.com>,
	Pavan Kumar Sunkara <pavan.sss1991@gmail.com>,
	Sam Vilain <sam@vilain.net>
Subject: Re: GSoC 2010: "Integrated Web Client for git" proposal
Date: Tue, 20 Apr 2010 20:14:15 +0200	[thread overview]
Message-ID: <201004202014.19477.jnareb@gmail.com> (raw)
In-Reply-To: <20100419115113.GC3563@machine.or.cz>

On Mon, Apr 19, 2010, Petr Baudis wrote:
> On Mon, Apr 19, 2010 at 12:43:22PM +0200, Jakub Narebski wrote:
>> On Sun, Apr 18, 2010 at 21:56 +0200, Petr Baudis wrote:

>>> If the project is a success, I wanted to use it for mob branch editing
>>> on repo.or.cz. It could also be used as open-source Gist alternative.
>> 
>> For that you would need editing file / editing contents action, but
>> this is explicitely excluded in current version of Pavan's proposal :-(
> 
> Is it? I see it only being omitted.

At the end, in the section which describes what would be not included
in the project, there was editing files excluded from project.

Which is a bit strange because you need some kind of web editor (even
if it is simply textarea) for the commit message if this "Web Client"
is to implement [git commit]...
 
>>> But it needs to be coded so that it does not require an actual checked
>>> out copy (which shouldn't be too much hassle).
>> 
>> It would require using 'git hash-object -t blob -w --stdin' (from body
>> submitted via POST from textarea) plus 'git update-index --cacheinfo'.
> 
> Yes. Not a whole lot of effort, seems to me. A downside is that you
> cannot use the working tree - index dichotomy, but life isn't perfect.

What do you mean here by "working tree - index dichotomy"?
 
>> There is however complication that you would need to do open2/open3
>> because git-hash-object would require bidirectional communication unless
>> you would use temporary file (command_bidi_pipe in Git.pm, untested).
> 
> I think even just going through a temporary file is fine for initial
> implementation.

It is not that difficult.  You can use IPC::Open2 (which is in core)
and IO::Handle (for easier coding; using IO::Handle is not strictly
necessary), like that:

  use IPC::Open2 qw(open2);
  use IO::Handle;

  ...

  my $pid = open2($out, $in, git_cmd(), 'hash-object', '-w', '--stdin');
  $in->printflush($cgi->param('textarea'))
     or die...;
  my $sha1 = $out->getline();
  chomp $sha1;

  close $out;
  waitpid $pid, 0;

Then you would need:

  system(git_cmd(), 'update-index', '--cacheinfo',
         '100644', $sha1, $pretend_path)
    or die...;

Not tested!
-- 
Jakub Narebski
Poland

  parent reply	other threads:[~2010-04-20 18:14 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-04-15  4:30 GSoC 2010: "Integrated Web Client for git" proposal Christian Couder
2010-04-18  0:46 ` Jakub Narebski
2010-04-18  0:59   ` Petr Baudis
2010-04-18  1:24     ` Jakub Narebski
2010-04-18  2:12       ` Petr Baudis
2010-04-18  8:52         ` Pavan Kumar Sunkara
2010-04-18 21:22           ` Jakub Narebski
     [not found]             ` <w2pe72faaa81004182334xd6fc56d7o31420ca4af867cc2@mail.gmail.com>
2010-04-19  6:35               ` Pavan Kumar Sunkara
2010-04-19 17:00               ` Jakub Narebski
2010-04-19 17:55                 ` Pavan Kumar Sunkara
2010-04-19 23:14                   ` Jakub Narebski
2010-04-20 12:17                     ` Pavan Kumar Sunkara
2010-04-18 22:31           ` Petr Baudis
2010-04-19  6:46             ` Pavan Kumar Sunkara
2010-04-19  6:50               ` Matthieu Moy
2010-04-19  7:23                 ` Junio C Hamano
2010-04-19  7:38                   ` Pavan Kumar Sunkara
2010-04-19  9:07                     ` Petr Baudis
2010-04-19 12:27                       ` Matthieu Moy
2010-04-19 12:57                         ` Pavan Kumar Sunkara
2010-04-19 13:14                           ` Matthieu Moy
2010-04-19 11:57               ` Petr Baudis
2010-04-19 18:10                 ` Pavan Kumar Sunkara
2010-04-20 11:47                   ` Petr Baudis
2010-04-18 17:50         ` Jakub Narebski
2010-04-18 19:56           ` Petr Baudis
2010-04-19 10:43             ` Jakub Narebski
2010-04-19 11:51               ` Petr Baudis
2010-04-19 18:03                 ` Pavan Kumar Sunkara
2010-04-20 12:07                   ` Petr Baudis
2010-04-20 18:14                 ` Jakub Narebski [this message]
2010-04-21 20:49                   ` Pavan Kumar Sunkara
2010-04-22 20:25                     ` Petr Baudis
2010-04-22 21:15                       ` Junio C Hamano
2010-04-23  7:10                         ` Petr Baudis
2010-04-23  9:44                           ` Junio C Hamano
2010-04-22 21:53                       ` Pavan Kumar Sunkara
2010-04-23  5:27                     ` Christian Couder
2010-04-23  5:42                       ` Pavan Kumar Sunkara

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=201004202014.19477.jnareb@gmail.com \
    --to=jnareb@gmail.com \
    --cc=chriscool@tuxfamily.org \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=pasky@suse.cz \
    --cc=pavan.sss1991@gmail.com \
    --cc=sam@vilain.net \
    --cc=schacon@gmail.com \
    --cc=spearce@spearce.org \
    --cc=srabbelier@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.