Re: [PATCH v1 3/3] Documentation: replace: add --graft option

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Jakub Narębski <jnareb@xxxxxxxxx> writes:

> W dniu 2014-05-22 23:33, Christian Couder pisze:
>
>> +--graft <commit> [<parent>...]::
>> +	Create a graft commit. A new commit is created with the same
>> +	content as <commit> except that its parents will be
>> +	[<parent>...] instead of <commit>'s parents. A replacement ref
>> +	is then created to replace <commit> with the newly created
>> +	commit.
>> +
>>   -l <pattern>::
>>   --list <pattern>::
>>   	List replace refs for objects that match the given pattern (or
>
> Here I think you can add the graft replacing example:
>
>   cat .git/info/grafts | while read line
>   do git replace --graft $line; done

Do not cat a single file into a pipeline.

    while read definition
    do
    	git replace --graft $definition
    done <"${GIT_DIR:-.git}/info/grafts"

or something.  You might also have to be careful to use "read -r"
and/or avoid feeding a comment line (if info/grafts supports it) to
the command inside do ... done, but I didn't check what the graft
reading code does myself ;-)
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]